E2E fixes (#1858)
parent
aee2d0dbba
commit
f0eed8ad30
|
@ -72,9 +72,6 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
turbo-${{ github.job }}-${{ github.ref_name }}-
|
turbo-${{ github.job }}-${{ github.ref_name }}-
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn db-deploy
|
|
||||||
- run: yarn test
|
|
||||||
|
|
||||||
- name: Cache playwright binaries
|
- name: Cache playwright binaries
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
id: playwright-cache
|
id: playwright-cache
|
||||||
|
@ -84,10 +81,11 @@ jobs:
|
||||||
~/.cache/ms-playwright
|
~/.cache/ms-playwright
|
||||||
**/node_modules/playwright
|
**/node_modules/playwright
|
||||||
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
|
||||||
- name: Install playwright deps
|
- name: Install playwright deps
|
||||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps
|
||||||
- run: yarn test-playwright
|
- run: yarn test-e2e
|
||||||
|
|
||||||
- name: Upload videos
|
- name: Upload videos
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
|
|
@ -190,7 +190,7 @@ yarn dx
|
||||||
# In first terminal
|
# In first terminal
|
||||||
yarn dx
|
yarn dx
|
||||||
# In second terminal
|
# In second terminal
|
||||||
yarn workspace @calcom/web test-playwright
|
yarn workspace @calcom/web test-e2e
|
||||||
|
|
||||||
# To open last HTML report run:
|
# To open last HTML report run:
|
||||||
yarn workspace @calcom/web playwright-report
|
yarn workspace @calcom/web playwright-report
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"deploy": "run-s build db-deploy",
|
"deploy": "run-s build db-deploy",
|
||||||
"dx": "env-cmd run-s db-setup dev",
|
"dx": "env-cmd run-s db-setup dev",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test-playwright": "playwright test",
|
"test-e2e": "cd ../.. && yarn playwright test",
|
||||||
"playwright-report": "playwright show-report playwright/reports/playwright-html-report",
|
"playwright-report": "playwright show-report playwright/reports/playwright-html-report",
|
||||||
"test-codegen": "yarn playwright codegen http://localhost:3000",
|
"test-codegen": "yarn playwright codegen http://localhost:3000",
|
||||||
"type-check": "tsc --pretty --noEmit",
|
"type-check": "tsc --pretty --noEmit",
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
"start": "turbo run start",
|
"start": "turbo run start",
|
||||||
"test": "turbo run test",
|
"test": "turbo run test",
|
||||||
"test-playwright": "yarn playwright test",
|
"test-playwright": "yarn playwright test",
|
||||||
|
"test-e2e": "turbo run test-e2e",
|
||||||
"type-check": "turbo run type-check"
|
"type-check": "turbo run type-check"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -24,7 +24,7 @@ const config: PlaywrightTestConfig = {
|
||||||
globalSetup: require.resolve("./apps/web/playwright/lib/globalSetup"),
|
globalSetup: require.resolve("./apps/web/playwright/lib/globalSetup"),
|
||||||
outputDir: "./playwright/results",
|
outputDir: "./playwright/results",
|
||||||
webServer: {
|
webServer: {
|
||||||
command: "yarn start --scope=@calcom/web",
|
command: "yarn workspace @calcom/web start",
|
||||||
port: 3000,
|
port: 3000,
|
||||||
timeout: 60_000,
|
timeout: 60_000,
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://turborepo.org/schema.json",
|
"$schema": "https://turborepo.org/schema.json",
|
||||||
"baseBranch": "origin/main",
|
"baseBranch": "origin/main",
|
||||||
"globalDependencies": ["apps/web/.env"],
|
"globalDependencies": ["apps/web/.env", "packages/prisma/.env"],
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
"@calcom/web#db-deploy": {},
|
"@calcom/web#db-deploy": {},
|
||||||
"@calcom/web#db-seed": {
|
"@calcom/web#db-seed": {
|
||||||
|
@ -75,6 +75,9 @@
|
||||||
"test": {
|
"test": {
|
||||||
"dependsOn": ["@calcom/web#build", "@calcom/web#db-seed"]
|
"dependsOn": ["@calcom/web#build", "@calcom/web#db-seed"]
|
||||||
},
|
},
|
||||||
|
"test-e2e": {
|
||||||
|
"dependsOn": ["^test"]
|
||||||
|
},
|
||||||
"type-check": {
|
"type-check": {
|
||||||
"outputs": []
|
"outputs": []
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue