[FIX] Storybook race condition (#9936)
Flaky test can be found
[here](https://github.com/twentyhq/twenty/actions/runs/13052735697/job/36416799488)
Action should be outside the waitFor callback
## Context
It seems to occurs since the Charles tooltip perf refactor
ae4bf8d929
Maybe the tests render being faster it changed order of execution ? idk
still interesting
This commit is contained in:
@ -139,10 +139,8 @@ export const Submit: Story = {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
userEvent.click(item);
|
||||
expect(submitJestFn).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
await userEvent.click(item);
|
||||
await waitFor(() => expect(submitJestFn).toHaveBeenCalledTimes(1));
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user