@buddy-works/visual-tests-cypress
v0.1.0
Published
Buddy Visual Tests Cypress Plugin
Downloads
11
Keywords
Readme
Visual Test Cypress Plugin
A Cypress plugin for performing visual testing using Buddy Works Visual Testing. This plugin allows automatic capturing of website snapshots across different screen resolutions and comparing them with reference versions to detect visual regressions.
Requirements
- Node.js >= 20
- Cypress >= 14.0.0
Installation
npm install -D @buddy-works/visual-tests-cypressSetup
Add the plugin to your Cypress support file so the custom command is registered:
// cypress/support/e2e.js
import "@buddy-works/visual-tests-cypress";Basic example
Call the command anywhere in your tests after navigating to a page:
describe("visuals", () => {
it("homepage snapshot", () => {
cy.visit("https://buddy.works/blog");
cy.takeSnap("example-homepage");
});
});License
MIT
