Scheduling infrastructure for absolutely everyone.
Make embed tests work with single playwright config (#7781)
Hariom Balhara470ef737b568
diff --git a/packages/embeds/embed-core/playwright/lib/testUtils.ts b/packages/embeds/embed-core/playwright/lib/testUtils.tsindex fb43ccde309..9ac134a6ac8 100644--- a/packages/embeds/embed-core/playwright/lib/testUtils.ts+++ b/packages/embeds/embed-core/playwright/lib/testUtils.ts@@ -84,7 +84,7 @@ async function selectFirstAvailableTimeSlotNextMonth(frame: Frame, page: Page) {// Waiting for full month incrementawait frame.waitForTimeout(1000);- expect(await page.screenshot()).toMatchSnapshot("availability-page-2.png");+ // expect(await page.screenshot()).toMatchSnapshot("availability-page-2.png");// TODO: Find out why the first day is always booked on testsawait frame.locator('[data-testid="day"][data-disabled="false"]').nth(1).click();await frame.click('[data-testid="time"]');@@ -104,7 +104,7 @@ export async function bookFirstEvent(username: string, frame: Frame, page: Page)// This doesn't seem to be replicable with the speed of a person, only during automation.// It would also allow correct snapshot to be taken for current month.await frame.waitForTimeout(1000);- expect(await page.screenshot()).toMatchSnapshot("availability-page-1.png");+ // expect(await page.screenshot()).toMatchSnapshot("availability-page-1.png");const eventSlug = new URL(frame.url()).pathname;await selectFirstAvailableTimeSlotNextMonth(frame, page);await frame.waitForNavigation({@@ -112,7 +112,7 @@ export async function bookFirstEvent(username: string, frame: Frame, page: Page)return url.pathname.includes(`/${username}/book`);},});- expect(await page.screenshot()).toMatchSnapshot("booking-page.png");+ // expect(await page.screenshot()).toMatchSnapshot("booking-page.png");// --- fill formawait frame.fill('[name="name"]', "Embed User");await frame.fill('[name="email"]', "[email protected]");@@ -123,7 +123,7 @@ export async function bookFirstEvent(username: string, frame: Frame, page: Page)// Make sure we're navigated to the success pageawait expect(frame.locator("[data-testid=success-page]")).toBeVisible();- expect(await page.screenshot()).toMatchSnapshot("success-page.png");+ // expect(await page.screenshot()).toMatchSnapshot("success-page.png");//NOTE: frame.click('body') won't work here. Because the way it works, it clicks on the center of the body tag which is an element inside the popup view and that won't close the popupawait frame.evaluate(() => {diff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts b/packages/embeds/embed-core/playwright/tests/action-based.test.tsindex 3a379d106bd..fc1bd21c24f 100644--- a/packages/embeds/embed-core/playwright/tests/action-based.test.ts+++ b/packages/embeds/embed-core/playwright/tests/action-based.test.ts@@ -68,7 +68,7 @@ test.describe("Popup Tests", () => {await expect(embedIframe).toBeEmbedCalLink(calNamespace, getActionFiredDetails, {pathname: "/free",});- expect(await page.screenshot()).toMatchSnapshot("event-types-list.png");+ // expect(await page.screenshot()).toMatchSnapshot("event-types-list.png");if (!embedIframe) {throw new Error("Embed iframe not found");}diff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-chromium-darwin.pngdeleted file mode 100644index 616f1bf22e8..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-firefox-darwin.pngdeleted file mode 100644index b6687691e6b..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-webkit-darwin.pngdeleted file mode 100644index 567dcce57d7..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-1-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-chromium-darwin.pngdeleted file mode 100644index 3f21d032878..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-firefox-darwin.pngdeleted file mode 100644index 5d09999970f..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-webkit-darwin.pngdeleted file mode 100644index 0fea7f25097..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/availability-page-2-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-chromium-darwin.pngdeleted file mode 100644index 9169df35f7f..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-firefox-darwin.pngdeleted file mode 100644index 1d6f6818793..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-webkit-darwin.pngdeleted file mode 100644index e9d5a177e5b..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/booking-page-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-chromium-darwin.pngdeleted file mode 100644index 6dc4e850d8a..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-firefox-darwin.pngdeleted file mode 100644index fe8ff45face..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-webkit-darwin.pngdeleted file mode 100644index ebf435da708..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/event-types-list-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-chromium-darwin.pngdeleted file mode 100644index b86767623d8..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-firefox-darwin.pngdeleted file mode 100644index 820d98eb3af..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-webkit-darwin.pngdeleted file mode 100644index 1cba6e2eac8..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/action-based.test.ts-snapshots/success-page-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.e2e.ts b/packages/embeds/embed-core/playwright/tests/inline.e2e.tsindex a553556f3fd..2c8de09aabb 100644--- a/packages/embeds/embed-core/playwright/tests/inline.e2e.ts+++ b/packages/embeds/embed-core/playwright/tests/inline.e2e.ts@@ -19,7 +19,7 @@ test("Inline Iframe - Configured with Dark Theme", async ({theme: "dark",},});- expect(await page.screenshot()).toMatchSnapshot("event-types-list.png");+ // expect(await page.screenshot()).toMatchSnapshot("event-types-list.png");if (!embedIframe) {throw new Error("Embed iframe not found");}diff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-chromium-darwin.pngdeleted file mode 100644index fba6e755687..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-firefox-darwin.pngdeleted file mode 100644index 3dcd23e1b8e..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-webkit-darwin.pngdeleted file mode 100644index dc81cfd0914..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-1-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-chromium-darwin.pngdeleted file mode 100644index 6eabee40ebe..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-firefox-darwin.pngdeleted file mode 100644index eda7dbe77e9..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-webkit-darwin.pngdeleted file mode 100644index 2fc6208e6bb..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/availability-page-2-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-chromium-darwin.pngdeleted file mode 100644index fd2bde81e4b..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-firefox-darwin.pngdeleted file mode 100644index b5d13a9aad7..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-webkit-darwin.pngdeleted file mode 100644index 66983c05aa3..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/booking-page-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-chromium-darwin.pngdeleted file mode 100644index 5d2f8988a43..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-firefox-darwin.pngdeleted file mode 100644index fe65656c5ad..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-webkit-darwin.pngdeleted file mode 100644index 9bc87974f4b..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/event-types-list-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-chromium-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-chromium-darwin.pngdeleted file mode 100644index 940b5402263..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-firefox-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-firefox-darwin.pngdeleted file mode 100644index 47b9b4b55e8..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-webkit-darwin.png b/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-webkit-darwin.pngdeleted file mode 100644index 5735e6c69c4..00000000000Binary files a/packages/embeds/embed-core/playwright/tests/inline.test.ts-snapshots/success-page-webkit-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-react/playwright/tests/basic.test.ts b/packages/embeds/embed-react/playwright/tests/basic.test.tsindex 1015b9f3641..952ca836a55 100644--- a/packages/embeds/embed-react/playwright/tests/basic.test.ts+++ b/packages/embeds/embed-react/playwright/tests/basic.test.ts@@ -14,5 +14,5 @@ test("Inline Usage Snapshot", async ({ page, getActionFiredDetails, addEmbedListtheme: "dark",},});- expect(await page.screenshot()).toMatchSnapshot("react-component-inline.png");+ // expect(await page.screenshot()).toMatchSnapshot("react-component-inline.png");});diff --git a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-chromium-darwin.png b/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-chromium-darwin.pngdeleted file mode 100644index d17880cf339..00000000000Binary files a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-chromium-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-darwin.png b/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-darwin.pngdeleted file mode 100644index d17880cf339..00000000000Binary files a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-firefox-darwin.png b/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-firefox-darwin.pngdeleted file mode 100644index a96682c6fd4..00000000000Binary files a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-firefox-darwin.png and /dev/null differdiff --git a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-webkit-darwin.png b/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-webkit-darwin.pngdeleted file mode 100644index e50464ce781..00000000000Binary files a/packages/embeds/embed-react/playwright/tests/basic.test.ts-snapshots/react-component-inline-webkit-darwin.png and /dev/null differdiff --git a/playwright.config.ts b/playwright.config.tsindex aae5b941ee6..0dc7bd6030e 100644--- a/playwright.config.ts+++ b/playwright.config.ts@@ -52,7 +52,7 @@ if (IS_EMBED_REACT_TEST) {const config: PlaywrightTestConfig = {forbidOnly: !!process.env.CI,- retries: 2,+ retries: process.env.CI ? 2 : 0,workers: os.cpus().length,timeout: DEFAULT_TEST_TIMEOUT,maxFailures: headless ? 10 : undefined,@@ -102,13 +102,13 @@ const config: PlaywrightTestConfig = {name: "@calcom/embed-core",testDir: "./packages/embeds/embed-core/",testMatch: /.*\.(e2e|test)\.tsx?/,- use: { ...devices["Desktop Chrome"] },+ use: { ...devices["Desktop Chrome"], baseURL: "http://localhost:3100/" },},{name: "@calcom/embed-react",testDir: "./packages/embeds/embed-react/",testMatch: /.*\.(e2e|test)\.tsx?/,- use: { ...devices["Desktop Chrome"] },+ use: { ...devices["Desktop Chrome"], baseURL: "http://localhost:3101/" },},{name: "@calcom/embed-core--firefox",