Skip to content

Conversation

@nshirley
Copy link
Contributor

@nshirley nshirley commented Jan 16, 2026

Because:

  • We see snapshots occasionally fail in CI
  • And, we want snapshot tests back

This Commit:

  • Adds an explicit dependency on l10n-merge for accounts-email-renderer:test-unit, forcing a dependency chain to ensure necessary ftl files are present
  • Adds back previously skipped snapshot tests

Closes: FXA-12891


Additional Details

This took a bit of troubleshooting, and I'm still not 💯 on why tests were not behaving in CI. From what I can tell, the l10n-prime command removes some files before copying files from the cloned l10n repo. Then, coupled with the l10n-merge we copy more files around and concat others to create the emails.ftl file.

However, something in CI was causing the l10n-prime command to run again after merge, effectively removing all of the ftl files moved and created by -merge. I saw this when connecting via ssh to the circle server; before tests ran I could see the appropriate files, however, soon before tests started they would be missing.

To combat this, I gave -merge a dependency on -prime and then test-unit has a dependency on -merge. This effectively creates an explicit dependency chain of test-unit -> l10n-merge -> l10n-prime, so it doesn't matter how the tests run, they should always get the necessary files before running.

To complicate things further, I think NX Caching was causing havoc with this. Sometimes the tests would pass, sometimes they wouldn't.

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).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@nshirley nshirley force-pushed the FXA-12891 branch 2 times, most recently from f67e66d to 623b9f6 Compare January 18, 2026 22:51
"cwd": ".",
"inputs": ["{projectRoot}/gruntfile.js", "{projectRoot}/src/**/en.ftl"],
"outputs": ["{projectRoot}/public/en/auth.ftl"]
"outputs": [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The outputs from the command are these files, and this just ensures that NX can cache correctly

"targets": {
"build": {
"dependsOn": ["l10n-merge", "build-css", "build-ts"],
"dependsOn": ["build-ts", "l10n-merge", "build-css"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had reverted this while working on another PR since I thought it's what caused the test failures, but it doesn't appear that's the case.

Original comment

Because:
 - We see snapshots occasionally fail in CI

This Commit:
 - Adds an explicit dependency on l10n-merge for
   accounts-email-renderer:test-unit
 - Adds back previously skipped snapshot tests
@nshirley nshirley changed the title FXA-12891 wip chore(email-renderer): Fix issue with snapshots failing in CI Jan 18, 2026
@nshirley nshirley marked this pull request as ready for review January 18, 2026 23:21
@nshirley nshirley requested a review from a team as a code owner January 18, 2026 23:21
@nshirley nshirley merged commit 358c725 into main Jan 20, 2026
21 checks passed
@nshirley nshirley deleted the FXA-12891 branch January 20, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants