Adds Redux and React-Intl to storybook (#35094)

This commit is contained in:
Echo 2025-06-24 11:31:27 +02:00 committed by GitHub
commit 8ee8231a43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 876 additions and 53 deletions

View file

@ -36,7 +36,8 @@ export default meta;
type Story = StoryObj<typeof meta>;
const buttonTest: Story['play'] = async ({ args, canvas, userEvent }) => {
await userEvent.click(canvas.getByRole('button'));
const button = await canvas.findByRole('button');
await userEvent.click(button);
await expect(args.onClick).toHaveBeenCalled();
};
@ -45,7 +46,8 @@ const disabledButtonTest: Story['play'] = async ({
canvas,
userEvent,
}) => {
await userEvent.click(canvas.getByRole('button'));
const button = await canvas.findByRole('button');
await userEvent.click(button);
await expect(args.onClick).not.toHaveBeenCalled();
};