forked from qlik-oss/sn-pivot-table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.ts
50 lines (48 loc) · 1.3 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
import { PlaywrightTestConfig, devices } from '@playwright/test';
const config: PlaywrightTestConfig = {
use: {
// Run the browser in headless mode
// headless: false,
// Record trace for each test, but remove it from successful test runs.
trace: 'retain-on-failure',
},
// Look for test files in the "test/rendering" directory, relative to this configuration file
testDir: 'test/rendering',
testMatch: /render\.mjs/,
outputDir: './test/rendering/artifacts/',
reporter: [
['list'],
[
'html',
{
outputFolder: './test/rendering/test-report',
open: process.env.CI ? 'never' : 'on-failure',
},
],
],
// Forbid test.only on CI
forbidOnly: !!process.env.CI,
// The maximum number of retry attempts per test, two retries on CI
retries: process.env.CI ? 2 : 0,
// Limit the number of workers
workers: 1,
// Multiple "projects" can run your tests in multiple browsers and configurations
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// },
],
expect: {
toMatchSnapshot: { threshold: 0.1 },
},
};
export default config;