Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flacky UserPage test #2914

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Fix flacky UserPage test #2914

merged 2 commits into from
Aug 21, 2024

Conversation

EMaksy
Copy link
Member

@EMaksy EMaksy commented Aug 21, 2024

Description

Long Ci runs may cause some timing issues in the UserPage test. Adding waitFor should help.

How was this tested?

Run locally multiple times, let's rerun it some times in the whole ci.
After running the ci 5 times, no more errors.

@EMaksy EMaksy added the bug Something isn't working label Aug 21, 2024
@EMaksy EMaksy self-assigned this Aug 21, 2024
@EMaksy EMaksy marked this pull request as ready for review August 21, 2024 09:47
Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!
Appreciated

@@ -36,7 +36,9 @@ describe('UsersPage', () => {
await act(async () => {
renderWithRouter(<UsersPage />);
});
expect(await screen.getByText('No data available')).toBeVisible();
await waitFor(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the wairFors in the screen.getByText and only leave them for the toast.
even though only the last one is failing, i'm fine having it in all 3 of them

@EMaksy EMaksy merged commit 69264d2 into main Aug 21, 2024
30 checks passed
@EMaksy EMaksy deleted the update_user_page_test branch August 21, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants