Fix @calcom/embed-react installation with TS project (#2870)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2022-05-27 09:37:02 -06:00
1 parent d6678f9b3a
commit 445cdd7cbf
41 files changed
+171 -107

No files matched your search

@@ -22,7 +22,8 @@ const config: PlaywrightTestConfig = {
expect: {
toMatchSnapshot: {
// Opacity transitions can cause small differences
maxDiffPixels: 50,
// Every month the rendered month changes failing the snapshot tests. So, increase the threshold to catch major bugs only.
maxDiffPixelRatio: 0.1,
},
},
webServer: {
@@ -123,7 +124,7 @@ expect.extend({
const searchParams = u.searchParams;
const expectedSearchParams = expectedUrlDetails.searchParams || {};
for (let [expectedKey, expectedValue] of Object.entries(expectedSearchParams)) {
for (const [expectedKey, expectedValue] of Object.entries(expectedSearchParams)) {
const value = searchParams.get(expectedKey);
if (value !== expectedValue) {
return {
@@ -36,7 +36,7 @@ export const getEmbedIframe = async ({ page, pathname }: { page: Page; pathname:
await new Promise((resolve) => {
setTimeout(resolve, 2000);
});
let embedIframe = page.frame("cal-embed");
const embedIframe = page.frame("cal-embed");
if (!embedIframe) {
return null;
}
@@ -83,7 +83,7 @@ export async function bookFirstEvent(username: string, frame: Frame, page: Page)
const responseObj = await response.json();
const bookingId = responseObj.uid;
// Make sure we're navigated to the success page
await expect(page.locator("[data-testid=success-page]")).toBeVisible();
await expect(frame.locator("[data-testid=success-page]")).toBeVisible();
expect(await page.screenshot()).toMatchSnapshot("success-page.png");
return bookingId;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 KiB

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 KiB

After

Width:  |  Height:  |  Size: 313 KiB