fix: few flaky tests in ooo and bookings-list (#20170)

* fix flaky tests

* chore
This commit is contained in:
Vijay
2025-03-19 08:32:47 +00:00
committed by GitHub
parent a4a05878ef
commit 96f7a01c5f
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -70,6 +70,7 @@ test.describe("Bookings", () => {
const firstUser = await users.create();
await firstUser.apiLogin();
await page.goto(`/bookings/upcoming`);
await page.waitForResponse((response) => /\/api\/trpc\/bookings\/get.*/.test(response.url()));
await page.locator('[data-testid="add-filter-button"]').click();
await page.locator('[data-testid="add-filter-item-dateRange"]').click();
@@ -233,6 +234,7 @@ test.describe("Bookings", () => {
const firstUser = await users.create();
await firstUser.apiLogin();
await page.goto(`/bookings/past`);
await page.waitForResponse((response) => /\/api\/trpc\/bookings\/get.*/.test(response.url()));
await page.locator('[data-testid="add-filter-button"]').click();
await page.locator('[data-testid="add-filter-item-dateRange"]').click();
+6
View File
@@ -653,6 +653,9 @@ test.describe("Out of office", () => {
await user.apiLogin();
await page.goto("/settings/my-account/out-of-office");
await page.waitForLoadState("domcontentloaded");
await page.waitForResponse(
(response) => response.url().includes("outOfOfficeEntriesList") && response.status() === 200
);
await page.locator('[data-testid="add-filter-button"]').click();
await page.locator('[data-testid="add-filter-item-dateRange"]').click();
await expect(
@@ -667,6 +670,9 @@ test.describe("Out of office", () => {
await user.apiLogin();
await page.goto("/settings/my-account/out-of-office");
await page.waitForLoadState("domcontentloaded");
await page.waitForResponse(
(response) => response.url().includes("outOfOfficeEntriesList") && response.status() === 200
);
await page.locator('[data-testid="add-filter-button"]').click();
await page.locator('[data-testid="add-filter-item-dateRange"]').click();
await page.locator('[data-testid="add-filter-button"]').click();