Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions e2e/booking/booking-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,21 @@ export async function preparePublicBookingPage(
await expect(
page.getByRole("heading", { name: "Book with Tyler Dane" }),
).toBeVisible({ timeout: 15000 });
// The h1 renders before the slots request settles, and while slots are
// pending the picker shows a skeleton without the "Pick a time" heading.
// A test that starts typing right away (Tab to the skip link, Enter) would
// race that request: the skip link finds no target and focus goes nowhere.
// Wait for the picker itself unless the test is deliberately observing the
// pending, failed, or unavailable state.
if (
options.bookable !== false &&
!options.slotFailGate &&
!options.holdFirstSlots
) {
await expect(
page.getByRole("heading", { name: "Pick a time" }),
).toBeVisible();
}

return captured;
}
Expand Down