fix: e2e tests flakes (#22415)

* fix: e2e flakes

* Update apps/web/playwright/dynamic-booking-pages.e2e.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Update delete-account.e2e.ts

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Anik Dhabal Babu
2025-07-11 16:45:06 +01:00
committed by GitHub
co-authored by cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
parent 18650b1215
commit 14e14289f0
6 changed files with 18 additions and 1 deletions
+4
View File
@@ -1,5 +1,9 @@
import { test } from "./lib/fixtures";
test.describe.configure({ mode: "parallel" });
test.afterEach(({ users }) => users.deleteAll());
test.describe("AppListCard", async () => {
test("should remove the highlight from the URL", async ({ page, users }) => {
const user = await users.create({});
@@ -2,6 +2,10 @@ import { expectPageToBeNotFound } from "playwright/lib/testUtils";
import { test } from "./lib/fixtures";
test.describe.configure({ mode: "parallel" });
test.afterEach(({ users }) => users.deleteAll());
test.describe("App Router - error handling", () => {
test("404s must render App Router's not-found page regardless of whether pages router or app router is used", async ({
page,
@@ -3,6 +3,8 @@ import { expect } from "@playwright/test";
import { test } from "../lib/fixtures";
import { submitAndWaitForResponse } from "../lib/testUtils";
test.describe.configure({ mode: "parallel" });
test.describe("Can signup from a team invite", async () => {
test.beforeEach(async ({ users }) => {
const proUser = await users.create();
@@ -6,6 +6,8 @@ import prisma from "@calcom/prisma";
import { test } from "../lib/fixtures";
test.describe.configure({ mode: "parallel" });
test.afterEach(({ users }) => users.deleteAll());
test.describe("Forgot password", async () => {
+4 -1
View File
@@ -461,10 +461,13 @@ test.describe("Bookings", () => {
await addFilter(page, "userId");
await openFilter(page, "userId");
const bookingsGetResponse2 = page.waitForResponse((response) =>
/\/api\/trpc\/bookings\/get.*/.test(response.url())
);
await page
.locator(`[data-testid="select-filter-options-userId"] [role="option"]:has-text("${anotherUser}")`)
.click();
await page.waitForResponse((response) => /\/api\/trpc\/bookings\/get.*/.test(response.url()));
await bookingsGetResponse2;
await expect(page.locator('[data-testid="booking-item"]')).toHaveCount(0);
});
@@ -19,6 +19,8 @@ test("dynamic booking", async ({ page, users }) => {
const free = await users.create({ username: "free.example" });
await page.goto(`/${pro.username}+${free.username}`);
//fix race condition
await page.locator('[data-testid="day"][data-disabled="false"]').nth(0).waitFor({ state: "visible" });
await test.step("book an event first day in next month", async () => {
await selectFirstAvailableTimeSlotNextMonth(page);