-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcypress.config.ts
33 lines (30 loc) · 1.11 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
import { defineConfig } from 'cypress';
import { removeDirectory } from 'cypress-delete-downloads-folder';
export default defineConfig({
chromeWebSecurity: false,
video: false,
retries: {
runMode: 3,
openMode: 0,
},
e2e: {
setupNodeEvents(on) {
on('task', { removeDirectory });
on('before:browser:launch', (browser, launchOptions) => {
if (browser.family === 'chromium' && browser.name !== 'electron') {
// Set pointer type to fine so that date inputs work properly
// ref: https://mui.com/x/react-date-pickers/base-concepts/#testing-caveats
launchOptions.args.push('--blink-settings=primaryPointerType=4');
}
if (browser.family === 'firefox') {
// Set pointer type to fine so that date inputs work properly
// ref: https://mui.com/x/react-date-pickers/base-concepts/#testing-caveats
launchOptions.preferences['ui.primaryPointerCapabilities'] = 4;
}
// whatever you return here becomes the launchOptions
return launchOptions;
});
},
baseUrl: 'http://127.0.0.1:3000',
},
});