diff --git a/cmd/server/tests/comic_metadata_display_test.go b/cmd/server/tests/comic_metadata_display_test.go index 3c5161e4..3007ca64 100644 --- a/cmd/server/tests/comic_metadata_display_test.go +++ b/cmd/server/tests/comic_metadata_display_test.go @@ -140,7 +140,6 @@ func TestComicMetadataDisplay_ComicDetailPage(t *testing.T) { body := readBody(resp) // Verify reading direction badge is displayed - assert.Contains(t, body, "📖", "Should display reading direction icon") assert.Contains(t, body, "RTL", "Should display RTL reading direction") }) @@ -263,7 +262,8 @@ func TestComicMetadataDisplay_ComicDetailPage(t *testing.T) { assert.Equal(t, http.StatusOK, resp.StatusCode) body := readBody(resp) - assert.Contains(t, body, "📚", "Should display story arc icon") + // The redesigned badge renders the arc NAME in a text badge + // (no 📚 icon) — assert the name. assert.Contains(t, body, "The Dark Phoenix Saga", "Should display story arc name") }) @@ -508,7 +508,8 @@ func TestComicMetadataDisplay_ComicDetailPage(t *testing.T) { assert.Equal(t, http.StatusOK, resp.StatusCode) body := readBody(resp) - // Verify all manga-specific fields are displayed + // The redesigned badge (07578e0) renders the direction text chip + // without the 📖 emoji — assert the chip text. assert.Contains(t, body, "RTL", "Should display RTL reading direction") assert.Contains(t, body, "Teen", "Should display age rating") assert.Contains(t, body, "8.5 / 10", "Should display community rating") @@ -619,9 +620,11 @@ func TestComicMetadataDisplay_ComicDetailPage(t *testing.T) { assert.Contains(t, body, "Everyone", "Should display age rating") assert.Contains(t, body, "goodreads.com", "Should display web URL") - // Verify comic-specific fields are NOT displayed - assert.NotContains(t, body, "Manga Type", "Should not display manga type for ebook") - assert.NotContains(t, body, "Scan Info", "Should not display scan info for ebook") + // Verify comic-specific fields are NOT displayed. The page body + // always contains the admin edit modal's "Manga Type"/"Scan Info" + // LABELS — assert the metadata VALUES (what the display block + // renders) are absent instead. + assert.NotContains(t, body, "yes and right to left", "Should not display manga type value for ebook") assert.NotContains(t, body, "B&W", "Should not display B&W badge for ebook") }) @@ -682,9 +685,11 @@ func TestComicMetadataDisplay_ComicDetailPage(t *testing.T) { // Page should still render successfully assert.Contains(t, body, "Minimal Comic", "Should display title") - // Use "Community Rating:" with colon to avoid matching the HTML comment + // The admin edit modal always carries "Manga Type" as a form + // LABEL — the display block would render the capitalized VALUE, + // which is absent here. assert.NotContains(t, body, "Community Rating:", "Should not show community rating when not set") - assert.NotContains(t, body, "Manga Type", "Should not show manga type when unknown") + assert.NotContains(t, body, "yes and right to left", "Should not show a manga type value when unknown") }) }