forked from vrk-kpa/opendata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.js
34 lines (28 loc) · 931 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
const { defineConfig } = require('cypress')
const del = require('del')
module.exports = defineConfig({
projectId: 'ssb2ut',
env: {
resetDB: true,
cloudStorageEnabled: false,
docker: true
},
videoCompression: 20,
videoUploadOnPasses: false,
defaultCommandTimeout: 30000,
e2e: {
baseUrl: 'http://localhost',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
//https://docs.cypress.io/api/plugins/after-spec-api#Log-the-relative-spec-path-to-stdout-after-the-spec-is-run
// need to install the "del" module as a dependency
setupNodeEvents(on, config) {
on('after:spec', (spec, results) => {
if (results && results.stats.failures === 0 && results.video) {
// `del()` returns a promise, so it's important to return it to ensure
// deleting the video is finished before moving on
return del(results.video)
}
})
},
},
})