Skip to content

test(functional): assert the de l10n bundle is delivered - #21071

Merged
vbudhram merged 1 commit into
mainfrom
fxa-14366
Aug 19, 2026
Merged

test(functional): assert the de l10n bundle is delivered#21071
vbudhram merged 1 commit into
mainfrom
fxa-14366

Conversation

@vbudhram

@vbudhram vbudhram commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Because

  • FXA-14361 served English to every locale and nothing failed. Every response was a 200, and the only symptom was untranslated copy.
  • packages/functional-tests has no l10n coverage, so neither PR CI nor the stage and production smoke runs would have caught it.

This pull request

  • Adds l10nBundleDelivery.spec.ts under tests/misc/. It forces de with Playwright's locale context option, waits for the main.ftl response, then asserts a 200 and a body that parses as FTL.
  • Matches the plain path and the hashed manifest path, for example locales/de/main.ebcab539.ftl.
  • Tags the block severity-1. That is what the stage and production Playwright runs grep for.

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14366

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on: packages/functional-tests/tests/misc/l10nBundleDelivery.spec.ts
  • Suggested review order: one file.
  • Risky or complex parts: the response wait. It is registered before page.goto, so a request that never happens keeps it pending and the test fails on timeout.

Screenshots (Optional)

No user interface change.

Other information (Optional)

How the locale reaches the fetch: public/lang-fix.js sets document.documentElement.lang from navigator.languages, getCurrentLocale() reads that value, and AppLocalizationProvider then fetches main.ftl for it.

The test asserts nothing about the static asset manifest, so #21060 needs no rework here. It asserts no translated string and no FTL message id. The body check matches any message line, which rules out an error page served with a 200.

Read this before you approve: I did not run the spec, and I did not exercise the negative case against a running stack. To confirm it, remove the de main.ftl entry from the manifest and check that the test fails.

Verification done here: npx tsc -p packages/functional-tests/tsconfig.json --noEmit reports only the three errors that already exist on main, in lib/sub-helpers.ts and lib/testAccountTracker.ts. npx nx lint functional-tests passes with no finding on the new file.

## Because

- FXA-14361 served English to every locale and nothing failed. Every response was a 200, and the only symptom was untranslated copy.
- `packages/functional-tests` has no l10n coverage, so neither PR CI nor the stage and production smoke runs would have caught it.

## This pull request

- Adds `l10nBundleDelivery.spec.ts` under `tests/misc/`. It forces `de` with Playwright's `locale` context option, waits for the `main.ftl` response, then asserts a 200 and a body that parses as FTL.
- Matches the plain path and the hashed manifest path, for example `locales/de/main.ebcab539.ftl`.
- Tags the block `severity-1`. That is what the stage and production Playwright runs grep for.

## Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14366
@vbudhram
vbudhram requested a review from a team as a code owner August 19, 2026 17:44
@vbudhram vbudhram added the auto label Aug 19, 2026
Copilot AI balanced review requested due to automatic review settings August 19, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds functional coverage ensuring the German Fluent bundle is requested and valid in local, stage, and production environments.

Changes:

  • Forces the browser locale to German.
  • Supports plain and hashed bundle paths.
  • Verifies a successful response containing FTL messages.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vbudhram
vbudhram merged commit 8cc0100 into main Aug 19, 2026
21 checks passed
@vbudhram
vbudhram deleted the fxa-14366 branch August 19, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants