chore: upgrades playwright to 1.45.3 (#16034)
This commit is contained in:
1 parent
45db5c0d5e
commit
a268d8743d
26 files changed
+72
-65
No files matched your search
@@ -144,7 +144,7 @@
|
||||
"@calcom/config": "*",
|
||||
"@calcom/types": "*",
|
||||
"@microsoft/microsoft-graph-types-beta": "0.15.0-preview",
|
||||
"@playwright/test": "^1.31.2",
|
||||
"@playwright/test": "^1.45.3",
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@types/accept-language-parser": "1.5.2",
|
||||
"@types/async": "^3.2.15",
|
||||
|
||||
@@ -6,7 +6,7 @@ import { randomString } from "@calcom/lib/random";
|
||||
import { SchedulingType } from "@calcom/prisma/client";
|
||||
import type { Schedule, TimeRange } from "@calcom/types/schedule";
|
||||
|
||||
import { test } from "./lib/fixtures";
|
||||
import { test, todo } from "./lib/fixtures";
|
||||
import { testBothFutureAndLegacyRoutes } from "./lib/future-legacy-routes";
|
||||
import {
|
||||
bookFirstEvent,
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
selectFirstAvailableTimeSlotNextMonth,
|
||||
testEmail,
|
||||
testName,
|
||||
todo,
|
||||
} from "./lib/testUtils";
|
||||
|
||||
const freeUserObj = { name: `Free-user-${randomString(3)}` };
|
||||
|
||||
@@ -5,7 +5,7 @@ import { test } from "./lib/fixtures";
|
||||
test.describe.configure({ mode: "parallel" });
|
||||
|
||||
test.describe("Users can impersonate", async () => {
|
||||
test.afterAll(async ({ users }) => {
|
||||
test.afterEach(async ({ users }) => {
|
||||
await users.deleteAll();
|
||||
});
|
||||
test("App Admin can impersonate users with impersonation enabled", async ({ page, users }) => {
|
||||
|
||||
@@ -61,7 +61,7 @@ const createTeamsAndMembership = async (userIdOne: number, userIdTwo: number) =>
|
||||
return { teamOne, teamTwo };
|
||||
};
|
||||
|
||||
test.afterAll(async ({ users }) => {
|
||||
test.afterEach(async ({ users }) => {
|
||||
await users.deleteAll();
|
||||
});
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import prisma from "@calcom/prisma";
|
||||
import { SchedulingType } from "@calcom/prisma/enums";
|
||||
import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
|
||||
|
||||
import { test } from "./lib/fixtures";
|
||||
import { test, todo } from "./lib/fixtures";
|
||||
import type { Fixtures } from "./lib/fixtures";
|
||||
import { todo, selectFirstAvailableTimeSlotNextMonth } from "./lib/testUtils";
|
||||
import { selectFirstAvailableTimeSlotNextMonth } from "./lib/testUtils";
|
||||
|
||||
test.describe.configure({ mode: "parallel" });
|
||||
test.afterEach(({ users }) => users.deleteAll());
|
||||
|
||||
@@ -7,8 +7,7 @@ import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
import { prisma } from "@calcom/prisma";
|
||||
|
||||
import { test } from "./lib/fixtures";
|
||||
import { todo } from "./lib/testUtils";
|
||||
import { test, todo } from "./lib/fixtures";
|
||||
|
||||
declare let global: {
|
||||
E2E_EMAILS?: ({ text: string } | Record<string, unknown>)[];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { test as base } from "@playwright/test";
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { noop } from "lodash";
|
||||
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
@@ -117,3 +119,8 @@ export const test = base.extend<Fixtures>({
|
||||
await use(webhooks);
|
||||
},
|
||||
});
|
||||
|
||||
export function todo(title: string) {
|
||||
// eslint-disable-next-line playwright/no-skipped-test
|
||||
test.skip(title, noop);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
/**
|
||||
* Simple utility to load JSON files from the file system. Needed to avoid certain errors with:
|
||||
* `TypeError: Module "*" needs an import attribute of type "json"`
|
||||
* @see https://stackoverflow.com/a/73747606
|
||||
*/
|
||||
export const loadJSON = (file: string) => JSON.parse(fs.readFileSync(path.join(__dirname, file)).toString());
|
||||
@@ -1,11 +1,10 @@
|
||||
import { expect } from "@playwright/test";
|
||||
import type { Frame, Page, Request as PlaywrightRequest } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
import { createHash } from "crypto";
|
||||
import EventEmitter from "events";
|
||||
import type { IncomingMessage, ServerResponse } from "http";
|
||||
import { createServer } from "http";
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { noop } from "lodash";
|
||||
import type { Messages } from "mailhog";
|
||||
import { totp } from "otplib";
|
||||
|
||||
@@ -15,12 +14,7 @@ import type { IntervalLimit } from "@calcom/types/Calendar";
|
||||
|
||||
import type { createEmailsFixture } from "../fixtures/emails";
|
||||
import type { Fixtures } from "./fixtures";
|
||||
import { test } from "./fixtures";
|
||||
|
||||
export function todo(title: string) {
|
||||
// eslint-disable-next-line playwright/no-skipped-test
|
||||
test.skip(title, noop);
|
||||
}
|
||||
import { loadJSON } from "./loadJSON";
|
||||
|
||||
type Request = IncomingMessage & { body?: unknown };
|
||||
type RequestHandlerOptions = { req: Request; res: ServerResponse };
|
||||
@@ -148,7 +142,7 @@ export const bookTimeSlot = async (page: Page, opts?: { name?: string; email?: s
|
||||
// Provide an standalone localize utility not managed by next-i18n
|
||||
export async function localize(locale: string) {
|
||||
const localeModule = `../../public/static/locales/${locale}/common.json`;
|
||||
const localeMap = await import(localeModule);
|
||||
const localeMap = loadJSON(localeModule);
|
||||
return (message: string) => {
|
||||
if (message in localeMap) return localeMap[message];
|
||||
throw "No locale found for the given entry message";
|
||||
|
||||
@@ -15,7 +15,7 @@ test.describe.configure({ mode: "parallel" });
|
||||
// a test to logout requires both a succesfull login as logout, to prevent
|
||||
// a doubling of tests failing on logout & logout, we can group them.
|
||||
test.describe("2FA Tests", async () => {
|
||||
test.afterAll(async ({ users }) => {
|
||||
test.afterEach(async ({ users }) => {
|
||||
await users.deleteAll();
|
||||
});
|
||||
test("should allow a user to enable 2FA and login using 2FA", async ({ page, users }) => {
|
||||
|
||||
@@ -10,7 +10,7 @@ test.describe.configure({ mode: "parallel" });
|
||||
// a test to logout requires both a succesfull login as logout, to prevent
|
||||
// a doubling of tests failing on logout & logout, we can group them.
|
||||
testBothFutureAndLegacyRoutes.describe("user can login & logout succesfully", async () => {
|
||||
test.afterAll(async ({ users }) => {
|
||||
test.afterEach(async ({ users }) => {
|
||||
await users.deleteAll();
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ testBothFutureAndLegacyRoutes.describe("user can login & logout succesfully", as
|
||||
});
|
||||
|
||||
testBothFutureAndLegacyRoutes.describe("Login and logout tests", () => {
|
||||
test.afterAll(async ({ users }) => {
|
||||
test.afterEach(async ({ users }) => {
|
||||
await users.deleteAll();
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
selectFirstAvailableTimeSlotNextMonth,
|
||||
} from "./lib/testUtils";
|
||||
|
||||
test.afterAll(({ users }) => users.deleteAll());
|
||||
test.afterEach(({ users }) => users.deleteAll());
|
||||
|
||||
test.describe("Managed Event Types", () => {
|
||||
test("Can create managed event type", async ({ page, users }) => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import prisma from "@calcom/prisma";
|
||||
|
||||
import { test } from "../../lib/fixtures";
|
||||
|
||||
test.afterAll(({ users }) => {
|
||||
test.afterEach(({ users }) => {
|
||||
users.deleteAll();
|
||||
});
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ export async function expectEmailVerificationEmailToBeSent(
|
||||
return expectEmailWithSubject(page, emails, userEmail, subject);
|
||||
}
|
||||
|
||||
test.afterAll(({ users, orgs }) => {
|
||||
test.afterEach(({ users, orgs }) => {
|
||||
users.deleteAll();
|
||||
orgs.deleteAll();
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ export {};
|
||||
// TODO: @sean - I can't run E2E locally - causing me a lot of pain to try and debug.
|
||||
// Will tackle in follow up once i reset my system.
|
||||
// test.describe("User can overlay their calendar", async () => {
|
||||
// test.afterAll(async ({ users }) => {
|
||||
// test.afterEach(async ({ users }) => {
|
||||
// await users.deleteAll();
|
||||
// });
|
||||
// test("Continue with Cal.com flow", async ({ page, users }) => {
|
||||
|
||||
@@ -14,7 +14,7 @@ test.describe("Signup Flow Test", async () => {
|
||||
test.beforeEach(async ({ features }) => {
|
||||
features.reset(); // This resets to the inital state not an empt yarray
|
||||
});
|
||||
test.afterAll(async ({ users }) => {
|
||||
test.afterEach(async ({ users }) => {
|
||||
await users.deleteAll();
|
||||
});
|
||||
test("Username is taken", async ({ page, users }) => {
|
||||
|
||||
@@ -4,14 +4,13 @@ import { IS_TEAM_BILLING_ENABLED } from "@calcom/lib/constants";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { SchedulingType } from "@calcom/prisma/enums";
|
||||
|
||||
import { test } from "./lib/fixtures";
|
||||
import { test, todo } from "./lib/fixtures";
|
||||
import { testBothFutureAndLegacyRoutes } from "./lib/future-legacy-routes";
|
||||
import {
|
||||
bookTimeSlot,
|
||||
fillStripeTestCheckout,
|
||||
selectFirstAvailableTimeSlotNextMonth,
|
||||
testName,
|
||||
todo,
|
||||
} from "./lib/testUtils";
|
||||
|
||||
test.describe.configure({ mode: "parallel" });
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { test } from "@playwright/test";
|
||||
|
||||
import { todo } from "./lib/testUtils";
|
||||
import { test, todo } from "./lib/fixtures";
|
||||
|
||||
test.describe("Trial account tests", () => {
|
||||
todo("Add tests with a TRIAL account");
|
||||
|
||||
@@ -10,7 +10,7 @@ const title = (name: string) => `${name} is unpublished`;
|
||||
const description = (entity: string) =>
|
||||
`This ${entity} link is currently not available. Please contact the ${entity} owner or ask them to publish it.`;
|
||||
|
||||
test.afterAll(async ({ users }) => {
|
||||
test.afterEach(async ({ users }) => {
|
||||
await users.deleteAll();
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.26.1",
|
||||
"@playwright/test": "^1.31.2",
|
||||
"@playwright/test": "^1.45.3",
|
||||
"@snaplet/copycat": "^4.1.0",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@types/jsdom": "^21.1.3",
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.31.2",
|
||||
"@playwright/test": "^1.45.3",
|
||||
"@vitejs/plugin-basic-ssl": "^1.1.0",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"npm-run-all": "^4.1.5",
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
import type { Page, Frame } from "@playwright/test";
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
export function todo(title: string) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function, playwright/no-skipped-test
|
||||
test.skip(title, () => {});
|
||||
}
|
||||
|
||||
export const deleteAllBookingsByEmail = async (email: string) =>
|
||||
await prisma.booking.deleteMany({
|
||||
where: {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
|
||||
import { test } from "@calcom/web/playwright/lib/fixtures";
|
||||
import { test, todo } from "@calcom/web/playwright/lib/fixtures";
|
||||
import type { Fixtures } from "@calcom/web/playwright/lib/fixtures";
|
||||
import { selectFirstAvailableTimeSlotNextMonth } from "@calcom/web/playwright/lib/testUtils";
|
||||
|
||||
import {
|
||||
todo,
|
||||
getEmbedIframe,
|
||||
bookFirstEvent,
|
||||
getBooking,
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { expect } from "@playwright/test";
|
||||
|
||||
import { test } from "@calcom/web/playwright/lib/fixtures";
|
||||
import { test, todo } from "@calcom/web/playwright/lib/fixtures";
|
||||
|
||||
import {
|
||||
assertNoRequestIsBlocked,
|
||||
bookFirstEvent,
|
||||
deleteAllBookingsByEmail,
|
||||
getEmbedIframe,
|
||||
todo,
|
||||
} from "../lib/testUtils";
|
||||
|
||||
test.describe("Inline Iframe", () => {
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.31.2",
|
||||
"@playwright/test": "^1.45.3",
|
||||
"@types/react": "18.0.26",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@vitejs/plugin-react": "^2.2.0",
|
||||
|
||||
@@ -4560,7 +4560,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@calcom/embed-core@workspace:packages/embeds/embed-core"
|
||||
dependencies:
|
||||
"@playwright/test": ^1.31.2
|
||||
"@playwright/test": ^1.45.3
|
||||
"@vitejs/plugin-basic-ssl": ^1.1.0
|
||||
autoprefixer: ^10.4.12
|
||||
npm-run-all: ^4.1.5
|
||||
@@ -4578,7 +4578,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@calcom/embed-core": "workspace:*"
|
||||
"@calcom/embed-snippet": "workspace:*"
|
||||
"@playwright/test": ^1.31.2
|
||||
"@playwright/test": ^1.45.3
|
||||
"@types/react": 18.0.26
|
||||
"@types/react-dom": ^18.0.9
|
||||
"@vitejs/plugin-react": ^2.2.0
|
||||
@@ -5533,7 +5533,7 @@ __metadata:
|
||||
"@microsoft/microsoft-graph-types-beta": 0.15.0-preview
|
||||
"@next-auth/prisma-adapter": ^1.0.4
|
||||
"@next/bundle-analyzer": ^13.1.6
|
||||
"@playwright/test": ^1.31.2
|
||||
"@playwright/test": ^1.45.3
|
||||
"@radix-ui/react-avatar": ^1.0.4
|
||||
"@radix-ui/react-collapsible": ^1.0.0
|
||||
"@radix-ui/react-dialog": ^1.0.4
|
||||
@@ -11164,19 +11164,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@playwright/test@npm:^1.31.2":
|
||||
version: 1.31.2
|
||||
resolution: "@playwright/test@npm:1.31.2"
|
||||
"@playwright/test@npm:^1.45.3":
|
||||
version: 1.45.3
|
||||
resolution: "@playwright/test@npm:1.45.3"
|
||||
dependencies:
|
||||
"@types/node": "*"
|
||||
fsevents: 2.3.2
|
||||
playwright-core: 1.31.2
|
||||
dependenciesMeta:
|
||||
fsevents:
|
||||
optional: true
|
||||
playwright: 1.45.3
|
||||
bin:
|
||||
playwright: cli.js
|
||||
checksum: 5459ee0ce15b9a54337f4c26e2ee2d29c11e67e6207c167158eb180a4bea6659c988a2897f51dbebf591fc879f0d81f417e70936b9d8a001448c957939882588
|
||||
checksum: 3e2c88d40f98cf94ab7947263804d1ee78c4bb21a35c8dbb64855eed5565ffc688509c5f07bda5438cba6c354374981448dcba3dbe326d1699b4fef75c9ce43d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -21394,7 +21389,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@changesets/cli": ^2.26.1
|
||||
"@daily-co/daily-js": ^0.59.0
|
||||
"@playwright/test": ^1.31.2
|
||||
"@playwright/test": ^1.45.3
|
||||
"@snaplet/copycat": ^4.1.0
|
||||
"@testing-library/jest-dom": ^5.16.5
|
||||
"@types/jsdom": ^21.1.3
|
||||
@@ -39178,12 +39173,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"playwright-core@npm:1.31.2":
|
||||
version: 1.31.2
|
||||
resolution: "playwright-core@npm:1.31.2"
|
||||
"playwright-core@npm:1.45.3":
|
||||
version: 1.45.3
|
||||
resolution: "playwright-core@npm:1.45.3"
|
||||
bin:
|
||||
playwright: cli.js
|
||||
checksum: bf1257b7d80b9d027c99cbfa7ab9d47a2110ec804422b3e3d623bbb3c43e06df7bec4764ca1d852a6d62c76e35c8776efb19941f42ce738db9bc92e7f1b6281c
|
||||
playwright-core: cli.js
|
||||
checksum: cecb58877b2c643403d7a72c24a7aa0fdd087a3c7f9a5ea5403851336ea831d8e304b1f159aacbbabd12e5c47eaac054333746c9e5431ec07b13d64dbf3b50ec
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -39196,6 +39191,21 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"playwright@npm:1.45.3":
|
||||
version: 1.45.3
|
||||
resolution: "playwright@npm:1.45.3"
|
||||
dependencies:
|
||||
fsevents: 2.3.2
|
||||
playwright-core: 1.45.3
|
||||
dependenciesMeta:
|
||||
fsevents:
|
||||
optional: true
|
||||
bin:
|
||||
playwright: cli.js
|
||||
checksum: d9d23b155ccd001553214f710561b01e48eb409676102f8ab94c0b4aa5ac5f398becc1a96528b0554944e07e34189503d891913e0e0a4aa58ad36b9c08747983
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pluralize@npm:8.0.0":
|
||||
version: 8.0.0
|
||||
resolution: "pluralize@npm:8.0.0"
|
||||
|
||||
Reference in new issue
Block a user