Skip to content

Commit

Permalink
✅ Added waitFor around highlighterelement expect
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakihle committed Oct 31, 2024
1 parent 30d827f commit 2da67fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/providers/TutorialProvider/TutorialProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,10 @@ describe('TutorialProvider', () => {
const highlighterElement = screen.queryByTestId(
TUTORIAL_HIGHLIGHTER_DATATEST_ID
);
expect(highlighterElement).toBeInTheDocument();

await waitFor(() => expect(highlighterElement).toBeInTheDocument(), {
timeout: 5000,
});

const skipButton = screen.getByText(/skip/i);

Expand Down

0 comments on commit 2da67fb

Please sign in to comment.