2022-04-25 04:33:00 +00:00
|
|
|
import { expect } from "@playwright/test";
|
|
|
|
|
|
|
|
import { getEmbedIframe } from "@calcom/embed-core/playwright/lib/testUtils";
|
2023-03-15 22:01:04 +00:00
|
|
|
import { test } from "@calcom/web/playwright/lib/fixtures";
|
2023-06-26 13:27:24 +00:00
|
|
|
import { testBothBookers } from "@calcom/web/playwright/lib/new-booker";
|
2022-04-25 04:33:00 +00:00
|
|
|
|
2023-06-26 13:27:24 +00:00
|
|
|
testBothBookers.describe("Inline Embed", () => {
|
2023-06-01 20:41:30 +00:00
|
|
|
test("should verify that the iframe got created with correct URL", async ({
|
|
|
|
page,
|
|
|
|
getActionFiredDetails,
|
|
|
|
addEmbedListeners,
|
|
|
|
}) => {
|
|
|
|
//TODO: Do it with page.goto automatically
|
|
|
|
await addEmbedListeners("");
|
|
|
|
await page.goto("/");
|
2023-06-06 23:52:13 +00:00
|
|
|
const calNamespace = "";
|
|
|
|
const embedIframe = await getEmbedIframe({ calNamespace, page, pathname: "/pro" });
|
2023-06-01 20:41:30 +00:00
|
|
|
expect(embedIframe).toBeEmbedCalLink("", getActionFiredDetails, {
|
|
|
|
pathname: "/pro",
|
|
|
|
searchParams: {
|
|
|
|
theme: "dark",
|
|
|
|
},
|
|
|
|
});
|
|
|
|
// expect(await page.screenshot()).toMatchSnapshot("react-component-inline.png");
|
2022-04-25 04:33:00 +00:00
|
|
|
});
|
|
|
|
});
|