-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
76 lines (74 loc) · 1.71 KB
/
cypress.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import path from 'path'
import { defineConfig } from 'cypress'
import vitePreprocessor from 'cypress-vite'
const __dirname = path.dirname('./vite.config.ts');
export default defineConfig({
retries: {
runMode: 2,
openMode: 0,
},
screenshotOnRunFailure: false,
experimentalSingleTabRunMode: true,
experimentalModifyObstructiveThirdPartyCode: true,
e2e: {
baseUrl: 'http://localhost:4800',
specPattern: '**/*.e2e.ts',
setupNodeEvents(on) {
on(
'file:preprocessor',
vitePreprocessor(path.resolve(__dirname, './vite.config.ts')),
)
on('before:browser:launch', (browser={}, launchOptions) => {
if (browser.family === 'chromium') {
launchOptions.args.push('--test-third-party-cookie-phaseout');
return launchOptions;
}
}
);
},
},
component: {
devServer: {
framework: "react",
bundler: "vite",
},
setupNodeEvents(on) {
on('before:browser:launch', (browser={}, launchOptions) => {
if (browser.family === 'chromium') {
launchOptions.args.push('--test-third-party-cookie-phaseout');
return launchOptions;
}
}
);
},
},
env: {
viewports: [
{
width: 599,
height: 1065,
xs: true,
},
{
width: 899,
height: 1598,
sm: true,
},
{
width: 1199,
height: 674,
md: true,
},
{
width: 1535,
height: 836,
lg: true,
},
{
width: 1920,
height: 1080,
xl: true,
},
],
},
})