mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 06:51:46 +08:00
17 lines
451 B
Plaintext
17 lines
451 B
Plaintext
```js
|
|
Submitted = {
|
|
play: async ({ args, canvasElement, step }) => {
|
|
const canvas = within(canvasElement);
|
|
|
|
await step('Enter email and password', async () => {
|
|
await userEvent.type(canvas.getByTestId('email'), 'hi@example.com');
|
|
await userEvent.type(canvas.getByTestId('password'), 'supersecret');
|
|
});
|
|
|
|
await step('Submit form', async () => {
|
|
await userEvent.click(canvas.getByRole('button'));
|
|
});
|
|
},
|
|
};
|
|
```
|