W13 new-drive pages pre-fill the next free hdd_N and answer a bad name visibly; W14 drive operator detail behind Részletek; W29 plain decommission names no move; unreleased
gates / gates (push) Successful in 1m37s
gates / gates (push) Successful in 1m37s
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// W29 (rehearsal 2026-10-20): after a plain decommission (nothing moved) the storage card read „Kiváltva — Adatok
|
||||
// átköltöztetve ide: . () Időpont: …" — the move sentence with empty blanks. With no move it says the drive was
|
||||
// decommissioned and that nothing was moved off it; a real move keeps its sentence.
|
||||
func TestW29_PlainDecommissionNamesNoMove(t *testing.T) {
|
||||
s := i18nTestServer(t)
|
||||
want := map[string][2]string{
|
||||
"hu": {"Leszerelve. Nem költöztettünk át adatot róla", "Adatok átköltöztetve ide"},
|
||||
"en": {"Decommissioned. No data was moved off it", "Data moved to"},
|
||||
}
|
||||
for _, c := range i18nCases() {
|
||||
switch c.name {
|
||||
case "storage_decommissioned_plain":
|
||||
for lang, w := range want {
|
||||
page := renderI18nCase(t, s, lang, c)
|
||||
if !strings.Contains(page, w[0]) || strings.Contains(page, w[1]) {
|
||||
t.Errorf("%s: a plain decommission must say %q and never %q", lang, w[0], w[1])
|
||||
}
|
||||
}
|
||||
case "storage_full": // a real move keeps its sentence
|
||||
for lang, w := range want {
|
||||
page := renderI18nCase(t, s, lang, c)
|
||||
if !strings.Contains(page, w[1]) || strings.Contains(page, w[0]) {
|
||||
t.Errorf("%s: a decommission with a move must say %q", lang, w[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user