Skip to content

[ci-scan] Fix for Issue24996 ChangingTranslationShouldNotCauseLayoutPassOnAncestors failure on Mac - #38109

Merged
kubaflo merged 1 commit into
mainfrom
fixcifailure
Sep 2, 2026
Merged

kubaflo merged 1 commit into
mainfrom
fixcifailure

Conversation

@Ahamed-Ali

Copy link
Copy Markdown
Contributor

Root cause

App.WaitForElement("Stats") only waited for the existing element, not for its asynchronously updated text. CI could therefore read stale initialization/layout-pass values such as Lvl1[1/1], causing a flaky failure.

Description of change

Replaced the immediate text read with WaitForTextToBePresentInElement, which polls for Lvl1[0/0] for up to 15 seconds before asserting success. This allows the asynchronous counter reset and UI update to complete.

Issues Fixed

Fixes #36051

@github-actions

github-actions Bot commented Sep 2, 2026

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 -- 38109

Or

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

@Ahamed-Ali Ahamed-Ali added the community ✨ Community Contribution label Sep 2, 2026
@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.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Sep 2, 2026
@Ahamed-Ali Ahamed-Ali changed the title [ci-scan-net11] Fix for Issue24996 ChangingTranslationShouldNotCauseLayoutPassOnAncestors failure on Mac [ci-scan] Fix for Issue24996 ChangingTranslationShouldNotCauseLayoutPassOnAncestors failure on Mac Sep 2, 2026
@github-actions github-actions Bot added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Sep 2, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review September 2, 2026 11:40
@sheiksyedm
sheiksyedm requested review from kubaflo and a lite review from Copilot September 2, 2026 11:40
@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.

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.

🟡 Changes recommended

The PR description still contains template placeholder comments and is missing the required NOTE block at the top per repo PR requirements.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR aims to stabilize the Issue24996.ChangingTranslationShouldNotCauseLayoutPassOnAncestors UI test by waiting for the asynchronously-updated "Stats" label text before asserting, reducing races where the test reads stale counter values.

Changes:

  • Updated the test to use App.WaitForTextToBePresentInElement("Stats", "Lvl1[0/0]") instead of immediately reading GetText() after a tap.
  • Removed the NUnit.Framework.Legacy dependency by switching from ClassicAssert to Assert.That.
File summaries
File Description
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24996.cs Makes the UI test wait for the expected updated label text before asserting, to reduce flakiness from async UI updates.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

@kubaflo
kubaflo merged commit a95ff57 into main Sep 2, 2026
36 of 40 checks passed
@kubaflo
kubaflo deleted the fixcifailure branch September 2, 2026 13:59
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Sep 2, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 23, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 15df0d0e Deployed Sep 2, 2026 by Ahamed-Ali via conclusion #1697
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/macos macOS / Mac Catalyst testing-flakiness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci-scan] Regression: ChangingTranslationShouldNotCauseLayoutPassOnAncestors fails on macOS (maui-pr-uitests)

3 participants