-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcypress.config.js
39 lines (35 loc) · 976 Bytes
/
cypress.config.js
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
const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
// baseUrl, etc
supportFile: false,
fixturesFolder: false,
video: false,
setupNodeEvents(cypressOn, config) {
const on = require('.')(cypressOn)
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome') {
launchOptions.args.push('--window-size=1366,768')
return launchOptions
}
})
on('after:spec', (a) => {
return new Promise((resolve) => {
setTimeout(() => {
console.log('after spec 1', a.relative)
resolve()
}, 100)
})
})
on('after:spec', (a) => {
console.log('after spec 2', a.relative)
})
on('after:spec', (a) => {
console.log('after spec 3', a.relative)
})
on('after:run', async () => {
console.log('after run async callback')
})
},
},
})