diff --git a/apps/web/playwright/bookings-list.e2e.ts b/apps/web/playwright/bookings-list.e2e.ts index b97c04968b..94690f731c 100644 --- a/apps/web/playwright/bookings-list.e2e.ts +++ b/apps/web/playwright/bookings-list.e2e.ts @@ -625,7 +625,9 @@ test.describe("Bookings", () => { return await bookingListItems.count(); }) .toBe(1); - await expect(bookingListItems.first().locator(`text=${teamBooking!.title}`)).toBeVisible(); + await expect(bookingListItems.first().getByTestId("title-and-attendees")).toContainText( + teamBooking!.title + ); }); test("Team filter shows bookings for managed event types (child events)", async ({ @@ -674,14 +676,16 @@ test.describe("Bookings", () => { const upcomingBookingsTable = page.locator('[data-testid="upcoming-bookings"]'); const bookingListItems = upcomingBookingsTable.locator('[data-testid="booking-item"]'); - + await expect .poll(async () => { return await bookingListItems.count(); }) .toBe(1); - await expect(bookingListItems.first().locator(`text=${managedEventBooking!.title}`)).toBeVisible(); + await expect(bookingListItems.first().getByTestId("title-and-attendees")).toContainText( + managedEventBooking!.title + ); }); test("Team filter excludes bookings from other teams", async ({ page, users, bookings }) => {