[Testing] Fix for flaky UITests in CI that occasionally fail#35589
Merged
Conversation
This pull request improves the reliability and maintainability of `WebViewFeatureTests` by introducing a shared helper method for handling the `"Apply"` button flow. ### What changed * Added a new helper method, `TapApplyAndWaitForMainPage`, which: * Taps the `"Apply"` button * Waits for the main page to load * Retries up to three times to handle temporary UI failures * Replaced all direct `"Apply"` button tap-and-wait logic in the tests with the new helper method, ensuring consistent behavior across the test suite. ### Maintainability improvements * Added the `ApplyTapMaxAttempts` constant to centralize retry configuration and make future updates easier. ### Benefits These changes make the UI tests more stable, reduce duplicated code, and centralize the logic for interacting with the `"Apply"` button.
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35589Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35589" |
Member
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
rmarinho
approved these changes
May 22, 2026
This was referenced May 22, 2026
This was referenced May 23, 2026
devanathan-vaithiyanathan
pushed a commit
to devanathan-vaithiyanathan/maui
that referenced
this pull request
Jun 1, 2026
…35589) > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Backport of dotnet#35460 to `main`. /cc @PureWeen Co-authored-by: HarishKumarSF4517 <harish.kumar@syncfusion.com>
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Backport of #35460 to
main./cc @PureWeen