Skip to content

Scheduling infrastructure for absolutely everyone.

E2E fixes (#1858)

Omar Lópezf0eed8ad3053
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 5079c2e9a4f..9319bf49c8b 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -72,9 +72,6 @@ jobs:
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- run: yarn
- - run: yarn db-deploy
- - run: yarn test
-
- name: Cache playwright binaries
uses: actions/cache@v2
id: playwright-cache
@@ -84,10 +81,11 @@ jobs:
~/.cache/ms-playwright
**/node_modules/playwright
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
+
- name: Install playwright deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: yarn playwright install --with-deps
- - run: yarn test-playwright
+ - run: yarn test-e2e
- name: Upload videos
if: ${{ always() }}
diff --git a/README.md b/README.md
index df939fc4cd0..6740a342a2d 100644
--- a/README.md
+++ b/README.md
@@ -190,7 +190,7 @@ yarn dx
# In first terminal
yarn dx
# In second terminal
-yarn workspace @calcom/web test-playwright
+yarn workspace @calcom/web test-e2e
# To open last HTML report run:
yarn workspace @calcom/web playwright-report
diff --git a/apps/web/package.json b/apps/web/package.json
index 21a9c4ea483..48037697791 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -18,7 +18,7 @@
"deploy": "run-s build db-deploy",
"dx": "env-cmd run-s db-setup dev",
"test": "jest",
- "test-playwright": "playwright test",
+ "test-e2e": "cd ../.. && yarn playwright test",
"playwright-report": "playwright show-report playwright/reports/playwright-html-report",
"test-codegen": "yarn playwright codegen http://localhost:3000",
"type-check": "tsc --pretty --noEmit",
diff --git a/package.json b/package.json
index 82a7c4af1ae..f3be640d9c6 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"start": "turbo run start",
"test": "turbo run test",
"test-playwright": "yarn playwright test",
+ "test-e2e": "turbo run test-e2e",
"type-check": "turbo run type-check"
},
"devDependencies": {
diff --git a/playwright.config.ts b/playwright.config.ts
index bed5d0cfb0b..cfea12f0dc8 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -24,7 +24,7 @@ const config: PlaywrightTestConfig = {
globalSetup: require.resolve("./apps/web/playwright/lib/globalSetup"),
outputDir: "./playwright/results",
webServer: {
- command: "yarn start --scope=@calcom/web",
+ command: "yarn workspace @calcom/web start",
port: 3000,
timeout: 60_000,
reuseExistingServer: !process.env.CI,
diff --git a/turbo.json b/turbo.json
index 736d10b3b79..021f394fb1d 100644
--- a/turbo.json
+++ b/turbo.json
@@ -1,7 +1,7 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
- "globalDependencies": ["apps/web/.env"],
+ "globalDependencies": ["apps/web/.env", "packages/prisma/.env"],
"pipeline": {
"@calcom/web#db-deploy": {},
"@calcom/web#db-seed": {
@@ -75,6 +75,9 @@
"test": {
"dependsOn": ["@calcom/web#build", "@calcom/web#db-seed"]
},
+ "test-e2e": {
+ "dependsOn": ["^test"]
+ },
"type-check": {
"outputs": []
}