-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.js
57 lines (51 loc) · 1.32 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
// @ts-check
const { devices, expect } = require('@playwright/test')
const { matchers } = require('expect-playwright')
expect.extend(matchers)
global.expect = expect
const BASE_URL = process.env.BASE_URL || 'https://dev.app.bossabox.com'
global.BASE_URL = BASE_URL
const BASE_URL_API = process.env.BASE_URL_API || 'https://drj335kkci.execute-api.sa-east-1.amazonaws.com'
global.BASE_URL_API = BASE_URL_API
const CI = process.env.CI || false
global.CI = CI
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
use: {
baseURL: BASE_URL,
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
video: 'on-first-retry',
ignoreHTTPSErrors: true,
colorScheme: 'dark',
extraHTTPHeaders: {
playwrightTest: '1'
}
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] }
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] }
}
],
reporter: CI
? 'github'
: [
['json', { outputFile: 'reports/json/results.json' }],
['html', { outputFolder: 'reports/html' }],
['list']
],
workers: CI ? 8 : undefined,
globalTimeout: 60 * 1000,
outputDir: './reports',
forbidOnly: !!CI
}
module.exports = config