You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my visual regression tests I like to have diff images and diff calculation even if the dimensions of the images mismatch. This could e.g. occur between two website screenshots if an additional line of text was added.
While this could be incorporated directly in pixelmatch as well as codeceptjs-pixelmatchhelper I more or less agree with mapbox/pixelmatch#25 (comment) in it being easy to do outside and adding another dependency like sharp just for edge cases should in general be avoided.
Nevertheless I think documenting the solution would help. So perhaps this could be added to the wiki/FAQ:
I created a custom function for my steps-file.js which is just called before a this.getVisualDifferences() and increases the smaller screenshot with black pixels. Yes this overrides both files, but is the most versatile solution.
For my visual regression tests I like to have diff images and diff calculation even if the dimensions of the images mismatch. This could e.g. occur between two website screenshots if an additional line of text was added.
While this could be incorporated directly in
pixelmatch
as well ascodeceptjs-pixelmatchhelper
I more or less agree with mapbox/pixelmatch#25 (comment) in it being easy to do outside and adding another dependency likesharp
just for edge cases should in general be avoided.Nevertheless I think documenting the solution would help. So perhaps this could be added to the wiki/FAQ:
I created a custom function for my
steps-file.js
which is just called before athis.getVisualDifferences()
and increases the smaller screenshot with black pixels. Yes this overrides both files, but is the most versatile solution.The text was updated successfully, but these errors were encountered: