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) <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user