test(e2e): wait for the slot picker before public booking tests start - #3409
Merged
Conversation
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
enabled auto-merge
September 5, 2026 14:57
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.
Fixes: no issue. Third fix from the CI audit (#3407, #3408).
What and why
preparePublicBookingPagereturned 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 withoutpreventDefault, and focus went nowhere. The heading then mounted unfocused andtoBeFocused()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, orbookable: falseand 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.mdunder "Looked at, not changed" rather than altered in a CI PR.Verify
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-a11ysettings section x3,host-settingsx5,public-booking-v15settings discard), andaccount-page-jumpholds 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-a11ypublic sections). Web unit tests (817), type-check, lint, and knip pass. CI on Linux is the arbiter.🤖 Generated with Claude Code