From 2ad3abd9097acb8aed7cdc44d60ba57e4d11775b Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Tue, 3 Feb 2026 11:54:38 -0300 Subject: [PATCH] test: replace text locators with data-testid selectors in team filter tests (#27148) * test: add e2e tests for team filter in bookings list Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: replace text locators with data-testid selectors in team filter tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: apply formatting to resolved merge conflict Co-Authored-By: unknown <> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- apps/web/playwright/bookings-list.e2e.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 }) => {