cypress-io / eslint-plugin-cypress

An ESLint plugin for projects that use Cypress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

assertion-before-screenshot: allow customizing screenshot command

EvgenyOrekhov opened this issue · comments

We're using Percy for visual regression tests, and it provides its own screenshot command: cy.percySnapshot(). Other visual regression services/plugins provide their own commands, e. g. cy.matchImageSnapshot().

It would be great if assertion-before-screenshot allowed customizing screenshot commands, something like

"cypress/assertion-before-screenshot": ["error", {
  "screenshotCommands": ["percySnapshot", "matchImageSnapshot"]
}]