dgrebb / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
0 stars 0 forks source link

Set Playwright and Puppeteer to use `new` headless mode by default #73

Closed dgrebb closed 9 months ago

dgrebb commented 9 months ago

Let's make the full change in source to use new headless mode as the default.

Test regressions, test fallbacks, and ensure support for old mode is supported when new becomes vendor standard.

Notes

dgrebb commented 9 months ago

@garris let's discuss this - I see some evidence that new headless is actually slower.

It appears that one can pass headless: old as the mode, which apparently silences the deprecation warnings.

Maybe that's an option for now? The Chromium team says "we're going to make that the default later this year" back in January. So ¯_(ツ)_/¯

I'll look into ways perf testing can be done.

garris commented 9 months ago

Few thoughts. 1) pretty sure this is exposed in engineOptions so risk of defaulting this to the "wrong" setting is fairly low.
2) we should probably default this to headless: new but provide code snippet in docs for users who might hit an incompatibility. 3) backstop stashes time started and time completed and spits out duration into the CLI. So testing for performance should be pretty easy. You could run sanity test sequentially 20 times and grep for the timing value to get a cumulative average. 4) I'm open to other approaches. Just sharing gut reactions. Cheers.

dgrebb commented 9 months ago

Closed by https://github.com/garris/BackstopJS/pull/1535

Super happy I haven't caused any nightmares yet.