Skip to content

[Feature Request]: Test runner for multiple viewports #21828

@pmelab

Description

@pmelab

Is your feature request related to a problem? Please describe

When writing interaction tests that behave differently based on the viewport (e.g based on queryByRole finding a "mobile menu button" for example), the test runner will only execute the "desktop" branches, and coverage for the mobile parts won't be collected.

Describe the solution you'd like

The testrunner can run stories in multiple viewports and merges test coverage to give a clear indication of what percentage of the UI is covered by chromatic regression tests.

Describe alternatives you've considered

Create dedicated stories with a fixed viewport, but that is counter-intuitive with chromatic already snapshotting the same story in multiple viewports.

Are you able to assist to bring the feature to reality?

yes, I can

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions