fix: link dashboard artist names to detail pages

Task 8's ignore/restore/ignore-singles actions live on the artist detail
page, but the dashboard rendered artist names as plain text with no link,
making those actions unreachable through normal UI navigation. Wrap the
name in an anchor to /artist/{id} and assert the link in the dashboard test.
This commit is contained in:
2026-07-20 00:10:20 +03:00
parent e0211343e0
commit f5b0034b4d
2 changed files with 7 additions and 1 deletions

View File

@@ -80,6 +80,12 @@ func TestDashboard_Authenticated200(t *testing.T) {
if !strings.Contains(body, "mbid-1") {
t.Errorf("expected MBID rendered, got:\n%s", body)
}
// The dashboard must link each artist to its detail page, otherwise the
// ignore/restore/singles actions on that page are unreachable via normal UI
// navigation.
if !strings.Contains(body, `href="/artist/a1"`) {
t.Errorf("expected link to artist detail page, got:\n%s", body)
}
}
func TestDashboard_Unauthenticated401(t *testing.T) {

View File

@@ -33,7 +33,7 @@
<tbody>
{{ range .Artists }}
<tr>
<td>{{ .Name }}</td>
<td><a href="/artist/{{ .ID }}">{{ .Name }}</a></td>
<td class="count {{ if eq .MissingCount 0 }}count-zero{{ else }}count-missing{{ end }}">
{{ .MissingCount }}
</td>