```ts // MyComponent.stories.ts import { screen, userEvent, waitFor } from '@storybook/testing-library'; import { MyComponent } from './MyComponent.component'; export default { component: MyComponent, }; export const ExampleAsyncStory = { play: async () => { const emailInput = screen.getByLabelText('Username', { selector: 'input', }); await userEvent.type(emailInput, 'WrongInput', { delay: 100, }); // See https://storybook.js.org/docs/7.0/angular/essentials/actions#automatically-matching-args to learn how to setup logging in the Actions panel const Submit = screen.getByRole('button'); await userEvent.click(Submit); await waitFor(async () => { await userEvent.hover(screen.getByTestId('error')); }); }, }; ```