fix: Skip webServer when PLAYWRIGHT_BASE_URL is set
This commit is contained in:
@@ -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.
|
||||||
|
* Skip if PLAYWRIGHT_BASE_URL is set (= testing against running container). */
|
||||||
|
...(process.env.PLAYWRIGHT_BASE_URL ? {} : {
|
||||||
webServer: {
|
webServer: {
|
||||||
command: 'npm run dev',
|
command: 'npm run dev',
|
||||||
url: 'http://localhost:3002',
|
url: 'http://localhost:3002',
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
timeout: 120 * 1000,
|
timeout: 120 * 1000,
|
||||||
},
|
},
|
||||||
|
}),
|
||||||
|
|
||||||
/* Test output folder */
|
/* Test output folder */
|
||||||
outputDir: 'e2e/test-results',
|
outputDir: 'e2e/test-results',
|
||||||
|
|||||||
Reference in New Issue
Block a user