question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can't delete the recorded video if the spec is passed

See original GitHub issue

Current behavior

I followed this steps to remove recorded video for the spec file but it doesn’t be removed https://docs.cypress.io/api/plugins/after-spec-api#Delete-the-recorded-video-if-the-spec-passed

all tests are passed but the recorded video in cypress/videos not removed

Desired behavior

I want to delete the recorded video if the spec file is passed

Test code to reproduce

1- I run “npm i del --save-dev” in terminal 2-I added this to plugin/index

const del = require('del')
module.exports = (on, config) => {
  on('after:spec', (spec, results) => {
    if (results && results.stats.failures === 0 && results.video) {
      return del(results.video)
    }
  })
}

3-I run the tests in headles mode via this script “run-tests-headless”: “cypress run --spec cypress/integration/login.spec.js”

Cypress Version

9.0.0

Other

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
romankhomitskyicommented, Feb 10, 2022

it is solved thanks

Could you share the solution?

0reactions
hager-yousricommented, Feb 10, 2022

it is solved thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress-Delete the recorded video if the spec passed & no ...
In this video I've shown how to : -1. Delete the recorded video if the spec passed and2. Delete the recorded video if...
Read more >
Screenshots and Videos - Cypress Documentation
The example below shows how to delete the recorded video for specs that had no retry attempts or failures when using Cypress test...
Read more >
Video Will Not Delete - Microsoft Community
I accidentally made a copy of one of the videos and for what ever reason, I cannot delete it.
Read more >
Everything you need to know about deleted and overwritten ...
No. Deletion is always manual (footage intentionally deleted to hide any crime) but previously recorded footage can automatically be removed or ...
Read more >
How to Permanently Delete All Recorded Videos
Navigate to your Timeline, and select the event. · Tap the video preview to enter the video player. · Below, tap for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found