feat: if start e2e script is has CI var set to any, than playwright not checks local http is run and dont truing to run local dev on

This commit is contained in:
Stepan Vladovskiy 2024-07-04 00:17:48 +00:00
parent 272d9caa67
commit bd4aa9c0ac
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@
"start": "vinxi start", "start": "vinxi start",
"codegen": "graphql-codegen", "codegen": "graphql-codegen",
"e2e:tests": "npx playwright test --project=webkit", "e2e:tests": "npx playwright test --project=webkit",
"e2e:tests:ci": "BASE_URL=http://127.0.0.1:8080 npx playwright test --project=webkit", "e2e:tests:ci": "CI=true BASE_URL=http://127.0.0.1:8080 npx playwright test --project=webkit",
"e2e:install": "npx playwright install webkit && npx playwright install-deps ", "e2e:install": "npx playwright install webkit && npx playwright install-deps ",
"fix": "npx @biomejs/biome check . --fix && stylelint **/*.{scss,css} --fix", "fix": "npx @biomejs/biome check . --fix && stylelint **/*.{scss,css} --fix",
"format": "npx @biomejs/biome format src/. --write", "format": "npx @biomejs/biome format src/. --write",

View File

@ -65,7 +65,8 @@ export default defineConfig({
], ],
/* Run local dev server before starting the tests */ /* Run local dev server before starting the tests */
webServer: { /* If process env CI is set to false */
webServer: process.env.CI ? undefined :{
command: 'npm run dev', command: 'npm run dev',
url: 'https://localhost:3000', url: 'https://localhost:3000',
ignoreHTTPSErrors: true, ignoreHTTPSErrors: true,