diff --git a/packages/mindplot/cypress/support/commands.js b/packages/mindplot/cypress/support/commands.js index bcb624c8..85cef3a6 100644 --- a/packages/mindplot/cypress/support/commands.js +++ b/packages/mindplot/cypress/support/commands.js @@ -3,7 +3,10 @@ import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'; // make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set // otherwise it calls a noop if (Cypress.env('imageSnaphots')) { - addMatchImageSnapshotCommand(); + addMatchImageSnapshotCommand({ + failureThreshold: 0.001, + failureThresholdType: 'percent', + }); } else { Cypress.Commands.add( 'matchImageSnapshot', diff --git a/packages/web2d/cypress/support/commands.js b/packages/web2d/cypress/support/commands.js index cf3e92fd..77d192ad 100644 --- a/packages/web2d/cypress/support/commands.js +++ b/packages/web2d/cypress/support/commands.js @@ -3,7 +3,10 @@ import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'; // make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set // otherwise it calls a noop if (Cypress.env('imageSnaphots')) { - addMatchImageSnapshotCommand(); + addMatchImageSnapshotCommand({ + failureThreshold: 0.001, + failureThresholdType: 'percent', + }); } else { Cypress.Commands.add( 'matchImageSnapshot', diff --git a/packages/webapp/cypress/support/commands.ts b/packages/webapp/cypress/support/commands.ts index 5a2a7981..4f1ceb2d 100644 --- a/packages/webapp/cypress/support/commands.ts +++ b/packages/webapp/cypress/support/commands.ts @@ -1,12 +1,13 @@ import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'; import '@testing-library/cypress/add-commands'; -addMatchImageSnapshotCommand(); - // make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set // otherwise it calls a noop if (Cypress.env('imageSnaphots')) { - addMatchImageSnapshotCommand(); + addMatchImageSnapshotCommand({ + failureThreshold: 0.001, + failureThresholdType: 'percent', + }); } else { Cypress.Commands.add( 'matchImageSnapshot',