Fix flaky integration tests
The following tests tend to fail with "Timed out retrying after 4000ms"
1) can copy selected into the collection
This one too:
1) can share projects to other users
1) Page not found tests
#4 Updated by Lucas Di Pentima 13 days ago
I've been looking for methods to reduce test flakyness. I think that one of the causes is the fact that we use
cy.visit() to go to specific URLs. This makes the browser go to the url and reloading the entire app in the process... which introduces delays because on app boostrap, there're lots of things going on in the background.
One idea would be to stop using
cy.visit() and somehow access the app's router from Cypress, so we can push new URLs to the browser's history and let the app react to it, this I think will improve response times a lot. I've found a couple of hints on how to do this:
and more react specific:
#9 Updated by Lucas Di Pentima about 13 hours ago
Updates at arvados-workbench2|e76af0d - branch
- Avoids using multi-slash URLs on Cypress requests.
- Fixes issue that made the 'page not found' message to not be displayed on unknown routes.
- Adds app router navigation capabilities to Cypress tests, to improve reliability and speed.
- Adds object cleanup before every test to avoid potential issues and test slowness.
cy.loginAs()command to avoid leaking session data if used more than once on a single test.
- Fixes favorites suite test that relied on the above bug to sometimes pass.