fix(e2e): deflake firefox form-validation by waiting for nav links to be visible #402

Merged
nrupard merged 1 commit from fix/PMS-543-firefox-nav-visible-wait into main 2026-06-29 20:30:51 +02:00
Owner

What

Deflakes the firefox run of e2e/tests/form-validation.spec.ts. Resolves PMS-543.

The spec navigates in-app by clicking sidebar/list router links (a hard goto would reboot the WASM app and drop the bearer), then clicks the Create button. The Create-button clicks already wait explicitly for visibility with a 15s timeout, but the four nav-link clicks relied on Playwright's default action timeout. Firefox paints the post-WASM-nav DOM more slowly than Chromium/WebKit, so a[href="/tickets"] could miss that timeout and the click failed with the link "never visible" (run 2782; chromium and webkit passed the same run).

The four nav clicks now go through a navClick helper that waits for the :visible instance with the same 15s timeout the buttons use, then clicks. The :visible + .first() selector semantics are unchanged, so the load-bearing mobile-drawer-vs-desktop-sidebar behavior (the existing in-test comment) is preserved.

Verification

Local: tsc --noEmit is clean and playwright test --list collects the spec across chromium/firefox/webkit.

Not exercised end-to-end here: the firefox flake only reproduces against the live staging deployment (the suite gates on a staging /api/v1/health probe), which can't run locally. The change is an additive visibility wait, so it cannot affect the already-green chromium/webkit runs; the staging e2e run on this PR is the real confirmation.

Context

This was the last of the mokosh-server CI-failure backlog. The sibling tickets were the staging /api/v1/health 404 reachability gate (PMS-544/547, now returning 200) and an integration.yml runner OOM (PMS-527/528), all closed as resolved/out-of-date.

## What Deflakes the firefox run of `e2e/tests/form-validation.spec.ts`. Resolves PMS-543. The spec navigates in-app by clicking sidebar/list router links (a hard `goto` would reboot the WASM app and drop the bearer), then clicks the Create button. The Create-button clicks already wait explicitly for visibility with a 15s timeout, but the four nav-link clicks relied on Playwright's default action timeout. Firefox paints the post-WASM-nav DOM more slowly than Chromium/WebKit, so `a[href="/tickets"]` could miss that timeout and the click failed with the link "never visible" (run 2782; chromium and webkit passed the same run). The four nav clicks now go through a `navClick` helper that waits for the `:visible` instance with the same 15s timeout the buttons use, then clicks. The `:visible` + `.first()` selector semantics are unchanged, so the load-bearing mobile-drawer-vs-desktop-sidebar behavior (the existing in-test comment) is preserved. ## Verification Local: `tsc --noEmit` is clean and `playwright test --list` collects the spec across chromium/firefox/webkit. Not exercised end-to-end here: the firefox flake only reproduces against the live staging deployment (the suite gates on a staging `/api/v1/health` probe), which can't run locally. The change is an additive visibility wait, so it cannot affect the already-green chromium/webkit runs; the staging e2e run on this PR is the real confirmation. ## Context This was the last of the mokosh-server CI-failure backlog. The sibling tickets were the staging `/api/v1/health` 404 reachability gate (PMS-544/547, now returning 200) and an integration.yml runner OOM (PMS-527/528), all closed as resolved/out-of-date.
fix(e2e): wait for nav links to be visible to deflake firefox form-validation
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 3m11s
Integration / integration tests (pull_request) Successful in 10m20s
E2E / Playwright against staging (pull_request) Successful in 1m1s
Create release / Gate (release-branch merges only) (pull_request) Successful in 1s
Create release / Create release from merged PR (pull_request) Has been skipped
f3f1e49407
The form-validation spec navigates in-app by clicking sidebar/list router links, then clicks the Create button. The button clicks already wait explicitly for visibility (15s), but the four nav-link clicks relied on Playwright's default action timeout. Firefox paints the post-WASM-nav DOM more slowly than Chromium/WebKit, so a[href="/tickets"] could miss that timeout and the click failed with the link "never visible" (PMS-543, run 2782; chromium and webkit passed the same run).

Route the four nav clicks through a navClick helper that waits for the :visible instance with the same 15s timeout the Create buttons use, then clicks. The :visible + .first() selector semantics are unchanged, so the load-bearing mobile-drawer-vs-desktop-sidebar behavior is preserved.

Verified locally: tsc --noEmit is clean and playwright test --list collects the spec across chromium/firefox/webkit. The firefox flake itself only reproduces against the live staging deployment, so this is not exercised end-to-end here; it is an additive visibility wait that cannot affect the already-green chromium/webkit runs.

#PMS-543

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard scheduled this pull request to auto merge when all checks succeed 2026-06-29 19:09:23 +02:00
nrupard deleted branch fix/PMS-543-firefox-nav-visible-wait 2026-06-29 20:30:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!402
No description provided.