From bd4aa9c0ac94608804ce20c3639bcd16f68f8669 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Thu, 4 Jul 2024 00:17:48 +0000 Subject: [PATCH] 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 --- package.json | 2 +- playwright.config.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 86a625aa..247ff896 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start": "vinxi start", "codegen": "graphql-codegen", "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 ", "fix": "npx @biomejs/biome check . --fix && stylelint **/*.{scss,css} --fix", "format": "npx @biomejs/biome format src/. --write", diff --git a/playwright.config.ts b/playwright.config.ts index 0d7f20e1..15b5acdd 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -65,7 +65,8 @@ export default defineConfig({ ], /* 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', url: 'https://localhost:3000', ignoreHTTPSErrors: true,