meinaart / cypress-plugin-snapshots

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

When tests are launch from console line an error appears #64

Open Marc1190 opened 4 years ago

Marc1190 commented 4 years ago

Describe the bug The plugin works fine when tests are launched from npx cypress open but it throws an error when they are launched using cypress run. The error is: <![CDATA[TypeError: Cannot read property 'height' of undefined at getImageData (https://chs2020-dev.ccs-chs-swf-qa.cegedim.cloud/__cypress/tests?p=cypress\support\index.js-194:15717:19) at Context.<anonymous> (https://chs2020-dev.ccs-chs-swf-qa.cegedim.cloud/__cypress/tests?p=cypress\support\index.js-194:15104:22)]]>

To Reproduce Steps to reproduce the behavior:

  1. Launch test using cypress run

Expected behavior The behavior should be the same as cypress open

Desktop (please complete the following information):

Note: it seems that the error happens on this function getImageData afterScreenshot.