Skip to content

[ci-fix] De-flake ShellContentShouldRespectSafeAreaEdges_After_Navigation: wait before tap (refs #37653) - #37999

Merged
kubaflo merged 1 commit into
mainfrom
ci-fix/issue-37653-21d3c39dd9ceeb64
Aug 30, 2026
Merged

kubaflo merged 1 commit into
mainfrom
ci-fix/issue-37653-21d3c39dd9ceeb64

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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!

Workflow artifact: ci-fix
Artifact kind: deflake
Refs: #37653
Target branch: main
Attempt: 1/10

Attempt 1 of 10

Wait for the Shell navigation button to be ready before the test taps it.

Previous attempts (prior commits on this PR)

No prior attempts.

This attempt differs by adding deterministic synchronization at the first interaction rather than changing product behavior, increasing a timeout, or retrying the test.

Root cause

The CI log reports ShellContentShouldRespectSafeAreaEdges_After_Navigation timing out while waiting for the expected element. In Issue32941.cs, the test waited for MainPageLabel and then immediately tapped GoToSignOutButton; the button could still be unavailable while the Shell page finished mounting.

Flake class: test-quality

Why this was flaky

The test synchronized on a label that proves the initial page is visible, but not on the separate button it interacts with. In build 1573324 the test failed after 18 seconds and then passed in 3 seconds on retry, which is consistent with that readiness race rather than a deterministic safe-area failure.

De-flake

The test now calls WaitForElement("GoToSignOutButton") immediately before Tap. No assertion was weakened, no timeout was increased, and no retry attribute was added.

Fix

Add the repository-standard readiness wait for the exact element being tapped. This is the smallest correction to the test interaction and leaves the navigation and safe-area assertions unchanged.

What is unverified / where I need help

  • The Android UI test could not be run because this runner has no Android UI-test device rig.
  • Please confirm on the gated Android UI-test leg that the button wait removes the intermittent navigation timeout while the existing safe-area assertions remain green.

Validation

  • Command: not run because no Android UI-test device rig is available in this runner
  • Result: not run

Evidence


Filed by ci-status-fix. This is the single PR for #37653: the workflow watches its own CI and pushes up to 10 attempts on this same PR (it never opens a second PR). It advances only when the fix's own build settles red and that red is caused by the fix. Comments, reviews, and commits do not transfer ownership; the loop remains autonomous until this PR is closed. Eligible CHANGES_REQUESTED reviews are handled through Track C. After 10 attempts it stops and defers to humans. In round 1 a maintainer still needs to comment /azp run maui-pr (plus the gated uitests/devicetests legs when relevant) to exercise each new commit.

Generated by CI Failure Fixer (main) · gpt56 · 615.6 AIC · ⌖ 86.4 AIC · ⊞ 31.1K · ◷

…pt 1/10)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown
Contributor Author

♻️ Attempt 1/10: red is an unrelated infrastructure/build flake on the macOS Release build leg: MSBuild terminated with an unhandled System.NullReferenceException while building Maui.Controls.Sample.csproj (AzDO build 1573971, log 229). The UI-test synchronization change is not implicated. A maintainer re-run (/azp run maui-pr) should clear it; the gated maui-pr-uitests leg still needs /azp run maui-pr-uitests before the target test can be validated.

Generated by CI Failure Fixer (main) · gpt56 · 176.2 AIC · ⌖ 24.3 AIC · ⊞ 31.1K · ◷

@kubaflo
kubaflo marked this pull request as ready for review August 30, 2026 12:41
Copilot AI lite review requested due to automatic review settings August 30, 2026 12:41
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@kubaflo
kubaflo merged commit abdfbef into main Aug 30, 2026
21 of 30 checks passed
@kubaflo
kubaflo deleted the ci-fix/issue-37653-21d3c39dd9ceeb64 branch August 30, 2026 12:41
@github-actions github-actions Bot added this to the .NET 10 SR11 milestone Aug 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Pull request overview

This PR de-flakes the Issue32941 UI test by adding deterministic synchronization before the first navigation interaction, reducing timing races in CI without changing any assertions or product behavior.

Changes:

  • Add an explicit WaitForElement("GoToSignOutButton") immediately before tapping the button in ShellContentShouldRespectSafeAreaEdges_After_Navigation().
File summaries
File Description
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32941.cs Adds a readiness wait for the exact element being tapped to avoid intermittent navigation timing failures.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants