-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
79 lines (78 loc) · 1.96 KB
/
Copy pathplaywright.config.ts
File metadata and controls
79 lines (78 loc) · 1.96 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
72
73
74
75
76
77
78
79
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: [
['html', { outputFolder: 'playwright-report' }],
process.env.CI ? ['github'] : ['list'],
],
use: {
baseURL: 'http://localhost:4321',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'on-first-retry',
},
projects: [
{
name: 'setup',
testMatch: /.*\.setup\.ts/,
},
{
name: 'chromium-admin',
use: {
...devices['Desktop Chrome'],
storageState: 'tests/e2e/.auth/admin.json',
},
dependencies: ['setup'],
},
{
name: 'chromium-user',
use: {
...devices['Desktop Chrome'],
storageState: 'tests/e2e/.auth/user.json',
},
dependencies: ['setup'],
testMatch: /.*permissions\.spec\.ts/,
},
...(process.env.CI
? []
: [
{
name: 'firefox-admin',
use: {
...devices['Desktop Firefox'],
storageState: 'tests/e2e/.auth/admin.json',
},
dependencies: ['setup'],
},
{
name: 'firefox-user',
use: {
...devices['Desktop Firefox'],
storageState: 'tests/e2e/.auth/user.json',
},
dependencies: ['setup'],
testMatch: /.*permissions\.spec\.ts/,
},
]),
],
webServer: {
command: 'pnpm dev',
url: 'http://localhost:4321',
reuseExistingServer: false,
stdout: 'ignore',
stderr: 'pipe',
timeout: 60_000,
env: {
EMAIL_DISABLED: 'true',
STORAGE_DISABLED: 'true',
STORAGE_ENDPOINT: 'https://s3.us-west-004.backblazeb2.com',
STORAGE_BUCKET: 'test-bucket',
STORAGE_KEY_ID: 'test-key-id',
STORAGE_KEY: 'test-key',
},
},
});