5.5.0 • Published 2 years ago
cypress-image-compare v5.5.0
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");