-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy pathcommands.js
More file actions
21 lines (19 loc) · 835 Bytes
/
Copy pathcommands.js
File metadata and controls
21 lines (19 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { addMatchImageSnapshotCommand } from "cypress-image-snapshot/command";
import videoContextScreenShotsAtTimesCommand from "./videoContextScreenShotsAtTimesCommand";
addMatchImageSnapshotCommand({
// Threshold for entire image
failureThreshold: 0.06,
// Percent of image or number of pixels
failureThresholdType: "percent",
// Threshold for each pixel
customDiffConfig: { threshold: 0.1 },
// Capture viewport in screenshot
capture: "viewport",
// We always pause before taking screenshots
disableTimersAndAnimations: false,
// Directory the snapshot images are written to, defaults to <rootDir>/cypress/snapshots
customSnapshotsDir: Cypress.env("local")
? "test/cypress/snapshots/local"
: "test/cypress/snapshots/ci"
});
videoContextScreenShotsAtTimesCommand();