meinaart / cypress-plugin-snapshots

Plugin for snapshot tests in Cypress.io
MIT License
489 stars 116 forks source link

Fix `toMatchImageSnapshot` example with screenshot settings #166

Open AMS777 opened 3 years ago

AMS777 commented 3 years ago

Screenshot settings for toMatchImageSnapshot must be inside the screenshotConfig property:

cy.get('.element')
  .toMatchImageSnapshot({
    screenshotConfig: {
      clip: { x: 0, y: 0, width: 100, height: 100 },
    },
  });