Skip to content

fix(e2e): the same ambiguous locator, one file over - #645

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/the-lock-screen-spec-has-the-same-ambiguity
Sep 7, 2026
Merged

fix(e2e): the same ambiguous locator, one file over#645
rubenvdlinde merged 1 commit into
developmentfrom
fix/the-lock-screen-spec-has-the-same-ambiguity

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

keepiq's development E2E is still red on the strict-mode violation #642 was supposed to have fixed.

What I got wrong

#642 fixed the ambiguous locator in tests/e2e/workflows/vault-unlock.spec.ts. The identical locator also lives in tests/e2e/spec-coverage/lock-screen.spec.ts, and I did not touch it. I then reported keepiq as fixed. It was not: the run at 6c09423, on a tree that contains #642, failed with the same message one file over.

I fixed the spec that failed rather than the locator that was wrong.

strict mode violation: locator('.lock-screen')
  .getByText(/Wrong master password|decryption failed/i)
  resolved to 2 elements:
    1) <p role="alert" class="lock-screen__sr-live">
    2) <p class="input-field__helper-text-message">

The fix

Same treatment as #642, so the two files now agree. Each surface is asserted on its own:

  • the helper text under the field is what a sighted reader sees
  • the visually-hidden role="alert" is what a screen reader announces, added deliberately so a rejected credential interrupts rather than going unspoken

Narrowing to either one alone would let the other be removed with no test noticing, which for the live region means losing the announcement silently — the exact failure the region exists to prevent.

What I checked before assuming

tests/e2e/workflows/_workflow-helpers.ts has two more copies of the same regex. They are .count() and .first().textContent(), neither of which is strict-mode sensitive, so they are correct as they stand and are left alone.

Verification

prettier clean. The E2E job is skipping on a pull request and runs only on the development push, so this is proven on the merge or not at all.

🤖 Generated with Claude Code

#642 fixed this strict-mode violation in
`tests/e2e/workflows/vault-unlock.spec.ts` and left the identical locator
in `tests/e2e/spec-coverage/lock-screen.spec.ts` untouched, so keepiq's
development E2E stayed red on the same defect:

    strict mode violation: locator('.lock-screen')
      .getByText(/Wrong master password|decryption failed/i)
      resolved to 2 elements:
        1) <p role="alert" class="lock-screen__sr-live">
        2) <p class="input-field__helper-text-message">

I reported keepiq as fixed after #642 merged. It was not: I had fixed the
spec that failed rather than the LOCATOR that was wrong, and the second
copy failed the very next run on a tree containing the fix.

Same treatment as #642, so the two files now agree. Each surface is
asserted on its own: the helper text is what a sighted reader sees, the
visually-hidden role="alert" is what a screen reader announces, and it
was added deliberately so a rejected credential interrupts rather than
going unspoken. Narrowing to either one alone would let the other be
removed with no test noticing, which for the live region means losing
the announcement silently.

The two remaining uses in `tests/e2e/workflows/_workflow-helpers.ts` are
`.count()` and `.first().textContent()`. Neither is strict-mode
sensitive, so they are correct as they stand and are left alone.

prettier clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/keepiq @ 34a9be1

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
test-l10n
format
check-l10n-js
check-schema-l10n
composer ✅ 111/111
npm ✅ 543/543
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman
Playwright ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development
Hydra gates

Quality workflow — 2026-09-07 18:28 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 81483a8 into development Sep 7, 2026
49 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/the-lock-screen-spec-has-the-same-ambiguity branch September 7, 2026 18:34
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.

1 participant