2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ module.exports = defineConfig({
18
18
viewportHeight : 720 ,
19
19
specPattern : "cypress/integration/**/*.spec.js" ,
20
20
supportFile : "cypress/commands.js" ,
21
- setupNodeEvents ( on ) {
22
- addMatchImageSnapshotPlugin ( on ) ;
21
+ setupNodeEvents ( on , config ) {
22
+ addMatchImageSnapshotPlugin ( on , config ) ;
23
23
24
24
on ( "before:browser:launch" , ( browser = { } , launchOptions ) => {
25
25
if ( browser . family === "chromium" && browser . name !== "electron" ) {
Original file line number Diff line number Diff line change @@ -6,9 +6,13 @@ require("cypress-real-events");
6
6
7
7
require ( "@4tw/cypress-drag-drop" ) ;
8
8
9
+ const failOnSnapshotDiff = Cypress . env ( "failOnSnapshotDiff" ) !== "false" ;
10
+
9
11
addMatchImageSnapshotCommand ( {
10
12
failureThreshold : 0.3 ,
11
13
blackout : [ ".notifications" , 'button[class*="BuildVersion"' ] ,
14
+ updateSnapshots : Cypress . env ( "updateSnapshots" ) === "true" ,
15
+ failOnSnapshotDiff,
12
16
} ) ;
13
17
14
18
const { ctrlOrCmd, escapeRegExp } = require ( "./utils" ) ;
0 commit comments