-
-
Notifications
You must be signed in to change notification settings - Fork 216
/
cypress.config.ts
51 lines (43 loc) · 1.33 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
/* eslint-disable import/no-unused-modules */
import { defineConfig } from 'cypress';
export default defineConfig({
component: {
devServer: {
bundler: 'webpack',
framework: 'react',
},
},
defaultCommandTimeout: 10000,
e2e: {
baseUrl: 'http://localhost:4444',
excludeSpecPattern: '**/examples/*.js',
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// full screen
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome') {
launchOptions.args.push('--start-fullscreen');
return launchOptions;
}
if (browser.name === 'electron') {
launchOptions.preferences.fullscreen = true;
return launchOptions;
}
if (browser.name === 'firefox') {
launchOptions.args.push('--start-fullscreen');
launchOptions.args.push('--headless');
launchOptions.args.push('--disable-gpu');
return launchOptions;
}
});
// return require('./cypress/plugins/index.js')(on, config);
},
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
projectId: '8zb5a5',
video: false,
viewportHeight: 1080,
viewportWidth: 1920,
watchForFileChanges: false,
});