Description
See the following for error logs:
- Workflow logs: https://github.com/csmberkeley/csm_web/actions/runs/3916522346/jobs/6695702399
- Cypress Cloud logs: https://cloud.cypress.io/projects/ar111y/runs/59/test-results/7fc7741a-5b58-433f-a05a-a800226f6b6f
When switching between tabs in the test, it seems like there is an update to the restricted tab in a later re-rendering of the component. In particular, by design we want to default to the restricted courses tab if the user is whitelisted for any restricted courses, but we want to default to unrestricted courses otherwise. This processing of the courses data causes a delay before swapping to the restricted courses upon page load, meaning the click gets overridden, failing the test.
A dirty (and discouraged) fix would be to add a cy.wait
before clicking the tab, though a better solution would be to try remove this rendering delay, so that it's impossible for a user click to be overridden by the re-rendering. However, this is a very hard thing to test for, as reproducing this bug is incredibly difficult locally; it all depends on the load time and rendering time of the webpage.
Additionally, these observations could be wrong and not the source of the error—it shouldn't be a Cypress issue (as 8a9a74b fixes all the Cypress retry errors, and the Cypress logs show it waited for 4s before timing out), but it could be caused by something else.
Activity