Conversation
Because: - PromoQrMobile renders a second img with alt "Firefox logo" on the Sync signin/signup screens, so assertCmsCustomization's logo locator matched two elements and threw a Playwright strict-mode violation. This commit: - Scopes the logo locator by src to the CMS header logo, fixing the signup, signin, signin login confirmation, and 2FA TOTP sign-in Sync smoke tests.
LZoog
approved these changes
Jun 23, 2026
LZoog
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Only comment is this:
The Kit QR code image can come from a URL/changed in Strapi, I am not sure if that's accounted for here? If that's an issue, if only one of these is a complementary, that could give us a landmark to look for this img and logo in instead of checking the URL directly?
Contributor
Author
|
@LZoog I don't think it will conflict, this change looks for the logo url as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
PromoQrMobilepromo renders a second<img alt="Firefox logo">(in acomplementarylandmark) on the Sync signin/signup screens.assertCmsCustomization's logo locator (getByRole('img', { name: 'Firefox logo', exact: true })) then matched two elements, throwing a Playwright strict-mode violation before any assertion ran.This pull request
.and(page.locator('[src="${logoUrl}"]'))so it targets only the CMS header logo (CDNsrc), not the promo's bundledff-logo.svg.cms.spec.tsandcms-2fa.spec.ts(the helper is duplicated across both).Issue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-14008
Checklist
Other information
How to test (runs against stage; requires a WAF bypass token):
cd packages/functional-tests
CI_WAF_TOKEN='' yarn playwright test --project=stage
tests/cms/cms.spec.ts tests/cms/cms-2fa.spec.ts -g "with Sync|TOTP - Sync"
Expected: all 4 pass. Verified on stage (the 2FA test needs the SMS/redis gate enabled to run).
Note: These specs skip locally — the local auth-server returns an empty CMS config (
/cms/config→{}), so there are no customizations to assert without a Strapi dev instance.