Updates: - vite: 4.5.3→4.5.14, 5.4.6→5.4.21 - nodemailer: 6.7.8→7.0.11 - @playwright/test: 1.45.3→1.55.1 - next-auth: 4.22.1→4.24.13 - class-validator: 0.14.0→0.14.3 - dompurify: 3.2.3→3.3.1 Includes type fixes for next-auth adapter compatibility
68 lines
2.3 KiB
TypeScript
68 lines
2.3 KiB
TypeScript
import { expect } from "@playwright/test";
|
|
|
|
import { getEmbedIframe } from "@calcom/embed-core/playwright/lib/testUtils";
|
|
|
|
import { test } from "@calcom/web/playwright/lib/fixtures";
|
|
|
|
test.describe("React Embed", () => {
|
|
test.describe("Inline", () => {
|
|
test("should verify that the iframe got created with correct URL - namespaced", async ({
|
|
page,
|
|
embeds,
|
|
}) => {
|
|
const calNamespace = "inline";
|
|
await embeds.gotoPlayground({ url: "/inline.html", calNamespace });
|
|
const embedIframe = await getEmbedIframe({ calNamespace, page, pathname: "/pro" });
|
|
await expect(embedIframe).toBeEmbedCalLink(calNamespace, embeds.getActionFiredDetails, {
|
|
pathname: "/pro",
|
|
searchParams: {
|
|
theme: "dark",
|
|
},
|
|
});
|
|
// expect(await page.screenshot()).toMatchSnapshot("react-component-inline.png");
|
|
});
|
|
});
|
|
|
|
test.describe("Floating button Popup", () => {
|
|
test("should verify that the iframe got created with correct URL - namespaced", async ({
|
|
page,
|
|
embeds,
|
|
}) => {
|
|
const calNamespace = "floating";
|
|
await page.waitForLoadState();
|
|
await embeds.gotoPlayground({ url: "/floating.html", calNamespace });
|
|
|
|
await page.click("text=Book my Cal");
|
|
|
|
const embedIframe = await getEmbedIframe({ calNamespace, page, pathname: "/pro" });
|
|
await expect(embedIframe).toBeEmbedCalLink(calNamespace, embeds.getActionFiredDetails, {
|
|
pathname: "/pro",
|
|
searchParams: {
|
|
theme: "dark",
|
|
},
|
|
});
|
|
});
|
|
});
|
|
|
|
// TODO: This test is extremely flaky and has been failing a lot, blocking many PRs. Fix this.
|
|
test.describe.skip("Element Click Popup", () => {
|
|
test("should verify that the iframe got created with correct URL - namespaced", async ({
|
|
page,
|
|
embeds,
|
|
}) => {
|
|
const calNamespace = "element-click";
|
|
await embeds.gotoPlayground({ url: "/element-click.html", calNamespace });
|
|
await page.waitForLoadState();
|
|
await page.click("text=Click me");
|
|
|
|
const embedIframe = await getEmbedIframe({ calNamespace, page, pathname: "/pro" });
|
|
await expect(embedIframe).toBeEmbedCalLink(calNamespace, embeds.getActionFiredDetails, {
|
|
pathname: "/pro",
|
|
searchParams: {
|
|
theme: "dark",
|
|
},
|
|
});
|
|
});
|
|
});
|
|
});
|