test(postcard): locale fallback, built-in layouts, partials and CSS inlining

- TestTemplateBase, TestTemplateFor and TestSendLocaleFallback pin the
  <template>-<locale> resolution and the order the override source is asked
- TestEnsureLocaleRows (Postgres): rows only for non-default locales without
  files, idempotent, customized content kept while file_hash follows the
  base, base_code from SyncIndex, reset of a fallback row, migrations roll back
- TestBuiltinLayoutsLogo, TestHeaderFooterPartials, TestButtonPartial and
  TestSiteName cover the finished default, system and minimal layouts
- TestInlineCSS, TestInlineCSSOptOut and TestInlineFailure cover inlining,
  the per-layout opt-out and the fallback when the inliner fails
- check-phase35.sh requires the new names (GO_TESTS, DOCKER_TESTS)
This commit is contained in:
Jakub Zych
2026-11-13 21:31:44 +01:00
parent ae13e4dd41
commit a0dde086d2
5 changed files with 1044 additions and 0 deletions

View File

@@ -90,6 +90,16 @@ GO_TESTS=(
./modules/cabana:TestMailDiff
./modules/cabana:TestMailFieldSchema
./modules/surf:TestInstallCoolerPublishesAttempter
./modules/postcard:TestTemplateBase
./modules/postcard:TestTemplateFor
./modules/postcard:TestSendLocaleFallback
./modules/postcard:TestBuiltinLayoutsLogo
./modules/postcard:TestHeaderFooterPartials
./modules/postcard:TestButtonPartial
./modules/postcard:TestSiteName
./modules/postcard:TestInlineCSS
./modules/postcard:TestInlineCSSOptOut
./modules/postcard:TestInlineFailure
)
# docker stage: the non-short framework tests (Postgres).
@@ -108,6 +118,7 @@ DOCKER_TESTS=(
./modules/cabana:TestMailLayoutDelete
./modules/cabana:TestMailBrand
./modules/cabana:TestMailTestSend
./modules/postcard:TestEnsureLocaleRows
)
# admin stage: vitest files that must pass.