Files
calendar/packages/embeds/embed-core/playwright/tests/preview.e2e.ts
T
b364a85ed8 chore: removed old booker and make new booker as a default (#10053)
* removed old booker and make new booker as a default

* fixes merge conflict

* fixed tests

* fixed tests for old-booker

* fixed typo in @calcom/lib/defaultEvents.ts

---------

Co-authored-by: René Müller <rene.mueller@clicksports.de>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-07-11 13:31:55 +02:00

28 lines
708 B
TypeScript

import { expect } from "@playwright/test";
import { test } from "@calcom/web/playwright/lib/fixtures";
test.describe("Preview", () => {
test("Preview - embed-core should load", async ({ page }) => {
await page.goto("http://localhost:3000/embed/preview.html");
const libraryLoaded = await page.evaluate(() => {
return new Promise((resolve) => {
setInterval(() => {
if (
(
window as unknown as {
Cal: {
__css: string;
};
}
).Cal.__css
) {
resolve(true);
}
}, 1000);
});
});
expect(libraryLoaded).toBe(true);
});
});