-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcypress.config.ts
28 lines (26 loc) · 1 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
import { defineConfig } from 'cypress'
import cypressGrepPlugin from '@cypress/grep/src/plugin'
import parseEnvPlugin from './cypress/plugins'
export default defineConfig({
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
const headlessIndex = launchOptions.args.indexOf('--headless')
if (headlessIndex > -1) {
launchOptions.args[headlessIndex] = '--headless=new'
}
}
return launchOptions
})
return cypressGrepPlugin(parseEnvPlugin(on, config)) as Cypress.PluginConfigOptions
},
baseUrl: 'http://localhost:5001/',
requestTimeout: 15000,
},
env: {
grepFilterSpecs: true,
},
})