Skip to content

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

Merged
kubaflo merged 2 commits into
dotnet:inflight/currentfrom
HarishKumarSF4517:harish_flakytest_fix07
May 22, 2026
Merged

[Testing] Fix for flaky UITests in CI that occasionally fail#35460
kubaflo merged 2 commits into
dotnet:inflight/currentfrom
HarishKumarSF4517:harish_flakytest_fix07

Conversation

@HarishKumarSF4517
Copy link
Copy Markdown
Contributor

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

github-actions Bot commented May 15, 2026

🚀 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 -- 35460

Or

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

@Ahamed-Ali Ahamed-Ali added area-testing Unit tests, device tests testing-flakiness labels May 15, 2026
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kubaflo kubaflo changed the base branch from main to inflight/current May 22, 2026 10:06
@kubaflo kubaflo merged commit b01770d into dotnet:inflight/current May 22, 2026
31 checks passed
@github-actions github-actions Bot added this to the .NET 10.0 SR8 milestone May 22, 2026
rmarinho pushed a commit that referenced this pull request 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](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 #35460 to `main`.

/cc @PureWeen

Co-authored-by: HarishKumarSF4517 <harish.kumar@syncfusion.com>
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

Labels

area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration testing-flakiness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants