E2E fix attempt (#1845)

* E2E fix attemp

* Moves playwright config to root

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
pull/1842/head
Omar López 2022-02-14 15:23:33 -07:00 committed by GitHub
parent 2f892a9ec5
commit 79f9bf6d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -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() }}

View File

@ -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": {

View File

@ -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"] },
},
/* {