17 ms·
I use Cypress with this plugin: https://github.com/palmerhq/cypress-image-snapshot https://github.com/palmerhq/cypress-image-snapshot In my setup, it creates t
by warpech 7y ago
I use Cypress with this plugin: https://github.com/palmerhq/cypress-image-snapshot https://github.com/palmerhq/cypress-image-snapshot
In my setup, it creates the PNG snapshots and compares them to the snapshots stored in Git at each test run. In result, I get the number of different pixels and the test fails if the nunmber is higher than 0. It also produces a visual PNG diff file, that has 3 panes: expected, actual, diff heatmap. The setup took just few hours.
However there are some screen resolution limitations in Cypress right now. I could not get it to work in resolution higher than 1200x1024. More about that problem: https://github.com/cypress-io/cypress/issues/2102 https://github.com/cypress-io/cypress/issues/2102
- ivanfon 7y agoThank you so much. We use cypress-image-snapshot at work and I've been running into this problem for two days. I thought it was a problem with the plugin, not Cypress itself. What a coincidence that I came across this in an HN comment :)
- warpech 7y agoThat's great, because I wasn't really sure why am I writing all this. Now I know!