We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27da3d3 commit dea83b0Copy full SHA for dea83b0
src/plugin.js
@@ -125,6 +125,13 @@ const getCompareSnapshotsPlugin = on => {
125
// Intercept cypress screenshot and create a new image with our own
126
// name convention and file structure for simplicity and consistency
127
on('after:screenshot', details => {
128
+ // A screenshot could be taken automatically due to a test failure
129
+ // and not a call to cy.compareSnapshot / cy.screenshot. These files
130
+ // should be left alone
131
+ if (details.testFailure) {
132
+ return;
133
+ }
134
+
135
// Change screenshots file permission so it can be moved from drive to drive
136
setFilePermission(details.path, 0o777)
137
renameAndMoveFile(details.path, paths.image.comparison(details.name))
0 commit comments