Fix flaky EnhancedNavigationTest by using retry-based assertions#66327
Merged
Conversation
a744aa3 to
044cadc
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses flakiness in Components enhanced-navigation E2E coverage by replacing point-in-time URI assertions with retry-based assertions, ensuring the test waits for navigation/query-string updates to complete before validating NavigationManager.Uri.
Changes:
- Replace
Assert.EndsWith(...)URI assertions with retry-basedBrowser.True(() => ...EndsWith(...))for enhanced-navigation flows. - Use
StringComparison.Ordinalfor deterministic URL suffix comparisons. - Remove the quarantine marker from the previously flaky test.
wtgodbe
approved these changes
Apr 15, 2026
Replace Assert.EndsWith (point-in-time) with Browser.True(() => ...EndsWith(...)) (retry-based) for assertions that follow a Click() triggering enhanced navigation. The race condition caused the assertion to read the URI before the navigation completed and the query string was appended. Fixes #66310 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
044cadc to
c6a3804
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace
Assert.EndsWith(point-in-time) withBrowser.True(() => ...EndsWith(...))(retry-based) for assertions that follow aClick()triggering enhanced navigation. The race condition caused the assertion to read the URI before the navigation completed and the query string was appended.Fixes #66310