Fix conflicts for embed tests (#7311)

* Fix conflicts for embed tests

* Update pr.yml

---------

Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
Omar LópezandAlex van Andel authored and GitHub committed 2023-03-08 13:20:04 +00:00
1 parent 8a2da017ff
commit 8b47c064ff
6 files changed
+14 -6

No files matched your search

+1
View File
@@ -13,6 +13,7 @@
"type-check": "tsc --pretty --noEmit", "type-check": "tsc --pretty --noEmit",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"start:bg": "next start &",
"lint": "eslint . --ignore-path .gitignore", "lint": "eslint . --ignore-path .gitignore",
"lint:fix": "eslint . --ext .ts,.js,.tsx,.jsx --fix", "lint:fix": "eslint . --ext .ts,.js,.tsx,.jsx --fix",
"lint:report": "eslint . --format json --output-file ../../lint-results/web.json", "lint:report": "eslint . --format json --output-file ../../lint-results/web.json",
+2 -2
View File
@@ -14,13 +14,13 @@
"embed-dev": "yarn workspace @calcom/embed-core dev", "embed-dev": "yarn workspace @calcom/embed-core dev",
"embed-web-start": "yarn workspace @calcom/web start", "embed-web-start": "yarn workspace @calcom/web start",
"__build": "yarn tailwind && vite build && tsc --emitDeclarationOnly --declarationDir dist && cp -r ../../../apps/web/public/embed ./dist/", "__build": "yarn tailwind && vite build && tsc --emitDeclarationOnly --declarationDir dist && cp -r ../../../apps/web/public/embed ./dist/",
"__dev": "yarn tailwind && vite build --mode development", "__dev": "vite build --mode development",
"build": "NEXT_PUBLIC_EMBED_FINGER_PRINT=$(git rev-parse --short HEAD) yarn __build", "build": "NEXT_PUBLIC_EMBED_FINGER_PRINT=$(git rev-parse --short HEAD) yarn __build",
"build-preview": "PREVIEW_BUILD=1 yarn __build ", "build-preview": "PREVIEW_BUILD=1 yarn __build ",
"vite": "vite", "vite": "vite",
"tailwind": "yarn tailwindcss -i ./src/styles.css -o ./src/tailwind.generated.css", "tailwind": "yarn tailwindcss -i ./src/styles.css -o ./src/tailwind.generated.css",
"buildWatchAndServer": "run-p '__dev' 'vite --port 3100 --strict-port --open'", "buildWatchAndServer": "run-p '__dev' 'vite --port 3100 --strict-port --open'",
"dev": "yarn tailwind && run-p 'tailwind --watch' 'buildWatchAndServer'", "dev": "run-p 'tailwind --watch' 'buildWatchAndServer'",
"dev-real": "vite dev --port 3100", "dev-real": "vite dev --port 3100",
"type-check": "tsc --pretty --noEmit", "type-check": "tsc --pretty --noEmit",
"lint": "eslint --ext .ts,.js src", "lint": "eslint --ext .ts,.js src",
@@ -33,7 +33,7 @@ const config: PlaywrightTestConfig = {
}, },
webServer: { webServer: {
// Run servers in parallel as Playwright doesn't support two different webserver commands at the moment See https://github.com/microsoft/playwright/issues/8206 // Run servers in parallel as Playwright doesn't support two different webserver commands at the moment See https://github.com/microsoft/playwright/issues/8206
command: "yarn run-p 'embed-dev' 'embed-web-start'", command: "yarn embed-dev",
port: 3100, port: 3100,
timeout: 60_000, timeout: 60_000,
reuseExistingServer: !CI, reuseExistingServer: !CI,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 183 KiB

@@ -1,4 +1,4 @@
import { PlaywrightTestConfig, devices } from "@playwright/test"; import type { PlaywrightTestConfig } from "@playwright/test";
import path from "path"; import path from "path";
//TODO: Move the common config to embed-playwright-config and let core and react use the base. Along with config there would be base fixtures and expect custom matchers as well. //TODO: Move the common config to embed-playwright-config and let core and react use the base. Along with config there would be base fixtures and expect custom matchers as well.
@@ -19,8 +19,8 @@ const projects = baseConfig.projects?.map((project) => {
const config: PlaywrightTestConfig = { const config: PlaywrightTestConfig = {
...baseConfig, ...baseConfig,
webServer: { webServer: {
command: "yarn run-p 'embed-dev' 'embed-web-start'", command: "yarn run-p embed-dev",
port: 3000, port: 3101,
timeout: 60_000, timeout: 60_000,
reuseExistingServer: !process.env.CI, reuseExistingServer: !process.env.CI,
}, },
+7
View File
@@ -47,6 +47,12 @@
"outputs": [] "outputs": []
}, },
"@calcom/web#start": { "@calcom/web#start": {
"cache": false,
"persistent": true,
"dependsOn": ["@calcom/prisma#db-deploy"],
"outputs": []
},
"@calcom/web#start:bg": {
"cache": false, "cache": false,
"dependsOn": ["@calcom/prisma#db-deploy"], "dependsOn": ["@calcom/prisma#db-deploy"],
"outputs": [] "outputs": []
@@ -153,6 +159,7 @@
"@calcom/prisma#db-seed", "@calcom/prisma#db-seed",
"@calcom/web#build", "@calcom/web#build",
"^build", "^build",
"@calcom/web#start:bg",
"^embed-tests-update-snapshots:ci" "^embed-tests-update-snapshots:ci"
] ]
}, },