-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathplaywright-ct.config.ts
57 lines (54 loc) · 1.27 KB
/
playwright-ct.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 { devices, PlaywrightTestConfig } from '@playwright/experimental-ct-react'
import react from '@vitejs/plugin-react'
const reporterOutputDir = process.env.IS_RTL ? 'playwright-rtl-report' : 'playwright-report'
const config: PlaywrightTestConfig = {
testDir: './tests/ct',
timeout: 30 * 1000,
fullyParallel: false,
reporter: [['html', { outputFolder: reporterOutputDir }]],
use: {
trace: 'on-first-retry',
ctViteConfig: {
define: {
__DEV__: true,
},
// @ts-ignore - ""
plugins: [react()],
},
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
{
name: 'Mobile Chrome',
use: {
...devices['Pixel 4a (5G)'],
...devices['Pixel 4a (5G) landscape'],
},
},
{
name: 'Mobile Safari',
use: {
...devices['iPhone 11'],
...devices['iPhone 11 landscape'],
},
},
],
}
export default config