Skip to content

Commit 18d574d

Browse files
committedMar 24, 2025
pass failonsnapshotdiff to config
1 parent 9f24cb9 commit 18d574d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎packages/browser-tests/cypress.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ module.exports = defineConfig({
1818
viewportHeight: 720,
1919
specPattern: "cypress/integration/**/*.spec.js",
2020
supportFile: "cypress/commands.js",
21-
setupNodeEvents(on) {
22-
addMatchImageSnapshotPlugin(on);
21+
setupNodeEvents(on, config) {
22+
addMatchImageSnapshotPlugin(on, config);
2323

2424
on("before:browser:launch", (browser = {}, launchOptions) => {
2525
if (browser.family === "chromium" && browser.name !== "electron") {

‎packages/browser-tests/cypress/commands.js

+4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ require("cypress-real-events");
66

77
require("@4tw/cypress-drag-drop");
88

9+
const failOnSnapshotDiff = Cypress.env("failOnSnapshotDiff") !== "false";
10+
911
addMatchImageSnapshotCommand({
1012
failureThreshold: 0.3,
1113
blackout: [".notifications", 'button[class*="BuildVersion"'],
14+
updateSnapshots: Cypress.env("updateSnapshots") === "true",
15+
failOnSnapshotDiff,
1216
});
1317

1418
const { ctrlOrCmd, escapeRegExp } = require("./utils");

0 commit comments

Comments
 (0)
Failed to load comments.