collab/mermaid/cypress/support/commands.jsblame
View source
6dd74de1// ***********************************************
6dd74de2// This example commands.js shows you how to
6dd74de3// create various custom commands and overwrite
6dd74de4// existing commands.
6dd74de5//
6dd74de6// For more comprehensive examples of custom
6dd74de7// commands please read more here:
6dd74de8// https://on.cypress.io/custom-commands
6dd74de9// ***********************************************
6dd74de10//
6dd74de11//
6dd74de12// -- This is a parent command --
6dd74de13// Cypress.Commands.add("login", (email, password) => { ... })
6dd74de14//
6dd74de15//
6dd74de16// -- This is a child command --
6dd74de17// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
6dd74de18//
6dd74de19//
6dd74de20// -- This is a dual command --
6dd74de21// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
6dd74de22//
6dd74de23//
6dd74de24// -- This is will overwrite an existing command --
6dd74de25// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
6dd74de26
6dd74de27import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
6dd74de28
6dd74de29// The SSIM comparison method can be used if the pixelmatch is throwing lots of false positives.
6dd74de30// SSIM actually does not catch minute changes in the image, so it is not as accurate as pixelmatch.
6dd74de31// addMatchImageSnapshotCommand({
6dd74de32// comparisonMethod: 'ssim',
6dd74de33// failureThreshold: 0.01,
6dd74de34// failureThresholdType: 'percent',
6dd74de35// customDiffConfig: {
6dd74de36// ssim: 'fast',
6dd74de37// },
6dd74de38// blur: 1,
6dd74de39// });
6dd74de40
6dd74de41addMatchImageSnapshotCommand();