Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Device pixel ratio/density simulation #7075

@0gust1

Description

@0gust1

I'm following the advice here :
https://docs.cypress.io/api/commands/viewport.html#devicePixelRatio

Current behavior:

Actually we can't simulate pixelRatio/pixelDensity with Cypress.
It can be very useful for testing correct behavior around responsive images.

Desired behavior:

Have the possibility to switch the DevicePixelRatio in cypress.

Viewport dimension changes and testing the currentSrc is already very useful.
Having DevicePixelRatio in cypress would enable finer tests.

Test code to reproduce

Not applicable as it's not implemented.

It could be another option to cy.viewport()

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureNew feature that does not currently exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions