Parameterised tests #32209
mrginglymus
started this conversation in
Ideas
Parameterised tests
#32209
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
My storybook is set up with several globals that appear in the toolbar, and affect the appearance and behaviour of the elements.
These include four fairly common ones:
In addition I also have a renderer arg that affects whether the given component is rendered with React, Custom Elements, or Native HTML.
My components are set up such that I should be able to run the same test suite against each implementation and get the same results, as the tests are written in a framework agnostic way using semantic accessible selectors.
However, storybook (seemingly) offers no easy way to run tests parameterized against this, and so my test suite is written outside of storybook.
In addition to this fairly niche requirement of multiple renderers, there are benefits for some of the other globals I've given for repeating tests against each option.
For example, accessibility tests should could run against each theme to ensure each theme meets colour contrast requirements.
Keyboard interaction tests should run against each direction to ensure correct mapping of physical to logical directions.
Describe the solution you'd like
The ability on the new
test
api to specify at both global, story, and individual test which globals to parameterize by.Describe alternatives you've considered
No response
Are you able to assist to bring the feature to reality?
yes, I can
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions