Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot disable cypress screenshots

Tags:

cypress

I am trying to disable cypress screenshots, I have this in my cypress.json:

{
  "pluginsFile": "cypress/plugins/index.js",
  "supportFile": "cypress/support/index.ts",
  "video": false,
  "screenshotOnRunFailure": false
}

But the screenshots are still happening.

like image 407
dagda1 Avatar asked Jun 09 '19 06:06

dagda1


People also ask

Where are Cypress screenshots stored?

The screenshot will be stored in the cypress/screenshots folder by default. You can change the directory where screenshots are saved in the Cypress configuration.

How do I disable Cypress video?

Cypress records a video for each spec file when running tests during cypress run . Videos are not automatically recorded during cypress open . Video recording can be turned off entirely by setting video to false from within your configuration.


1 Answers

You must set this option with Cypress.Screenshot.defaults().

In your cypress/support/index.js file add

Cypress.Screenshot.defaults({
  screenshotOnRunFailure: false
})
like image 173
Diogo Rocha Avatar answered Sep 30 '22 01:09

Diogo Rocha