fix(e2e): use exact match for Password label to prevent strict mode violation#752
Merged
ericsocrat merged 1 commit intomainfrom Mar 8, 2026
Merged
Conversation
…iolation
getByLabel('Password') matched both the password input (via <label for>)
and the 'Show password' toggle button (substring match on aria-label).
Adding { exact: true } ensures only the exact label text 'Password' is
matched, fixing the Playwright strict mode error introduced by the
password toggle feature in PR #727.
12 occurrences fixed across 6 E2E test files.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
This PR fixes Playwright strict mode violations in E2E tests caused by getByLabel("Password") matching both the password input and the “Show password” toggle button (substring match on its aria-label).
Changes:
- Updated all E2E password locators to
getByLabel("Password", { exact: true })to ensure only the password field is targeted. - Applied the locator change across the affected login/signup helper flows and assertions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/e2e/auth.setup.ts | Makes the auth setup login flow’s password locator exact to avoid strict mode ambiguity. |
| frontend/e2e/authenticated.spec.ts | Updates signup form visibility assertion and signup interactions to use an exact password label match. |
| frontend/e2e/visual-audit.spec.ts | Updates the visual audit sign-in helper to use an exact password label match. |
| frontend/e2e/screenshot-capture.spec.ts | Updates the screenshot capture sign-in helper to use an exact password label match. |
| frontend/e2e/smoke-extended.spec.ts | Updates the signup placeholder check to use an exact password label match. |
| frontend/e2e/functional-onboarding.spec.ts | Updates onboarding login steps across tests to use an exact password label match. |
Bundle Size Report
✅ Bundle size is within acceptable limits. |
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.
Problem
\getByLabel('Password')\ in Playwright E2E tests matched two elements — the password input (via <label for>) and the 'Show password' toggle button (via substring match on \�ria-label='Show password'). This caused a Playwright strict mode violation that failed the Quality Gate CI check.
Introduced by PR #727 (password toggle feature).
Fix
Added { exact: true }\ to all 12 \getByLabel('Password')\ calls across 6 E2E test files. This ensures only the exact label text 'Password' is matched, excluding 'Show password'.
Files Changed
Verification
px tsc --noEmit\ — 0 errors