This commit is a port of changes I've made to the new runner for
happo.io. By waiting for images in srcset attributes, we can prevent
spurious diffs.
Instead of trying to figure out which one of the images will be
displayed in the current viewport, I decided to download all. The
tradeoff here being simplicity over performance (dowloading only one of
the images would be faster).
While running tests locally, I noticed that I was getting 2x images
compared to what's in CI. I decided to make the assertions a little
looser to account for both 1x and 2x screenshots.
This commit is a port of changes I've made to the new runner for happo.io. By waiting for images in srcset attributes, we can prevent spurious diffs.
Instead of trying to figure out which one of the images will be displayed in the current viewport, I decided to download all. The tradeoff here being simplicity over performance (dowloading only one of the images would be faster).
While running tests locally, I noticed that I was getting 2x images compared to what's in CI. I decided to make the assertions a little looser to account for both 1x and 2x screenshots.