From 79f9bf6d5e265ef7752e2f7bf02047d8c51eb704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Mon, 14 Feb 2022 15:23:33 -0700 Subject: [PATCH] E2E fix attempt (#1845) * E2E fix attemp * Moves playwright config to root Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .github/workflows/e2e.yml | 2 +- package.json | 2 +- .../playwright.config.ts => playwright.config.ts | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) rename apps/web/playwright.config.ts => playwright.config.ts (81%) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 7d9c0ceccf..5079c2e9a4 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -87,7 +87,7 @@ jobs: - name: Install playwright deps if: steps.playwright-cache.outputs.cache-hit != 'true' run: yarn playwright install --with-deps - - run: yarn playwright test -c apps/web/playwright.config.ts + - run: yarn test-playwright - name: Upload videos if: ${{ always() }} diff --git a/package.json b/package.json index 8009f5c4bf..82a7c4af1a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "prepare": "husky install", "start": "turbo run start", "test": "turbo run test", - "test-playwright": "yarn playwright test -c apps/web/playwright.config.ts", + "test-playwright": "yarn playwright test", "type-check": "turbo run type-check" }, "devDependencies": { diff --git a/apps/web/playwright.config.ts b/playwright.config.ts similarity index 81% rename from apps/web/playwright.config.ts rename to playwright.config.ts index b1342fbea4..bed5d0cfb0 100644 --- a/apps/web/playwright.config.ts +++ b/playwright.config.ts @@ -7,23 +7,22 @@ import { addAliases } from "module-alias"; // https://stackoverflow.com/questions/69023682/typescript-playwright-error-cannot-find-module // https://github.com/microsoft/playwright/issues/7066#issuecomment-983984496 addAliases({ - "@components": __dirname + "/components", - "@lib": __dirname + "/lib", - "@server": __dirname + "/server", - "@ee": __dirname + "/ee", + "@components": __dirname + "/apps/web/components", + "@lib": __dirname + "/apps/web/lib", + "@server": __dirname + "/apps/web/server", + "@ee": __dirname + "/apps/web/ee", }); const config: PlaywrightTestConfig = { forbidOnly: !!process.env.CI, - testDir: "playwright", timeout: 60_000, reporter: [ [process.env.CI ? "github" : "list"], ["html", { outputFolder: "./playwright/reports/playwright-html-report", open: "never" }], ["junit", { outputFile: "./playwright/reports/results.xml" }], ], - globalSetup: require.resolve("./playwright/lib/globalSetup"), - outputDir: "playwright/results", + globalSetup: require.resolve("./apps/web/playwright/lib/globalSetup"), + outputDir: "./playwright/results", webServer: { command: "yarn start --scope=@calcom/web", port: 3000, @@ -39,6 +38,7 @@ const config: PlaywrightTestConfig = { projects: [ { name: "chromium", + testDir: "apps/web/playwright", use: { ...devices["Desktop Chrome"] }, }, /* {