Skip to content

Commit 2a786b4

Browse files
authored
Revert "test: fix few e2e flakes (calcom#21408)" (calcom#21501)
1 parent ef18445 commit 2a786b4

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

apps/web/playwright/bookings-list.e2e.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,10 @@ test.describe("Bookings", () => {
461461

462462
await addFilter(page, "userId");
463463
await openFilter(page, "userId");
464-
const bookingsGetResponse2 = page.waitForResponse((response) =>
465-
/\/api\/trpc\/bookings\/get.*/.test(response.url())
466-
);
467-
468464
await page
469465
.locator(`[data-testid="select-filter-options-userId"] [role="option"]:has-text("${anotherUser}")`)
470466
.click();
471-
await bookingsGetResponse2;
467+
await page.waitForResponse((response) => /\/api\/trpc\/bookings\/get.*/.test(response.url()));
472468

473469
await expect(page.locator('[data-testid="booking-item"]')).toHaveCount(0);
474470
});

apps/web/playwright/fixtures/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ export async function login(
10441044
const signInLocator = loginLocator.locator('[type="submit"]');
10451045

10461046
//login
1047-
await page.goto("/auth/login");
1047+
await page.goto("/");
10481048
await page.waitForSelector("text=Welcome back");
10491049

10501050
await emailLocator.fill(user.email ?? `${user.username}@example.com`);

apps/web/playwright/organization/booking.e2e.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,9 @@ test.describe("Bookings", () => {
431431

432432
// Cancel the booking
433433
await page.goto(`/booking/${bookingUid}`);
434-
await page.waitForLoadState("networkidle");
435434
await page.getByTestId("cancel").click();
436-
await submitAndWaitForResponse(page, "/api/cancel", {
437-
action: () => page.locator('[data-testid="confirm_cancel"]').click(),
438-
});
435+
await page.getByTestId("confirm_cancel").click();
436+
await page.waitForResponse((response) => response.url().includes("/api/cancel"));
439437

440438
// Logout and go back to booking page
441439
await page.goto("/auth/logout");

0 commit comments

Comments
 (0)