Skip to content

test(e2e): wait for the slot picker before public booking tests start - #3409

Merged
tyler-dane merged 1 commit into
mainfrom
test/e2e-booking-harness-wait-for-slots
Sep 5, 2026
Merged

test(e2e): wait for the slot picker before public booking tests start#3409
tyler-dane merged 1 commit into
mainfrom
test/e2e-booking-harness-wait-for-slots

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Fixes: no issue. Third fix from the CI audit (#3407, #3408).

What and why

preparePublicBookingPage returned as soon as the "Book with Tyler Dane" h1 was visible, while the stubbed slots request was often still pending. While slots are pending the picker renders a skeleton and the "Pick a time" heading does not exist yet. A test that starts typing right away raced that: "walks the picker with the keyboard via the skip link" pressed Tab, Enter on the skip link before the heading was mounted, the skip link's click handler found no target and returned without preventDefault, and focus went nowhere. The heading then mounted unfocused and toBeFocused() timed out.

In the audit's scan of 705 CI shard-job logs from the newest 200 e2e runs, this test was 5 of the 8 passes that needed a Playwright retry, on 5 different branches. No other test recurred.

The harness now waits for the "Pick a time" heading, which two web unit tests pin as rendering only once slots have loaded, unless the caller passed slotFailGate, holdFirstSlots, or bookable: false and is deliberately observing the pending, failed, or unavailable state. No test file changes; the flaky test's assertions are untouched and now start from a settled page.

Product note, not changed here: a keyboard user who activates "Skip to open times" while slots are still loading gets nothing. That behavior is deliberate and tested on the web side, so it is recorded in docs/CI-CD/ci-audit-2026-09.md under "Looked at, not changed" rather than altered in a CI PR.

Verify

Selected packages: web
Checks run: test:web, type-check, lint, knip
Checks skipped: (none)
Failed: test:a11y, test:e2e
VERDICT: FAIL

All 10 local e2e failures are the known macOS false failures: 9 wait on getByRole('dialog', { name: 'Settings' }), which the Settings shortcut never opens on Mac (booking-a11y settings section x3, host-settings x5, public-booking-v15 settings discard), and account-page-jump holds Mod as Control per its own comment, which is Meta on macOS. The same 10 failed identically on an unmodified checkout earlier today. The other 121 e2e tests passed locally, including the formerly flaky skip-link walk and every other test that uses the changed harness (public-booking, public-booking-v15, booking-a11y public sections). Web unit tests (817), type-check, lint, and knip pass. CI on Linux is the arbiter.

🤖 Generated with Claude Code

preparePublicBookingPage returned once the h1 was visible, while the slots
request was often still pending. Tests that start typing immediately raced
it: "walks the picker with the keyboard via the skip link" pressed Enter on
the skip link before the "Pick a time" heading existed, the click handler
found no target, and focus went nowhere. It was 5 of the 8 retry-only passes
in 705 CI shard jobs during the 2026-09 audit, across 5 branches.

The harness now waits for the "Pick a time" heading, which renders only once
slots have loaded, unless the test is deliberately observing the pending,
failed, or unavailable state.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Sep 5, 2026
@tyler-dane
tyler-dane enabled auto-merge September 5, 2026 14:57
@tyler-dane
tyler-dane added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit a742191 Sep 5, 2026
27 checks passed
@tyler-dane
tyler-dane deleted the test/e2e-booking-harness-wait-for-slots branch September 5, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-automerge Agent-loop finished; merge-guard may squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant