-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathplaywright.config.ts
57 lines (56 loc) · 1.48 KB
/
playwright.config.ts
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { defineConfig, devices } from '@playwright/test';
import 'dotenv/config';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './_playwright-tests/',
fullyParallel: false,
forbidOnly: false,
retries: process.env.CI ? 1 : 0,
workers: 1,
reporter: process.env.CI
? [
['html', { outputFolder: 'playwright-report' }],
[
'playwright-ctrf-json-reporter',
{ outputDir: 'playwright-ctrf', outputFile: 'playwright-ctrf.json' },
],
['@currents/playwright'],
]
: 'list',
globalTimeout: 29.5 * 60 * 1000, // 29.5m, Set because of codebuild, we want PW to timeout before CB to get the results.
timeout: 10 * 60 * 1000, // 10m
expect: { timeout: 30_000 }, // 30s
use: {
actionTimeout: 30_000, // 30s
navigationTimeout: 30_000, // 30s
launchOptions: {
args: ['--use-fake-device-for-media-stream'],
},
...(process.env.TOKEN
? {
extraHTTPHeaders: {
Authorization: process.env.TOKEN,
},
}
: {}),
baseURL: process.env.BASE_URL,
ignoreHTTPSErrors: true,
testIdAttribute: 'data-ouia-component-id',
trace: 'on',
screenshot: 'on',
video: 'on',
},
projects: [
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
storageState: '.auth/user.json',
},
dependencies: ['setup'],
},
],
});