Post

TIL when running Vitest browser mode (or plain Playwright) on Github Actions on Ubuntu, you can skip the slow "playwright install chromium" step completely by providing channel option. This makes Playwright use the pre-installed Chrome. So many projects out there that could speed their CIs with this

This means you’re using a different version of Chrome though. Depending on the nature of the tests and the changes made between those versions, the results may be different.

Yes definitely. For projects that don't target specific browser versions it should be enough. If you are testing how some specific browser version works, a typical "playwright install chromium" might not be good option either.

Exactly. I was mainly thinking of screenshot tests. Screenshots are rarely pixel perfect. They tend to be slighly different between different OSes, browsers, and even browser versions.

Yeah it might cause unexpected changes in visual testing. Though same issue will happen with the "playwright install chromium" too. I've had so bad experience trying to setup stable visual testing infra myself that I just gave up on that approach many years ago. Now I'd recommend Chromatic+Vitest 🤝

Chromatic@chromatic.com

Get first access to our @vitest.dev plugin, which adds Chromatic’s visual testing and review to your browser tests. It’s built by @ariperkkio.dev, a Vitest core maintainer. It’s free to use while in beta and requires no changes to your test files. Read on for more info 🧵

0 reposts2 likes

It depends on the circumstances. People often use Ubuntu in CI. Since I use Ubuntu as my main OS, my setup is more consistent with CI than say macOS or Windows users. However, there are still discrepancies when dealing with for example async logic.