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(tests): Try to reduce flakiness of visual tests #507

Merged
merged 3 commits into from
Dec 11, 2021

Conversation

adrienjoly
Copy link
Member

No description provided.

@cypress
Copy link

cypress bot commented Dec 11, 2021



Test summary

25 0 1 0Flakiness 0


Run details

Project Openwhyd
Status Passed
Commit 51e79ef ℹ️
Started Dec 11, 2021 3:44 PM
Ended Dec 11, 2021 3:47 PM
Duration 02:19 💡
OS Linux Ubuntu - 20.04
Browser Chromium 96

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@adrienjoly adrienjoly changed the title fix(tests): Split visual tests fix(tests): Try to reduce flakiness of visual tests Dec 11, 2021
@adrienjoly adrienjoly merged commit 9e6d6dc into master Dec 11, 2021
@adrienjoly adrienjoly deleted the fix/cypress-visual-split branch December 11, 2021 15:47
adrienjoly added a commit that referenced this pull request Dec 26, 2021
)

## Problem

Despite several attempts to improve the situation (see PRs #501, #504, #505, #507, #508, #510, #513, #520, #521, #522), Cypress tests are still flaky: they timeout for random reasons.

## Hypothesis

This timeout could be caused by the fact that:
- some XHR requests (e.g. to `/api/notif` to fetch notifications, and Deezer) may never respond => `onLoad` is never triggered
- when a new test starts, we call `/testing/reset` to refresh the DB, which can cause pending DB queries from never resolving

See #520 (comment).

## Proposed solution

- wait for Openwhyd server to be up and reset before running tests
- intercept and mock flaky XHR requests
- fail faster when test steps are hanging for too long
- reduce the amount of resources to load: fonts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant