Open Rajdeepc opened 3 months ago
Reopening from #11781
Hi @dgozman It would be great if you can share some updates if your team has or planning to prioritise this in coming months? This would be a great to have feature to enable device specific testing capabilities in our test pipeline.
@Rajdeepc No plans for this one yet, sorry.
🚀 Feature Request
For users looking to test code that might employ something like
matchMedia('(hover: none) and (pointer: coarse)')
.matches, it would be awesome to be able to apply this context at testing time. We're currently able to test usage likematchMedia('(max-width: 800px)')
.matches via thepage.setViewportSize(viewportSize)
ormatchMedia('print').matches
viapage.emulateMedia({media: 'print')
, and I wonder if we could expand onemulateMedia, setViewportSize
, and/or a new API to surface these extended realities.It's possible that there is a combination of tangentially related settings that might similarly active this situation, in which case this may just be a documentation request, however the ability to make these changes during runtime, as is available with the other APIs I have listed would be very valuable for easy testing of these sorts of features.
Example
No response
Motivation
I'm sure that anyone who is working to test the responsively of their code across the growing number of contexts in which a web application can be delivered would benefit from being able to leverage such an addition.