Fix stories

This commit is contained in:
Charles Bochet
2025-04-15 19:05:14 +02:00
parent 6f78a51da4
commit 53c6ddb2ad

View File

@ -13,6 +13,7 @@ import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
import { useTextField } from '../../../hooks/useTextField';
import { TextFieldInput, TextFieldInputProps } from '../TextFieldInput';
import { sleep } from '~/utils/sleep';
const TextFieldValueSetterEffect = ({ value }: { value: string }) => {
const { setFieldValue } = useTextField();
@ -136,6 +137,7 @@ export const Enter: Story = {
expect(enterJestFn).toHaveBeenCalledTimes(0);
await canvas.findByPlaceholderText('Enter text');
await sleep(50);
await userEvent.keyboard('{enter}');
await waitFor(() => {