Changed to asynchronous test case for loading more results#2020
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2020 +/- ##
============================================
+ Coverage 70.07% 70.42% +0.35%
Complexity 1703 1703
============================================
Files 34 34
Lines 4484 4436 -48
============================================
- Hits 3142 3124 -18
+ Misses 1342 1312 -30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
osma
left a comment
There was a problem hiding this comment.
The change itself looks OK, but Cypress tests are still failing in CI for other reasons. (I restarted the tests to see if it helps)
|
I tried testing for the appearance and disappearance of the spinner as an indicator that the search results list is complete. I kept the 5 -> 6 search result list, as it removes all possibility for needing to scroll and test for the spinner twice. Edit: the spinner approach was also flagging with one CI-cypress test passing and one failing. Instead, I changed the test to waiting for the pagination rearch result API call to finish and then counting if the amount of results have changed from 5 to 6. That seemed to work. |
…ck the load more results API call has finished
Reasons for creating this PR
The cypress tests are failing for a unit test reoading more search results. This fixes it by changing to a more robust test case for testing the functionality of the same thing.
Link to relevant issue(s), if any
Description of the changes in this PR
Changed to a test case that returns only slightly more than 5 results
Known problems or uncertainties in this PR
Checklist
.sr-onlyclass, color contrast)