-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.js
57 lines (53 loc) · 1.34 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { expect } from '@playwright/test'
require('dotenv').config({ path: '.env' })
const toMatchSchema = require('./lib/expect-schema')
expect.extend(toMatchSchema)
const apiServerest = process.env.API_SERVEREST
const e2eServerest = process.env.E2E_SERVEREST
process.env.PLAYWRIGHT_EXPERIMENTAL_FEATURES = '1'
export const retries = process.env.CI ? 1 : 0
export const reporter = [
[
'allure-playwright',
{
environmentInfo: {
E2E_NODE_VERSION: process.version,
E2E_OS: process.platform,
},
},
],
['list'],
['html', { open: 'never', outputFolder: 'reports' }],
]
export const projects = [
{
name: 'api',
testMatch: '**/api/*/*.api.test.js',
use: {
baseURL: apiServerest,
},
},
{
name: 'e2e',
outputDir: 'test-results',
testMatch: '**/e2e/*/*.e2e.test.js',
use: {
baseURL: e2eServerest,
browsers: ['chromium'],
viewport: { width: 1440, height: 900 },
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
bypassCSP: true,
launchOptions: {
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-web-security',
'--disable-gpu',
'--disable-dev-shm-usage',
],
headless: true,
},
},
},
]