Replies: 3 comments 1 reply
-
|
I'd be interested in this too, but looking at the source code of |
Beta Was this translation helpful? Give feedback.
-
|
From the documentation https://storybook.js.org/docs/essentials/interactions Use // Form.stories.ts|tsx
...
export const Submitted: Story = {
play: async ({ args, canvasElement, step }) => {
const canvas = within(canvasElement);
await step('Enter credentials', async () => {
await userEvent.type(canvas.getByTestId('email'), 'hi@example.com');
});
await step('Submit form', async () => {
await userEvent.click(canvas.getByRole('button'));
});
},
}; |
Beta Was this translation helpful? Give feedback.
-
|
Came here through google so going to leave this for others in 2025+ using Vitest: https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#how-do-i-customize-a-test-name
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to set test name at addon-interactions?
Is it available in beta version?
like this post. thanks
https://storybook.js.org/blog/interaction-testing-sneak-peek/
Beta Was this translation helpful? Give feedback.
All reactions