mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-10 17:33:24 +01:00
Set threshold for cypress-image-snapshot
This commit is contained in:
parent
5e66f1f160
commit
86780ed0e9
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user