Skip to content

MrDant/cypress-goldentest-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypress goldentest plugin

A plugin to compare image snapshot

Install

npm i git+https://github.com/MrDant/cypress-goldentest-plugin.git

Setup

./cypress.config.js

import { defineConfig } from 'cypress';
import goldenTest from 'cypress-golden-test'
export default defineConfig({
  e2e: {
    ...
    setupNodeEvents(on, config) {
        goldenTest(on, config)
    },
  },
  ...
});

./cypress/support/e2e.(js/ts)

import goldenTest from "cypress-golden-test/src/command";

To use

./cypress/exemple.cy.js

describe("Home goldenTest", () => {
  it("goldenTest", () => {
    cy.visit("/");
    cy.get("header");
    cy.goldenTest();
  });
});

Releases

No releases published

Packages

No packages published