jaredpalmer / cypress-image-snapshot

Catch visual regressions in Cypress
MIT License
893 stars 158 forks source link

matchImageSnapshot triggers resize event #160

Open VaclovasVicius opened 3 years ago

VaclovasVicius commented 3 years ago

Hello, Our team spotted an issue, that when a cypress is creating a snapshot of a specific element (matchImageSnapshot), a resize event is triggered in this case, because the panel is hidden by cypress and etc. Could this be eliminated somehow, because this is not normal behavior. In our case, if a resize event is triggered, some of the components are changing their state, in this case, test flakiness appears. Is it possible to get rid of this side effect somehow?

ChristophWalter commented 3 years ago

Hey, we are currently facing similar instabilities caused by that. The resizing is done by cypress itself (cy.screenshot). So I think there is nothing this library can do about it. You might raise an issue there or adapt your application to handle resizing.