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

Flakiness in testing for restricted course tabs #374

Open
smartspot2 opened this issue Jan 15, 2023 · 0 comments
Open

Flakiness in testing for restricted course tabs #374

smartspot2 opened this issue Jan 15, 2023 · 0 comments
Labels
bug Something isn't working sev5 Low severity - General guidance

Comments

@smartspot2
Copy link
Member

See the following for error logs:

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.

@smartspot2 smartspot2 added the bug Something isn't working label Jan 15, 2023
@smartspot2 smartspot2 added the sev5 Low severity - General guidance label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sev5 Low severity - General guidance
Projects
None yet
Development

No branches or pull requests

1 participant