cypress-image-compare
v5.5.0
Published
Cypress command package to compare images with simple pixel diff (pixelmatch). Supports PNG.
Downloads
1,612
Keywords
Readme
cypress-image-compare
Cypress command package to compare images with simple pixel diff (pixelmatch). Supports PNG.
Adding to project
Add following lines to your commands.ts:
/// <reference types="cypress-image-compare" />
import "cypress-image-compare/commands";
Usage
In the first run use update option to generate a snapshots.
cy.get("#sample").matchImage("sample", { update: true });
After that just call.
cy.get("#sample").matchImage("sample");