Skip to content

Automation testing with multiple viewports #24942

Answered by yannbf
venugopalkathavate asked this question in Help
Discussion options

You must be logged in to vote

Hey @venugopalkathavate!

The test-runner allows you to configure a specific snapshot per story, as can be seen in this recipe. However, It does not have a way to multiply the same test with multiple configurations. If you really want to achieve that with the test-runner, you could potentially duplicate your stories and set a different viewport for each of these stories' parameters.

Alternatively, if you ever looked at Chromatic, they have a feature called story modes which does exactly what you want to achieve:
https://www.chromatic.com/docs/modes/#modes-for-testing-themes-viewports-locales-amp-more

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by joevaugh4n
Comment options

You must be logged in to vote
1 reply
@yannbf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants