Skip to content

[release/10.0.1xx-sr7] Fix BackButtonBehavior_IconOverride_CustomIconShownOnBackButton on iOS 26 - #35566

Merged
PureWeen merged 1 commit into
release/10.0.1xx-sr7from
fix/sr7-back-button-icon-override-ios26-test
May 21, 2026
Merged

[release/10.0.1xx-sr7] Fix BackButtonBehavior_IconOverride_CustomIconShownOnBackButton on iOS 26#35566
PureWeen merged 1 commit into
release/10.0.1xx-sr7from
fix/sr7-back-button-icon-override-ios26-test

Conversation

@PureWeen

Copy link
Copy Markdown
Member

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!

Issue

UI test BackButtonBehavior_IconOverride_CustomIconShownOnBackButton fails on iOS 26 (vlatest) on the release/10.0.1xx-sr7 branch.

  • Build: 1427432 (maui-pr-uitests on SR7 head bdca474345)
  • Failed twice (both attempts) — deterministic, not flaky
  • Failure: System.TimeoutException : Timed out waiting for element... at ShellNavigationFeatureTests.cs:line 922
  • Other platforms (Android API 30, iOS 18.5, MacCatalyst) all pass

Root cause

PR #35521 backported the _sendPopPending product fix from #34890 to SR7 and removed the Assert.Ignore from tests 50 and 51 (since the product is now fixed and those tests should pass on iOS 26).

It left in place an obsolete iOS 26 workaround in test 52:

[Test, Order(52)]
public void BackButtonBehavior_IconOverride_CustomIconShownOnBackButton()
{
    if (iOS26OrHigher)
    {
        NavigateToDetail1AndWait();   // ← obsolete after #35521
    }
    App.WaitForElement("Detail1GoBackButton");
    ...

That workaround was originally needed when test 51 was being skipped on iOS 26 (so test 52 started from Main and had to navigate to Detail1 itself).

Now that #35521 un-ignored test 51, the flow on iOS 26 is:

  1. Test 51 runs, calls NavigateToDetail1AndWait() and ends with ShellScreenshot() — UI is on Detail1, no reset
  2. Test 52 starts on Detail1, hits if (iOS26OrHigher) and tries to navigate Main → Detail1
  3. But we're already on Detail1, so NavigateToDetail1Button isn't visible → TimeoutException

This is purely a test state-leak bug — not a product regression.

Fix

Remove the now-redundant iOS26OrHigher block from test 52. After the removal, test 52 starts by tapping Detail1GoBackButton directly, which is correct because:

  • Test 51 leaves the UI on Detail1
  • Detail1GoBackButton is a custom page-content button (created via ShellNavHelper.CreateNavButton(..., "Detail1GoBackButton") in ShellNavigationControlPage.xaml.cs), not the shell back arrow — it is unaffected by test 51's IsVisibleButton toggle (which sets BackButtonBehavior.IsVisible=false on the shell back arrow)

Diff

 [Test, Order(52)]
 public void BackButtonBehavior_IconOverride_CustomIconShownOnBackButton()
 {
-    if (iOS26OrHigher)
-    {
-        NavigateToDetail1AndWait();
-    }
     App.WaitForElement("Detail1GoBackButton");
     App.Tap("Detail1GoBackButton");
     ...

Follow-up (main)

main and net11.0 have the opposite asymmetry: the product fix (_sendPopPending reset) is already there, but tests 50 and 51 still carry the Assert.Ignore (so iOS 26 coverage for those scenarios is silently skipped). When those Assert.Ignore lines get removed, the same workaround should also be removed from test 52 — otherwise main will hit the same failure this PR fixes here.

Validation

  • Tested locally: only the obsolete branch is removed; remaining test body matches the iOS 18.5 / Android / MacCatalyst flow that already passes
  • The 4 deleted lines were dead code on every other platform anyway (iOS26OrHigher is false there)
  • No product code touched

…ShownOnBackButton on iOS 26

PR #35521 backported the _sendPopPending product fix from #34890 to SR7
and also removed the Assert.Ignore from tests 50 and 51 (since the
product is now fixed and those tests should pass on iOS 26).

But it left in place the now-obsolete iOS26 workaround in test 52
(BackButtonBehavior_IconOverride_CustomIconShownOnBackButton) which
calls NavigateToDetail1AndWait() at the top of the test.

Test 51 now runs on iOS 26 and ends with the UI on Detail1 (it has no
reset). Test 52 then runs, hits the iOS26 workaround which tries to
navigate Main->Detail1, but we are already on Detail1, so
NavigateToDetail1Button is not visible and the test times out.

This is purely a test state-leak bug, not a product regression. The
fix is to remove the now-redundant iOS26 workaround. After the
removal, test 52 starts by tapping Detail1GoBackButton directly, which
is correct because test 51 leaves us on Detail1 with that button
visible (it is a custom page-content button, not the shell back arrow,
so it is unaffected by test 51's IsVisible=false setting).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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 -- 35566

Or

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

@github-actions github-actions Bot added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label May 21, 2026
@PureWeen

Copy link
Copy Markdown
Member Author

/azp run maui-pr-uitests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen
PureWeen merged commit ebe0ad7 into release/10.0.1xx-sr7 May 21, 2026
155 of 164 checks passed
@PureWeen
PureWeen deleted the fix/sr7-back-button-icon-override-ios26-test branch May 21, 2026 19:15
@github-actions github-actions Bot added this to the .NET 10 SR7 milestone May 21, 2026
PureWeen added a commit that referenced this pull request Jun 11, 2026
…xx-sr8 (#35810)

<!-- Please let the below note in for people that find this PR -->
> [!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!

## Cut-then-merge step 2 of 2

SR8 was cut from `main` at
[`e02d6b6dc2`](e02d6b6)
(commit "Add gh-aw rerun review scanner (#35685)"). This PR pulls the
SR7 stabilization work into SR8 so SR8 contains everything that's in
SR7.

- **Base:** `release/10.0.1xx-sr8` @
[`e02d6b6dc2`](e02d6b6)
- **Merging in:** `release/10.0.1xx-sr7` @
[`9da598b4a1`](9da598b)
(PatchVersion bump to 71)
- **Merge base:**
[`f8cb875e`](f8cb875eee)
("[Testing] The Windows WebView category is removed from CI…" #35335)
- **Strategy:** non-fast-forward merge commit (preserves both branches'
history)

## Conflict resolution

Two trivial conflicts, both resolved by taking the SR8 (`HEAD`) side:

| File | Why it conflicted | Resolution |
| --- | --- | --- |
|
[`eng/Versions.props`](https://github.com/dotnet/maui/blob/release/10.0.1xx-sr8/eng/Versions.props)
| SR7 bumped `PatchVersion` 70→71 (#35786); SR8 starts at 80 | Keep
`PatchVersion=80` (SR8 is the higher patch band) |
|
`src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs`
| Whitespace-only difference (`false; //` vs `false; //`) in two
comments | Keep SR8's whitespace |

No semantic conflicts.

## Inherited from SR7

26 SR7-only commits land in SR8 via this merge. The source PRs are:

<details>
<summary>Source PRs (43, deduped by commit)</summary>

#35020, #35072, #35092, #35150, #35223, #35299, #35305, #35347, #35356,
#35359, #35360, #35421, #35423, #35424, #35425, #35426, #35427, #35428,
#35430, #35434, #35441, #35447, #35461, #35480, #35503, #35520, #35521,
#35559, #35566, #35585, #35625, #35642, #35664, #35689, #35690, #35691,
#35692, #35693, #35694, #35703, #35744, #35768, #35786

Includes the SR7 revert chain:
- #35689 — Revert PR #30068 (FontImageSource centering on Windows)
- #35694 — Revert TalkBack RadioButton fix
- #35703 — Revert Shell.NavBarIsVisible fix
- #35744 — Revert HybridWebView WebView fix
- #35461, #35503 — additional Android reverts
</details>

After this lands, the release-readiness tracker can survey
`release/10.0.1xx-sr8` directly instead of using `-Candidate
-InheritFromPriorSr` mode against SR7.
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant