Scheduling infrastructure for absolutely everyone.
ci: Fix fetch() error, improvements to booking-seats test (#9203)
Alex van Andel9b9defc0f1ae
diff --git a/apps/web/playwright/booking-seats.e2e.ts b/apps/web/playwright/booking-seats.e2e.tsindex f4ae4bb2e4d..6cb8918e0ee 100644--- a/apps/web/playwright/booking-seats.e2e.ts+++ b/apps/web/playwright/booking-seats.e2e.ts@@ -99,372 +99,367 @@ testBothBookers.describe("Booking with Seats", (bookerVariant) => {// todo("Attendee #1 should be able to reschedule his booking");// TODO: Make E2E test: All attendees canceling should delete the booking for the User// todo("All attendees canceling should delete the booking for the User");+});- testBothBookers.describe("Reschedule for booking with seats", () => {- test("Should reschedule booking with seats", async ({ page, users, bookings }) => {- const { booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [- { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },- { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },- { name: "John Third", email: "[email protected]", timeZone: "Europe/Berlin" },- ]);- const bookingAttendees = await prisma.attendee.findMany({- where: { bookingId: booking.id },- select: {- id: true,- },- });+testBothBookers.describe("Reschedule for booking with seats", () => {+ test("Should reschedule booking with seats", async ({ page, users, bookings }) => {+ const { booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [+ { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },+ { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },+ { name: "John Third", email: "[email protected]", timeZone: "Europe/Berlin" },+ ]);+ const bookingAttendees = await prisma.attendee.findMany({+ where: { bookingId: booking.id },+ select: {+ id: true,+ },+ });- const bookingSeats = [- { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },- { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },- { bookingId: booking.id, attendeeId: bookingAttendees[2].id, referenceUid: uuidv4() },- ];+ const bookingSeats = [+ { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },+ { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },+ { bookingId: booking.id, attendeeId: bookingAttendees[2].id, referenceUid: uuidv4() },+ ];- await prisma.bookingSeat.createMany({- data: bookingSeats,- });+ await prisma.bookingSeat.createMany({+ data: bookingSeats,+ });- const references = await prisma.bookingSeat.findMany({- where: { bookingId: booking.id },- });+ const references = await prisma.bookingSeat.findMany({+ where: { bookingId: booking.id },+ });- await page.goto(`/reschedule/${references[2].referenceUid}`);+ await page.goto(`/reschedule/${references[2].referenceUid}`);- await selectFirstAvailableTimeSlotNextMonth(page);+ await selectFirstAvailableTimeSlotNextMonth(page);- // expect input to be filled with attendee number 3 data- const thirdAttendeeElement = await page.locator("input[name=name]");- const attendeeName = await thirdAttendeeElement.inputValue();- expect(attendeeName).toBe("John Third");+ // expect input to be filled with attendee number 3 data+ const thirdAttendeeElement = await page.locator("input[name=name]");+ const attendeeName = await thirdAttendeeElement.inputValue();+ expect(attendeeName).toBe("John Third");- await page.locator('[data-testid="confirm-reschedule-button"]').click();+ await page.locator('[data-testid="confirm-reschedule-button"]').click();- await page.waitForLoadState("networkidle");+ await page.waitForLoadState("networkidle");- await expect(page).toHaveURL(/.*booking/);+ await expect(page).toHaveURL(/.*booking/);- // Should expect old booking to be accepted with two attendees- const oldBooking = await prisma.booking.findFirst({- where: { uid: booking.uid },- include: { seatsReferences: true, attendees: true },- });+ // Should expect old booking to be accepted with two attendees+ const oldBooking = await prisma.booking.findFirst({+ where: { uid: booking.uid },+ include: { seatsReferences: true, attendees: true },+ });- expect(oldBooking?.status).toBe(BookingStatus.ACCEPTED);- expect(oldBooking?.attendees.length).toBe(2);- expect(oldBooking?.seatsReferences.length).toBe(2);+ expect(oldBooking?.status).toBe(BookingStatus.ACCEPTED);+ expect(oldBooking?.attendees.length).toBe(2);+ expect(oldBooking?.seatsReferences.length).toBe(2);+ });++ test("Should reschedule booking with seats and if everyone rescheduled it should be deleted", async ({+ page,+ users,+ bookings,+ }) => {+ const { booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [+ { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },+ { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },+ ]);++ const bookingAttendees = await prisma.attendee.findMany({+ where: { bookingId: booking.id },+ select: {+ id: true,+ },});- // FIXME: https://github.com/calcom/cal.com/issues/9193- test.fixme(- "Should reschedule booking with seats and if everyone rescheduled it should be deleted",- async ({ page, users, bookings }) => {- const { booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [- { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },- { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },- ]);+ const bookingSeats = [+ { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },+ { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },+ ];- const bookingAttendees = await prisma.attendee.findMany({- where: { bookingId: booking.id },- select: {- id: true,- },- });+ await prisma.bookingSeat.createMany({+ data: bookingSeats,+ });- const bookingSeats = [- { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },- { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },- ];+ const references = await prisma.bookingSeat.findMany({+ where: { bookingId: booking.id },+ });- await prisma.bookingSeat.createMany({- data: bookingSeats,- });+ await page.goto(`/reschedule/${references[0].referenceUid}`);- const references = await prisma.bookingSeat.findMany({- where: { bookingId: booking.id },- });+ await selectFirstAvailableTimeSlotNextMonth(page);- await page.goto(`/reschedule/${references[0].referenceUid}`);+ await page.locator('[data-testid="confirm-reschedule-button"]').click();- await selectFirstAvailableTimeSlotNextMonth(page);+ await page.waitForURL(/.*booking/);- await page.locator('[data-testid="confirm-reschedule-button"]').click();+ await page.goto(`/reschedule/${references[1].referenceUid}`);- await page.waitForURL(/.*booking/);+ await selectFirstAvailableTimeSlotNextMonth(page);- await page.goto(`/reschedule/${references[1].referenceUid}`);+ await page.locator('[data-testid="confirm-reschedule-button"]').click();- await selectFirstAvailableTimeSlotNextMonth(page);+ // Using waitForUrl here fails the assertion `expect(oldBooking?.status).toBe(BookingStatus.CANCELLED);` probably because waitForUrl is considered complete before waitForNavigation and till that time the booking is not cancelled+ await page.waitForNavigation({ url: /.*booking/ });- await page.locator('[data-testid="confirm-reschedule-button"]').click();+ // Should expect old booking to be cancelled+ const oldBooking = await prisma.booking.findFirst({+ where: { uid: booking.uid },+ include: {+ seatsReferences: true,+ attendees: true,+ eventType: {+ include: { users: true, hosts: true },+ },+ },+ });- // Using waitForUrl here fails the assertion `expect(oldBooking?.status).toBe(BookingStatus.CANCELLED);` probably because waitForUrl is considered complete before waitForNavigation and till that time the booking is not cancelled- await page.waitForNavigation({ url: /.*booking/ });+ expect(oldBooking?.status).toBe(BookingStatus.CANCELLED);+ });- // Should expect old booking to be cancelled- const oldBooking = await prisma.booking.findFirst({- where: { uid: booking.uid },- include: {- seatsReferences: true,- attendees: true,- eventType: {- include: { users: true, hosts: true },- },- },- });+ test("Should cancel with seats and have no attendees and cancelled", async ({ page, users, bookings }) => {+ const { user, booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [+ { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },+ { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },+ ]);+ await user.login();- expect(oldBooking?.status).toBe(BookingStatus.CANCELLED);- }- );+ const oldBooking = await prisma.booking.findFirst({+ where: { uid: booking.uid },+ include: { seatsReferences: true, attendees: true },+ });- test("Should cancel with seats and have no attendees and cancelled", async ({- page,- users,- bookings,- }) => {- const { user, booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [- { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },- { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },- ]);- await user.login();-- const oldBooking = await prisma.booking.findFirst({- where: { uid: booking.uid },- include: { seatsReferences: true, attendees: true },- });+ const bookingAttendees = await prisma.attendee.findMany({+ where: { bookingId: booking.id },+ select: {+ id: true,+ },+ });- const bookingAttendees = await prisma.attendee.findMany({- where: { bookingId: booking.id },- select: {- id: true,- },- });+ const bookingSeats = [+ { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },+ { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },+ ];- const bookingSeats = [- { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },- { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },- ];+ await prisma.bookingSeat.createMany({+ data: bookingSeats,+ });- await prisma.bookingSeat.createMany({- data: bookingSeats,- });+ // Now we cancel the booking as the organizer+ await page.goto(`/booking/${booking.uid}?cancel=true`);- // Now we cancel the booking as the organizer- await page.goto(`/booking/${booking.uid}?cancel=true`);+ await page.locator('[data-testid="cancel"]').click();- await page.locator('[data-testid="cancel"]').click();+ await page.waitForLoadState("networkidle");- await page.waitForLoadState("networkidle");+ await expect(page).toHaveURL(/.*booking/);- await expect(page).toHaveURL(/.*booking/);+ // Should expect old booking to be cancelled+ const updatedBooking = await prisma.booking.findFirst({+ where: { uid: booking.uid },+ include: { seatsReferences: true, attendees: true },+ });- // Should expect old booking to be cancelled- const updatedBooking = await prisma.booking.findFirst({- where: { uid: booking.uid },- include: { seatsReferences: true, attendees: true },- });+ expect(oldBooking?.startTime).not.toBe(updatedBooking?.startTime);+ });- expect(oldBooking?.startTime).not.toBe(updatedBooking?.startTime);+ test("If rescheduled/cancelled booking with seats it should display the correct number of seats", async ({+ page,+ users,+ bookings,+ }) => {+ const { booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [+ { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },+ { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },+ ]);++ const bookingAttendees = await prisma.attendee.findMany({+ where: { bookingId: booking.id },+ select: {+ id: true,+ },});- test("If rescheduled/cancelled booking with seats it should display the correct number of seats", async ({- page,- users,- bookings,- }) => {- const { booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [- { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },- { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },- ]);-- const bookingAttendees = await prisma.attendee.findMany({- where: { bookingId: booking.id },- select: {- id: true,- },- });+ const bookingSeats = [+ { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },+ { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },+ ];- const bookingSeats = [- { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },- { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },- ];+ await prisma.bookingSeat.createMany({+ data: bookingSeats,+ });- await prisma.bookingSeat.createMany({- data: bookingSeats,- });+ const references = await prisma.bookingSeat.findMany({+ where: { bookingId: booking.id },+ });- const references = await prisma.bookingSeat.findMany({- where: { bookingId: booking.id },- });+ await page.goto(+ `/booking/${references[0].referenceUid}?cancel=true&seatReferenceUid=${references[0].referenceUid}`+ );- await page.goto(- `/booking/${references[0].referenceUid}?cancel=true&seatReferenceUid=${references[0].referenceUid}`- );+ await page.locator('[data-testid="cancel"]').click();- await page.locator('[data-testid="cancel"]').click();+ const oldBooking = await prisma.booking.findFirst({+ where: { uid: booking.uid },+ select: {+ id: true,+ status: true,+ },+ });- const oldBooking = await prisma.booking.findFirst({- where: { uid: booking.uid },- select: {- id: true,- status: true,- },- });+ expect(oldBooking?.status).toBe(BookingStatus.ACCEPTED);- expect(oldBooking?.status).toBe(BookingStatus.ACCEPTED);+ await page.goto(`/reschedule/${references[1].referenceUid}`);- await page.goto(`/reschedule/${references[1].referenceUid}`);+ await page.click('[data-testid="incrementMonth"]');- await page.click('[data-testid="incrementMonth"]');+ await page.locator('[data-testid="day"][data-disabled="false"]').nth(1).click();- await page.locator('[data-testid="day"][data-disabled="false"]').nth(1).click();+ // Validate that the number of seats its 10+ expect(await page.locator("text=9 / 10 Seats available").count()).toEqual(0);+ });++ test("Should cancel with seats but event should be still accesible and with one less attendee/seat", async ({+ page,+ users,+ bookings,+ }) => {+ const { user, booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [+ { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },+ { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },+ ]);+ await user.login();- // Validate that the number of seats its 10- expect(await page.locator("text=9 / 10 Seats available").count()).toEqual(0);+ const bookingAttendees = await prisma.attendee.findMany({+ where: { bookingId: booking.id },+ select: {+ id: true,+ },});- test("Should cancel with seats but event should be still accesible and with one less attendee/seat", async ({- page,- users,- bookings,- }) => {- const { user, booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [- { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },- { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },- ]);- await user.login();-- const bookingAttendees = await prisma.attendee.findMany({- where: { bookingId: booking.id },- select: {- id: true,- },- });+ const bookingSeats = [+ { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },+ { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },+ ];- const bookingSeats = [- { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },- { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },- ];+ await prisma.bookingSeat.createMany({+ data: bookingSeats,+ });- await prisma.bookingSeat.createMany({- data: bookingSeats,- });+ // Now we cancel the booking as the first attendee+ // booking/${bookingUid}?cancel=true&allRemainingBookings=false&seatReferenceUid={bookingSeat.referenceUid}+ await page.goto(+ `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[0].referenceUid}`+ );- // Now we cancel the booking as the first attendee- // booking/${bookingUid}?cancel=true&allRemainingBookings=false&seatReferenceUid={bookingSeat.referenceUid}- await page.goto(- `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[0].referenceUid}`- );+ await page.locator('[data-testid="cancel"]').click();- await page.locator('[data-testid="cancel"]').click();+ await page.waitForLoadState("networkidle");- await page.waitForLoadState("networkidle");+ await expect(page).toHaveURL(/.*booking/);- await expect(page).toHaveURL(/.*booking/);+ await page.goto(+ `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[1].referenceUid}`+ );- await page.goto(- `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[1].referenceUid}`- );+ // Page should not be 404+ await page.locator('[data-testid="cancel"]').click();- // Page should not be 404- await page.locator('[data-testid="cancel"]').click();+ await page.waitForLoadState("networkidle");- await page.waitForLoadState("networkidle");+ await expect(page).toHaveURL(/.*booking/);+ });- await expect(page).toHaveURL(/.*booking/);+ test("Should book with seats and hide attendees info from showAttendees true", async ({+ page,+ users,+ bookings,+ }) => {+ const { user, booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [+ { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },+ { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },+ ]);+ await user.login();+ const bookingWithEventType = await prisma.booking.findFirst({+ where: { uid: booking.uid },+ select: {+ id: true,+ eventTypeId: true,+ },});- test("Should book with seats and hide attendees info from showAttendees true", async ({- page,- users,- bookings,- }) => {- const { user, booking } = await createUserWithSeatedEventAndAttendees({ users, bookings }, [- { name: "John First", email: "[email protected]", timeZone: "Europe/Berlin" },- { name: "Jane Second", email: "[email protected]", timeZone: "Europe/Berlin" },- ]);- await user.login();- const bookingWithEventType = await prisma.booking.findFirst({- where: { uid: booking.uid },- select: {- id: true,- eventTypeId: true,- },- });+ await prisma.eventType.update({+ data: {+ seatsShowAttendees: false,+ },+ where: {+ id: bookingWithEventType?.eventTypeId || -1,+ },+ });- await prisma.eventType.update({- data: {- seatsShowAttendees: false,- },- where: {- id: bookingWithEventType?.eventTypeId || -1,- },- });+ const bookingAttendees = await prisma.attendee.findMany({+ where: { bookingId: booking.id },+ select: {+ id: true,+ },+ });- const bookingAttendees = await prisma.attendee.findMany({- where: { bookingId: booking.id },- select: {- id: true,- },- });+ const bookingSeats = [+ { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },+ { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },+ ];- const bookingSeats = [- { bookingId: booking.id, attendeeId: bookingAttendees[0].id, referenceUid: uuidv4() },- { bookingId: booking.id, attendeeId: bookingAttendees[1].id, referenceUid: uuidv4() },- ];+ await prisma.bookingSeat.createMany({+ data: bookingSeats,+ });- await prisma.bookingSeat.createMany({- data: bookingSeats,- });+ // Go to cancel page and see that attendees are listed and myself as I'm owner of the booking+ await page.goto(`/booking/${booking.uid}?cancel=true&allRemainingBookings=false`);- // Go to cancel page and see that attendees are listed and myself as I'm owner of the booking- await page.goto(`/booking/${booking.uid}?cancel=true&allRemainingBookings=false`);-- const foundFirstAttendeeAsOwner = await page.locator(- 'p[data-testid="[email protected]"]'- );- await expect(foundFirstAttendeeAsOwner).toHaveCount(1);- const foundSecondAttendeeAsOwner = await page.locator(- 'p[data-testid="[email protected]"]'- );- await expect(foundSecondAttendeeAsOwner).toHaveCount(1);- await page.goto("auth/logout");-- // Now we cancel the booking as the first attendee- // booking/${bookingUid}?cancel=true&allRemainingBookings=false&seatReferenceUid={bookingSeat.referenceUid}- await page.goto(- `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[0].referenceUid}`- );-- // No attendees should be displayed only the one that it's cancelling- const notFoundSecondAttendee = await page.locator(- 'p[data-testid="[email protected]"]'- );-- await expect(notFoundSecondAttendee).toHaveCount(0);- const foundFirstAttendee = await page.locator('p[data-testid="[email protected]"]');- await expect(foundFirstAttendee).toHaveCount(1);-- await prisma.eventType.update({- data: {- seatsShowAttendees: true,- },- where: {- id: bookingWithEventType?.eventTypeId || -1,- },- });+ const foundFirstAttendeeAsOwner = await page.locator(+ 'p[data-testid="[email protected]"]'+ );+ await expect(foundFirstAttendeeAsOwner).toHaveCount(1);+ const foundSecondAttendeeAsOwner = await page.locator(+ 'p[data-testid="[email protected]"]'+ );+ await expect(foundSecondAttendeeAsOwner).toHaveCount(1);++ await page.goto("auth/logout");- await page.goto(- `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[1].referenceUid}`- );+ // Now we cancel the booking as the first attendee+ // booking/${bookingUid}?cancel=true&allRemainingBookings=false&seatReferenceUid={bookingSeat.referenceUid}+ await page.goto(+ `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[0].referenceUid}`+ );++ // No attendees should be displayed only the one that it's cancelling+ const notFoundSecondAttendee = await page.locator('p[data-testid="[email protected]"]');- // Now attendees should be displayed- const foundSecondAttendee = await page.locator('p[data-testid="[email protected]"]');+ await expect(notFoundSecondAttendee).toHaveCount(0);+ const foundFirstAttendee = await page.locator('p[data-testid="[email protected]"]');+ await expect(foundFirstAttendee).toHaveCount(1);- await expect(foundSecondAttendee).toHaveCount(1);- const foundFirstAttendeeAgain = await page- .locator('p[data-testid="[email protected]"]')- .first();- await expect(foundFirstAttendeeAgain).toHaveCount(1);+ await prisma.eventType.update({+ data: {+ seatsShowAttendees: true,+ },+ where: {+ id: bookingWithEventType?.eventTypeId || -1,+ },});++ await page.goto(+ `/booking/${booking.uid}?cancel=true&allRemainingBookings=false&seatReferenceUid=${bookingSeats[1].referenceUid}`+ );++ // Now attendees should be displayed+ const foundSecondAttendee = await page.locator('p[data-testid="[email protected]"]');++ await expect(foundSecondAttendee).toHaveCount(1);+ const foundFirstAttendeeAgain = await page+ .locator('p[data-testid="[email protected]"]')+ .first();+ await expect(foundFirstAttendeeAgain).toHaveCount(1);});});diff --git a/apps/web/playwright/embed-code-generator.e2e.ts b/apps/web/playwright/embed-code-generator.e2e.tsindex ab1a195bc74..12c2b437ec1 100644--- a/apps/web/playwright/embed-code-generator.e2e.ts+++ b/apps/web/playwright/embed-code-generator.e2e.ts@@ -178,7 +178,7 @@ test.describe("Embed Code Generator Tests", () => {test.beforeEach(async ({ page }) => {await page.goto(`/event-types`);await Promise.all([- page.locator('[href*="/event-types/"]').first().click(),+ page.locator('a[href*="/event-types/"]').first().click(),page.waitForURL((url) => url.pathname.startsWith("/event-types/")),]);});diff --git a/apps/web/playwright/login.e2e.ts b/apps/web/playwright/login.e2e.tsindex 83d37beec73..b914a2cc4a5 100644--- a/apps/web/playwright/login.e2e.ts+++ b/apps/web/playwright/login.e2e.ts@@ -35,11 +35,9 @@ test.describe("user can login & logout succesfully", async () => {const signOutBtn = await page.locator(`text=${signOutLabel}`);await signOutBtn.click();- // 2s of delay to assure the session is cleared- await page.waitForURL("/auth/logout");+ await page.locator('a[href="/auth/login"]').click();// Reroute to the home page to check if the login form shows up- await page.goto("/");await expect(page.locator(`[data-testid=login-form]`)).toBeVisible();});});diff --git a/playwright.config.ts b/playwright.config.tsindex 0b5b2487327..098076c60f2 100644--- a/playwright.config.ts+++ b/playwright.config.ts@@ -11,8 +11,8 @@ const outputDir = path.join(__dirname, "test-results");// Dev Server on local can be slow to start up and process requests. So, keep timeouts really high on local, so that tests run reliably locally// So, if not in CI, keep the timers high, if the test is stuck somewhere and there is unnecessary wait developer can see in browser that it's stuck-const DEFAULT_NAVIGATION_TIMEOUT = process.env.CI ? 15000 : 120000;-const DEFAULT_EXPECT_TIMEOUT = process.env.CI ? 15000 : 120000;+const DEFAULT_NAVIGATION_TIMEOUT = process.env.CI ? 30000 : 120000;+const DEFAULT_EXPECT_TIMEOUT = process.env.CI ? 30000 : 120000;// Test Timeout can hit due to slow expect, slow navigation.// So, it should me much higher than sum of expect and navigation timeouts as there can be many async expects and navigations in a single test@@ -25,7 +25,8 @@ const IS_EMBED_REACT_TEST = process.argv.some((a) => a.startsWith("--project=@caconst webServer: PlaywrightTestConfig["webServer"] = [{- command: "NEXT_PUBLIC_IS_E2E=1 yarn workspace @calcom/web start -p 3000",+ command:+ "NEXT_PUBLIC_IS_E2E=1 NODE_OPTIONS='--dns-result-order=ipv4first' yarn workspace @calcom/web start -p 3000",port: 3000,timeout: 60_000,reuseExistingServer: !process.env.CI,