-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaywright.config.js
38 lines (38 loc) · 1.1 KB
/
playwright.config.js
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
/**
* Configuration of playwright
*
* @returns { import('@playwright/test').PlaywrightTestConfig } configuration
*/
exports.default = {
testDir: 'tests',
testMatch: /.*\.e2e-playwright-spec.ts$/,
use: {
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
...process.env.USE_MOCKS ? {
launchOptions: { proxy: {server: 'per-context'}},
proxy: {server: 'http://localhost:4200'},
serviceWorkers: 'block',
ignoreHTTPSErrors: true,
} : {}
},
projects: [
{name: 'Chromium', use: {browserName: 'chromium'}},
{name: 'Webkit', use: {browserName: 'webkit'}},
{name: 'Firefox', use: {browserName: 'firefox'}}
],
webServer: [
{
command: `npm run serve`,
port: 8080,
timeout: 10 * 1000,
reuseExistingServer: !process.env.CI
},
...process.env.USE_MOCKS ? [{
command: `npm run kassette`,
port: 4200,
timeout: 10 * 1000,
reuseExistingServer: !process.env.CI
}] : []
]
};