```js // Form.stories.js | Form.stories.jsx | Form.stories.ts | Form.stories.tsx import { userEvent, within } from '@storybook/testing-library'; import { LoginForm } from './LoginForm'; export default { component: LoginForm, }; export const FilledForm = { play: async ({ args, canvasElement }) => { // Starts querying the component from it's root element const canvas = within(canvasElement); await userEvent.type(canvas.getByTestId('email'), 'email'); await userEvent.type(canvas.getByTestId('password'), 'password'); // See https://storybook.js.org/docs/7.0/react/essentials/actions#automatically-matching-args to learn how to setup logging in the Actions panel await userEvent.click(canvas.getByRole('button')); }, }; ```