forked from content-services/content-sources-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
53 lines (50 loc) · 1.27 KB
/
playwright.config.ts
File metadata and controls
53 lines (50 loc) · 1.27 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
41
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig, devices } from '@playwright/test';
import path from 'path';
import { config } from 'dotenv';
config({ path: path.join(__dirname, './.env') });
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './_playwright-tests/tests',
fullyParallel: false,
forbidOnly: false,
retries: 1,
workers: 1,
reporter: !!process.env.CI
? [
['html', { outputFolder: 'playwright-report' }],
[
'playwright-ctrf-json-reporter',
{ useDetails: true, outputDir: 'playwright-ctrf', outputFile: 'playwright-ctrf.json' },
],
['@currents/playwright'],
]
: 'list',
expect: { timeout: 15000 },
use: {
launchOptions: {
args: ['--use-fake-device-for-media-stream'],
},
...(process.env.IDENTITY_HEADER
? {
extraHTTPHeaders: {
'x-rh-identity': process.env.IDENTITY_HEADER,
},
}
: {}),
baseURL: process.env.BASE_URL,
trace: 'on',
ignoreHTTPSErrors: true,
},
projects: [
{ name: 'setup', testMatch: /.*\.setup\.ts/, expect: { timeout: 20000 } },
{
name: 'Google Chrome',
use: {
...devices['Desktop Chrome'],
},
dependencies: ['setup'],
},
],
});