test: embed e2e tests for mobile viewport and hideEventTypeDetails=true (#20445)

* test: embed e2e test

* update

* tweak

* Update fixtures.ts

* update

* something new

* Update playwright.config.ts
This commit is contained in:
Anik Dhabal Babu
2025-03-31 23:05:53 +01:00
committed by GitHub
parent f039e116d7
commit 63c9cb6b92
2 changed files with 27 additions and 0 deletions
@@ -274,6 +274,24 @@ test.describe("Popup Tests", () => {
pathname: configuredLink,
});
});
test("should open embed iframe on click - Configured with hide eventType details", async ({
page,
embeds,
}) => {
await deleteAllBookingsByEmail("embed-user@example.com");
const calNamespace = "popupHideEventTypeDetails";
await embeds.gotoPlayground({ calNamespace, url: "/" });
await page.click(`[data-cal-namespace="${calNamespace}"]`);
const embedIframe = await getEmbedIframe({ calNamespace, page, pathname: "/free/30min" });
await expect(embedIframe).toBeEmbedCalLink(calNamespace, embeds.getActionFiredDetails, {
pathname: "/free/30min",
});
});
});
async function expectPrerenderedIframe({
+9
View File
@@ -171,6 +171,15 @@ const config: PlaywrightTestConfig = {
},
use: { ...devices["Desktop Safari"] },
},
{
name: "@calcom/embed-core--isMobile",
testDir: "./packages/embeds/embed-core/",
testMatch: /.*\.e2e\.tsx?/,
expect: {
timeout: DEFAULT_EXPECT_TIMEOUT,
},
use: { ...devices["iPhone 13"] },
},
],
};