Adds Redux and React-Intl to storybook (#35094)
This commit is contained in:
parent
c4128d89c9
commit
8ee8231a43
10 changed files with 876 additions and 53 deletions
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue