Fix stories (#11585)

<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/f77a006c-9538-4734-b80e-b58b9f5e7835"
/>
This commit is contained in:
Charles Bochet
2025-04-15 16:11:31 +02:00
committed by GitHub
parent aa399ca91e
commit 3c189688d0
3 changed files with 35 additions and 6 deletions

View File

@ -123,8 +123,8 @@ export const ClickOutside: Story = {
const canvas = within(canvasElement);
expect(clickOutsideJestFn).toHaveBeenCalledTimes(0);
await waitFor(() => {
const outsideElement = canvas.getByTestId('click-outside-element');
await waitFor(async () => {
const outsideElement = await canvas.findByTestId('click-outside-element');
userEvent.click(outsideElement);
expect(clickOutsideJestFn).toHaveBeenCalledTimes(1);
});