Skip to content

Commit

Permalink
test(components): put action in wait for (#723)
Browse files Browse the repository at this point in the history
so that it's executed again, even if the assertion afterwards fails.
Maybe this makes the test less flaky.
  • Loading branch information
fengelniederhammer authored Feb 5, 2025
1 parent 308e592 commit ef47537
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,8 @@ export const ChangingDateOption: StoryObj<DateRangeSelectorProps> = {
});

await step('Change date to custom', async () => {
await userEvent.selectOptions(selectField(canvas), 'CustomDateRange');

await waitFor(async () => {
await userEvent.selectOptions(selectField(canvas), 'CustomDateRange');
await expect(selectField(canvas)).toHaveValue('CustomDateRange');
});

Expand Down

0 comments on commit ef47537

Please sign in to comment.