From f29927f50dfa5079f1d22c2691ba4f22b2513494 Mon Sep 17 00:00:00 2001 From: Mathias Date: Mon, 8 Jun 2026 14:03:08 +0200 Subject: [PATCH] test(web): guard against the removed over-promise card copy Extend the card copy guard so "Try now", "Summarize now", "Fetching soon", and "the next run" can't silently return to any card state (UX review honesty pass). Co-Authored-By: Claude Opus 4.8 (1M context) --- internal/web/videocard_internal_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/internal/web/videocard_internal_test.go b/internal/web/videocard_internal_test.go index 305065a..69b34d5 100644 --- a/internal/web/videocard_internal_test.go +++ b/internal/web/videocard_internal_test.go @@ -135,8 +135,11 @@ func TestVideoCard_State5_Pending(t *testing.T) { } } -// TestVideoCard_TryNowAbsent — "Try now" must not appear in any rendered card. -func TestVideoCard_TryNowAbsent(t *testing.T) { +// TestVideoCard_ForbiddenCopyAbsent — the over-promising / jargon phrases the +// honesty pass removed must not reappear in any rendered card state (UX review +// A3/A4/A6): "Try now", "Summarize now", "Fetching soon", "the next run". +func TestVideoCard_ForbiddenCopyAbsent(t *testing.T) { + forbidden := []string{"Try now", "Summarize now", "Fetching soon", "the next run"} cases := []store.SummaryRow{ {VideoID: "a", Summarized: true, Summary: "s", AIProvider: "local"}, {VideoID: "b", TranscriptStatus: "none"}, @@ -146,8 +149,10 @@ func TestVideoCard_TryNowAbsent(t *testing.T) { } for _, r := range cases { html := renderVideoCard(t, r) - if strings.Contains(html, "Try now") { - t.Errorf("'Try now' must not appear in any card state; video %q got:\n%s", r.VideoID, html) + for _, phrase := range forbidden { + if strings.Contains(html, phrase) { + t.Errorf("forbidden copy %q reappeared in card %q:\n%s", phrase, r.VideoID, html) + } } } }