-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathplaywright.local.config.ts
More file actions
40 lines (39 loc) · 1.03 KB
/
playwright.local.config.ts
File metadata and controls
40 lines (39 loc) · 1.03 KB
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
33
34
35
36
37
38
39
40
import { defineConfig, devices } from '@playwright/test';
/**
* Playwright config for running E2E tests against localhost API (port 3000)
*
* Usage:
* npm run test:e2e:local --config=playwright.local.config.ts
*/
export default defineConfig({
testDir: './e2e',
snapshotDir: './e2e/screenshots',
snapshotPathTemplate: '{snapshotDir}/{testFileName}-{arg}-{projectName}-{platform}{ext}',
outputDir: './e2e/test-results',
preserveOutput: 'always',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: 0,
workers: 1,
reporter: [['list'], ['html', { open: 'never', outputFolder: 'playwright-report-local' }]],
timeout: 90000,
use: {
// Frontend runs on 3001, but uses API at 3000
baseURL: 'http://localhost:3001',
trace: 'on',
screenshot: 'on',
video: 'on',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npm start',
url: 'http://localhost:3001',
reuseExistingServer: true,
timeout: 120000,
},
});