fix: Skip webServer when PLAYWRIGHT_BASE_URL is set

This commit is contained in:
Benjamin Admin
2026-05-10 12:47:00 +02:00
parent 8a974e1f97
commit fbaca53c32
+10 -7
View File
@@ -72,13 +72,16 @@ export default defineConfig({
}, },
], ],
/* Run your local dev server before starting the tests */ /* Run your local dev server before starting the tests.
webServer: { * Skip if PLAYWRIGHT_BASE_URL is set (= testing against running container). */
command: 'npm run dev', ...(process.env.PLAYWRIGHT_BASE_URL ? {} : {
url: 'http://localhost:3002', webServer: {
reuseExistingServer: !process.env.CI, command: 'npm run dev',
timeout: 120 * 1000, url: 'http://localhost:3002',
}, reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
},
}),
/* Test output folder */ /* Test output folder */
outputDir: 'e2e/test-results', outputDir: 'e2e/test-results',