-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplaywright.config.js
More file actions
32 lines (30 loc) · 962 Bytes
/
playwright.config.js
File metadata and controls
32 lines (30 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require('dotenv').config();
const { defineConfig } = require('@playwright/test');
// E2E tests must not collide with the user's "main/master" instance (often on 3000).
// Default to a safe high port unless explicitly overridden.
const DEFAULT_TEST_SERVER_PORT = 4001;
const SERVER_PORT = Number.parseInt(process.env.ORCHESTRATOR_TEST_PORT || '', 10) || DEFAULT_TEST_SERVER_PORT;
module.exports = defineConfig({
testDir: './tests/e2e',
timeout: 30000,
retries: 1,
use: {
baseURL: `http://localhost:${SERVER_PORT}`,
headless: true,
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { browserName: 'chromium' },
},
],
webServer: {
command: `AUTO_START_DIFF_VIEWER=false ORCHESTRATOR_PORT=${SERVER_PORT} npm run dev:server`,
url: `http://localhost:${SERVER_PORT}`,
timeout: 60000,
reuseExistingServer: false,
},
outputDir: 'test-results',
});