Skip to content

Any way to force CSS media queries to detect mobile #970

@ghost

Description

First of all THANK YOU for excellent tool. We (front end developers) have been waiting years for this tool.

There is just one small issue. Using cy.viewport('type-of-mobile-phone') makes testing iframe smaller, but CSS media queries and window.screen.width, height remains the same (since it resolves actual size of screen.

Is there any possible way how to fix this? I was doing some research, and only idea I have is to implement somehow Google Dev Tools protocol, that is able to force Chrome to fake anything.

https://chromedevtools.github.io/devtools-protocol/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions