diff --git a/apps/web/playwright/booking-sheet-keyboard.e2e.ts b/apps/web/playwright/booking-sheet-keyboard.e2e.ts index 91a849903a..617efdbfce 100644 --- a/apps/web/playwright/booking-sheet-keyboard.e2e.ts +++ b/apps/web/playwright/booking-sheet-keyboard.e2e.ts @@ -100,7 +100,9 @@ async function setupBookingsAndOpenSheet({ const firstBookingItem = page.locator(`[data-booking-uid="${fixtures[0].uid}"]`); await expect(firstBookingItem).toBeVisible(); - await firstBookingItem.locator('[role="button"]').first().click(); + const firstButton = firstBookingItem.locator('[role="button"]').first(); + await firstButton.waitFor({ state: "visible" }); + await firstButton.click(); const sheet = page.locator('[role="dialog"]'); await expect(sheet).toBeVisible(); diff --git a/apps/web/playwright/bookings-list.e2e.ts b/apps/web/playwright/bookings-list.e2e.ts index 41a3c1f203..30251fdf7b 100644 --- a/apps/web/playwright/bookings-list.e2e.ts +++ b/apps/web/playwright/bookings-list.e2e.ts @@ -798,8 +798,9 @@ test.describe("Bookings", () => { const bookingItem = page.locator(`[data-booking-uid="${bookingFixture.uid}"]`); await expect(bookingItem).toBeVisible(); - - await bookingItem.locator('[role="button"]').first().click(); + const bookingButton = bookingItem.locator('[role="button"]').first(); + await bookingButton.waitFor({ state: "visible" }); + await bookingButton.click(); await expect(page).toHaveURL(new RegExp(`[?&]uid=${bookingFixture.uid}(&|$)`)); } finally {