chore: v0.2.2 — e2e config supports remote runner (E2E_REMOTE/E2E_BASE_URL)
This commit is contained in:
+11
-7
@@ -1,17 +1,21 @@
|
||||
import { defineConfig } from '@playwright/test';
|
||||
|
||||
const remote = !!process.env.E2E_REMOTE;
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
timeout: 30_000,
|
||||
retries: 1,
|
||||
use: {
|
||||
baseURL: 'http://localhost:3000',
|
||||
baseURL: process.env.E2E_BASE_URL ?? (remote ? 'http://flight.dev.kkhost.pl' : 'http://localhost:3000'),
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
webServer: {
|
||||
command: 'npm run dev',
|
||||
url: 'http://localhost:3000/api/airports',
|
||||
reuseExistingServer: true,
|
||||
timeout: 120_000,
|
||||
},
|
||||
webServer: remote
|
||||
? undefined
|
||||
: {
|
||||
command: 'npm run dev',
|
||||
url: 'http://localhost:3000/api/airports',
|
||||
reuseExistingServer: true,
|
||||
timeout: 120_000,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user