test(angular): remove routing waits in tests #28532
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: N/A
What is the current behavior?
Our Angular E2E tests are brittle because they rely on arbitrary
cy.wait
calls to account for asynchronous routing. This leads to flaky tests on CI and seemingly random test failures when we make adjustments to the Ionic Anguar routing integration (see: #28188)Additionally, our test execution for the navigation tests is quite slow because transitions are enabled. As a result, we need to wait hundreds of ms per test just for the transitions to finish.
What is the new behavior?
testStack
command to use a newgetStack
Cypress query. These queries come with automatic retrying built-in. By leveraging this query in thetestStack
command, we can avoid the arbitrary waits.ionic:_testing=true
query strings to the navigation tests. This causes Ionic to disable any transitions so the tests execute faster.cy.wait
calls. I kept the swipe to go backcy.wait
-- I wasn't quite sure how to reduce flakiness on that one.Does this introduce a breaking change?
Other information