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>
This commit is contained in:
Keith Williams
2026-02-03 11:54:38 -03:00
committed by GitHub
co-authored by Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> unknown <> Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent c9b4143f57
commit 2ad3abd909
+7 -3
View File
@@ -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 }) => {