-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
62 lines (55 loc) · 1.36 KB
/
playwright.config.ts
File metadata and controls
62 lines (55 loc) · 1.36 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
import { devices, PlaywrightTestConfig } from '@playwright/test'
import dotenv from 'dotenv'
dotenv.config()
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './e2e',
timeout: 90 * 1000,
expect: {
timeout: 5000,
},
fullyParallel: true,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 1 : 0,
workers: 1,
reporter: [ [ "html", { open: "never" } ] ],
use: {
...devices['Desktop Chrome'],
userAgent: "Mozilla/5.0 (Macintosh Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36",
headless: true,
actionTimeout: 5000,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: {
mode: 'retain-on-failure',
size: { width: 640, height: 480 },
},
launchOptions: {
args: [ '--disable-web-security' ],
},
extraHTTPHeaders: {
'x-vercel-protection-bypass': process.env.VERCEL_AUTOMATION_BYPASS_SECRET || '',
},
},
projects: [
{
name: 'Tests',
testMatch: /.*\.spec\.ts$/,
use: {
baseURL: process.env.URL || 'http://local.stakewise.io:5005',
},
},
],
webServer: [],
}
if (process.env.WITH_ANVIL) {
config.webServer = [
{
command: './scripts/fork-ci.sh',
url: 'http://localhost:8545',
},
]
}
export default config