Open aw-davidson opened 5 years ago
Hi. This is puppeteer behavior-- not BackstopJS behavior. This might not happen if you specify a selector that is in the viewport.
@garris Thanks for the reply. I'll try that.
I was still seeing this behavior if I specified selectors that were within the viewport. My solution was to increase the viewport size and select the document instead. This seems to have stabilized my tests.
Ah great! Nice problem solving there 👍
I think this puppeteer-issue is relevant here 7251.
In my case it helped to insert this in the onReady.js.
await page.setJavaScriptEnabled(false);
When I run the debug window, I've noticed that there is some kind of resize happening before screenshots are taken. This is okay for most tests, but I also have certain scenarios with components which animate when resize is triggered. For these specific scenarios the screenshots are inconsistent and therefore the tests are flaky.
Is there any way to stop the resize? I'm currently looking through the source code for backstop but I don't see a specific resize happening. I think the resize event should happen before everything everything else is run so that the page has time to settle.
I'm running this in docker. My config: