Skip to content

[Testing] Fix for flaky UITests in CI that occasionally fail#35589

Merged
rmarinho merged 1 commit into
mainfrom
backport/pr-35460-to-main
May 22, 2026
Merged

[Testing] Fix for flaky UITests in CI that occasionally fail#35589
rmarinho merged 1 commit into
mainfrom
backport/pr-35460-to-main

Conversation

@kubaflo
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo commented May 22, 2026

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

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.
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35589

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35589"

@kubaflo kubaflo enabled auto-merge (squash) May 22, 2026 12:52
@rmarinho
Copy link
Copy Markdown
Member

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rmarinho rmarinho disabled auto-merge May 22, 2026 15:47
@rmarinho rmarinho merged commit b0ea772 into main May 22, 2026
39 of 158 checks passed
@rmarinho rmarinho deleted the backport/pr-35460-to-main branch May 22, 2026 15:47
@github-actions github-actions Bot added this to the .NET 10.0 SR8 milestone May 22, 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants