feat(templates): add localized push templates and actions
Share template keys across email and push with independent editors and revisions. Render localized actions and preserve version-one delivery. Ref: IT-1627
This commit is contained in:
@@ -22,8 +22,8 @@ public sealed class EditorLayoutTests(TemplateDatabaseFixture fixture) : IClassF
|
||||
{
|
||||
(Url: "/admin/services/create", Title: "Create Service", Form: "serviceForm"),
|
||||
(Url: root + "/edit", Title: "Edit Service", Form: "serviceForm"),
|
||||
(Url: root + "/templates/create", Title: "Create Email Template", Form: "templateForm"),
|
||||
(Url: root + "/templates/" + definition.Id, Title: "Edit Email Template", Form: "templateForm")
|
||||
(Url: root + "/templates/create", Title: "Create Template", Form: "templateForm"),
|
||||
(Url: root + "/templates/" + definition.Id, Title: "Template: Layout", Form: "templateForm")
|
||||
};
|
||||
foreach (var editor in editors)
|
||||
AssertEditorLayout(await client.GetStringAsync(editor.Url), editor.Title, editor.Form);
|
||||
@@ -32,7 +32,7 @@ public sealed class EditorLayoutTests(TemplateDatabaseFixture fixture) : IClassF
|
||||
fields["VariablesJson"] = "{invalid";
|
||||
var errorHtml = await (await client.PostAsync(root + "/templates/save", new FormUrlEncodedContent(fields))).Content.ReadAsStringAsync();
|
||||
Assert.Contains("Invalid variables JSON", errorHtml);
|
||||
AssertEditorLayout(errorHtml, "Create Email Template", "templateForm");
|
||||
AssertEditorLayout(errorHtml, "Create Template", "templateForm");
|
||||
Assert.Contains("<dl class=\"template-service-context\">", errorHtml);
|
||||
Assert.Contains("<dt>Service</dt>", errorHtml);
|
||||
Assert.Contains("<dd>TestService</dd>", errorHtml);
|
||||
|
||||
Reference in New Issue
Block a user