feat(email-templates): tests, docs, and fix quote_verification sample data (subtask 8)

- Add 50 tests in test_email_templates.py:
  - TestRenderEmailTemplate: all 11 registry templates render in EN + DE
    without error; checks DOCTYPE, wordmark, font, CTA color, template-
    specific content (heat badges, brief rows, weekly digest loop, etc.)
    and registry structure
  - TestEmailGalleryRoutes: access control, gallery list (all labels
    present, preview links), preview pages (EN/DE/nonexistent/invalid-lang),
    compose preview endpoint (plain + wrapped + empty body)
- Fix _quote_verification_sample: add missing recap_parts key — StrictUndefined
  raised on the {% if recap_parts %} check when the variable was absent
- Update CHANGELOG.md: document email template system (renderer, base,
  macros, 11 templates, registry, gallery, compose preview, removed helpers)
- Update PROJECT.md: add email template system + gallery to Done section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-25 12:24:52 +01:00
parent fb83f432db
commit 578a409893
4 changed files with 264 additions and 0 deletions

View File

@@ -107,6 +107,7 @@ def _quote_verification_sample(lang: str) -> dict:
"court_count": court_count,
"facility_type": "Indoor Padel Club",
"country": "Germany",
"recap_parts": ["4 courts", "Indoor Padel Club", "Germany"],
"preheader": t.get("email_quote_verify_preheader_courts", "").format(court_count=court_count),
}