-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
71 lines (69 loc) · 1.66 KB
/
Copy pathplaywright.config.ts
File metadata and controls
71 lines (69 loc) · 1.66 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { defineConfig, devices } from '@playwright/test';
const baseURL = process.env.UGP_BASE_URL ?? 'http://127.0.0.1:4173';
export default defineConfig({
forbidOnly: Boolean(process.env.CI),
fullyParallel: true,
reporter: [
['list'],
['html', { open: 'never' }],
['junit', { outputFile: 'test-results/junit.xml' }],
['json', { outputFile: 'test-results/results.json' }],
],
retries: process.env.CI ? 2 : 0,
testDir: './tests/e2e',
...(process.env.UGP_BASE_URL
? {}
: {
webServer: {
command:
'pnpm --filter @ui-grounding/example-bi-dashboard dev --host 127.0.0.1 --port 4173',
reuseExistingServer: !process.env.CI,
timeout: 60_000,
url: baseURL,
},
}),
use: {
baseURL,
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
viewport: { height: 900, width: 1440 },
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: { height: 900, width: 1440 },
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
viewport: { height: 900, width: 1440 },
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
viewport: { height: 900, width: 1440 },
},
},
{
name: 'chromium-compact',
use: {
...devices['Desktop Chrome'],
viewport: { height: 768, width: 1024 },
},
},
{
name: 'chromium-dpr2',
use: {
...devices['Desktop Chrome'],
deviceScaleFactor: 2,
viewport: { height: 900, width: 1440 },
},
},
],
});