meinaart / cypress-plugin-snapshots

Plugin for snapshot tests in Cypress.io
MIT License
497 stars 117 forks source link

Snapshoting mulitple elements returns empty objects #77

Closed louis-vinchon closed 4 years ago

louis-vinchon commented 4 years ago

Describe the bug

If you use toMatchSnapshot(); after a cy.get() that returned multiple elements, the final snapshot will look something like this: [{}, {}, {}]

To Reproduce Steps to reproduce the behavior:

  1. cy.get('div').toMatchSnapshot(); when there are mutiple divs in the current context.

Expected behavior An array of stringified dom elements.

Desktop (please complete the following information):

kmsauter commented 4 years ago

This is the same issue as #67, there's an open pull request (#79) with a fix for this.

louis-vinchon commented 4 years ago

Gud