Cypress -Delete Video Recording for Passed Spec files
Step 1: Need to install the "del" module as a dependency
Terminal : npm i del --save-dev
Step 2: Check package.json file
Step 3: Go to plugins/index.js
//import
const del = require('del')
module.exports = (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)
}
})
}
For Example: npx cypress run --headless --browser chrome --spec cypress\integration\videoDelete\*
I have taken two spec files.
exxon.spec -Failed
No comments:
Post a Comment