Remove user action from waitFor in stories (#11588)
As per title: - waitFor is a loop that waits for a condition to be filled, it should be use to expect or in rare case to wait for element to be present in the page (in most cases, you can use findByXXX) - user actions should not be in this loop, otherwise they will be triggered multiple times
This commit is contained in:
@ -24,6 +24,6 @@ export const Default: Story = {
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
const tooltip = await canvas.findByTestId('tooltip');
|
||||
userEvent.hover(tooltip);
|
||||
await userEvent.hover(tooltip);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user