Galooshi / happo

Visual diffing in CI for user interfaces
505 stars 16 forks source link

Add better spec for disabling scrollbars #137

Closed lencioni closed 8 years ago

lencioni commented 8 years ago

In 239611300f1 I took a swing at hiding scrollbars, but in practice this seemed to have no effect. I have a hypotheses that we aren't giving the browser a chance to repaint the element before taking the screenshot, but I wanted to write a test that verifies this first. I believe that this might be such a test.

The idea is that if there is no scrollbar, the entire element will be red. If there is a scrollbar, this will not be true because the scrollbar itself is not entirely red.

Locally this test passes, which is consistent with the failure mode for my previous attempt. If this test fails in CI, then we actually have something to work with here.

While working on this I discovered that the screenshot that we take of elements includes the size of nodes that are partly hidden by overflow containers and opened an issue at #136.