package web import ( "strings" "testing" ) // R-518 — the whole-system backup button promised a short stop; measured 2026-09-14 on a 12-app box, // every app was down for about 7 m 45 s. The copy now states that measurement, in both languages, on // the page and in the confirm dialog. ASCII fragments only (ui-hungarian rule), each with a control. func TestR518_BackupButtonStatesTheMeasuredDowntime(t *testing.T) { s := i18nTestServer(t) var c i18nCase for _, x := range i18nCases() { if x.name == "backups_full" { c = x } } if c.name == "" { t.Fatal("no backups_full case — the test would pass by looking at nothing") } for _, lang := range []string{"hu", "en"} { body := renderI18nCase(t, s, lang, c) measured, vague := "8 perc", "" // „kb. 8 perc" if lang == "en" { measured, vague = "about 8 minutes", "usually for a few minutes" } if n := strings.Count(body, measured); n < 2 { t.Errorf("%s: the measured downtime appears %d times, want it on the page AND in the confirm", lang, n) } if lang == "en" && strings.Contains(body, vague) { t.Errorf("en: the old vague promise %q is still on the page", vague) } if lang == "hu" && strings.Contains(body, "ltalában néhány perc, nagyobb") { t.Errorf("hu: the old vague promise is still on the page") } } }