You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say we are having a test which we want it to be run on all components so you define it inside the meta function, like this
constmeta: Meta<typeofComponent>={component: Component,decorators: [(Story)=>({Component: ModalDecorator,props: { Story }})],play: async({ step, canvasElement })=>{awaitstep("Form element has needed properties",async()=>{constform=canvasElement.querySelector("form");awaitexpect(form).toBeInTheDocument();});}};exportdefaultmeta;typeStory=StoryObj<typeofmeta>;
In order to also make sure this play function is played in combination to the component play function, is it advisable to call the parent play function, like this
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Let's say we are having a test which we want it to be run on all components so you define it inside the meta function, like this
In order to also make sure this play function is played in combination to the component play function, is it advisable to call the parent play function, like this
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions