@pixellpeep/cypress
v0.2.0
Published
PixellPeep Cypress command for visual regression snapshots
Readme
@pixellpeep/cypress
Cypress command for PixellPeep visual snapshots.
Setup
cypress.config.js:
import { defineConfig } from 'cypress';
import { registerPixellPeepTasks } from '@pixellpeep/cypress';
export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
registerPixellPeepTasks(on, config, {
apiUrl: process.env.PIXELLPEEP_API,
apiKey: process.env.PIXELLPEEP_API_KEY,
projectId: process.env.PIXELLPEEP_PROJECT_ID,
});
return config;
},
},
});cypress/support/e2e.js:
import '@pixellpeep/cypress/support';Test
cy.visit('/login');
cy.pixellpeepSnapshot('login-page');