feat(cabana): mail templates list grouped by template with per-locale status
Gap G-35-1 (supersedes D-05; D-06 reset and D-07 drift per locale): - the templates list keeps one row per template (the base row, or the lowest variant when only variants ship) with a Customized locales column (Default, then locale codes, at most three then +N); - row states and the status filter aggregate over the template's locale versions; the locale filter is removed; - a not-customized locale without a file shows the base row's current subject, body and layout; its info partial says so, its file version compares with the base file, and Reset returns it to the base file (postcard.ResetOverride accepts a fallback-locale code); - copy: mail.template.customized_locales, mail.info_locale_default, mail.info_locale_fallback (en/pl); - tests: TestMailScreensSmoke/locales_list, templates and drift updated, TestMailDrift on the grouped row, TestMailTemplateFilterScopes.
This commit is contained in:
@@ -121,3 +121,11 @@ type stubMailFieldController struct{}
|
||||
func (stubMailFieldController) ID() string { return "acme.mail.drafts" }
|
||||
func (stubMailFieldController) ModelName() string { return "Draft" }
|
||||
func (stubMailFieldController) ConfigDir() string { return "controllers/mail" }
|
||||
|
||||
// TestMailTemplateFilterScopes: one row per template leaves no locale
|
||||
// filter; the status filter is the only scope (G-35-1).
|
||||
func TestMailTemplateFilterScopes(t *testing.T) {
|
||||
if got := strings.Join(cabana.MailTemplate{}.FilterScopes(), ","); got != "filterStatus" {
|
||||
t.Fatalf("MailTemplate filter scopes = %s", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user