Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Emulate reduced motion media query #3320

Closed
LarsDenBakker opened this issue Aug 6, 2020 · 4 comments · Fixed by #6646
Closed

[Feature] Emulate reduced motion media query #3320

LarsDenBakker opened this issue Aug 6, 2020 · 4 comments · Fixed by #6646

Comments

@LarsDenBakker
Copy link
Contributor

Puppeteer allows emulating the reduced motion media query: https://github.com/puppeteer/puppeteer/blob/v5.2.1/docs/api.md#pageemulatemediafeaturesfeatures

It would be great if we can support this in playwright as well. It's widely supported in browsers: https://caniuse.com/#feat=prefers-reduced-motion

@pavelfeldman
Copy link
Member

Could you help us prioritizing this? Does it come from a customer or is it a feature parity request?

@LarsDenBakker
Copy link
Contributor Author

It's about feature parity. It's same story as #3321 - we offer bindings for emulating media features from tests, using both puppeteer and playwright. Right now we throw an error when trying to emulate reduced motion when running tests with playwright.

@RyKilleen
Copy link

This would be incredibly useful for testing purposes. For accessibility purposes, we disable all animations based the prefers-reduced-motion media query.

Being able to set it to avoid fragile tests would save a bunch of time overall!

@evanleck
Copy link

FWIW I'd like to be able to emulate this media query so I don't have to wait for animations to end in my tests. Of course something like #4055 would help as well but without either I'm just doing arbitrary page.waitForTimeouts all over the place haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants