Update tests

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2025-03-31 15:54:54 +01:00
parent 8a470a230a
commit 6730ee29fa
3 changed files with 5 additions and 7 deletions
-1
View File
@@ -56,7 +56,6 @@
"@storybook/react": "^8.6.8",
"@storybook/react-webpack5": "^8.6.8",
"@storybook/test": "^8.6.8",
"@testing-library/jest-dom": "^6.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"chalk": "^5.4.1",
@@ -19,8 +19,8 @@ import type { Meta, StoryObj } from '@storybook/react';
import { TextField } from './TextField';
import { Form } from '@base-ui-components/react/form';
import { Button } from '../Button';
import { userEvent, waitFor, within, expect } from '@storybook/test';
import { Flex } from '../Flex';
import { waitFor, within, userEvent, expect } from '@storybook/test';
const meta = {
title: 'Components/TextField',
@@ -170,13 +170,13 @@ export const ShowErrorOnSubmit: Story = {
});
const submitButton = canvas.getByRole('button');
await userEvent.click(submitButton);
await waitFor(() => {
expect(
canvas.getByText('The example domain is not allowed'),
).toBeInTheDocument();
const errorMessage = canvas.queryByText(
'The example domain is not allowed',
);
expect(errorMessage).toBeTruthy();
});
},
};
-1
View File
@@ -3789,7 +3789,6 @@ __metadata:
"@storybook/react": ^8.6.8
"@storybook/react-webpack5": ^8.6.8
"@storybook/test": ^8.6.8
"@testing-library/jest-dom": ^6.0.0
"@types/react": ^18.0.0
"@types/react-dom": ^18.0.0
chalk: ^5.4.1