From fbaca53c32be8032fa0389f72a52ba1a9107f767 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Sun, 10 May 2026 12:47:00 +0200 Subject: [PATCH] fix: Skip webServer when PLAYWRIGHT_BASE_URL is set --- admin-compliance/playwright.config.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/admin-compliance/playwright.config.ts b/admin-compliance/playwright.config.ts index 29dac3a..63cf81c 100644 --- a/admin-compliance/playwright.config.ts +++ b/admin-compliance/playwright.config.ts @@ -72,13 +72,16 @@ export default defineConfig({ }, ], - /* Run your local dev server before starting the tests */ - webServer: { - command: 'npm run dev', - url: 'http://localhost:3002', - reuseExistingServer: !process.env.CI, - timeout: 120 * 1000, - }, + /* Run your local dev server before starting the tests. + * Skip if PLAYWRIGHT_BASE_URL is set (= testing against running container). */ + ...(process.env.PLAYWRIGHT_BASE_URL ? {} : { + webServer: { + command: 'npm run dev', + url: 'http://localhost:3002', + reuseExistingServer: !process.env.CI, + timeout: 120 * 1000, + }, + }), /* Test output folder */ outputDir: 'e2e/test-results',