Repository navigation
[release/11.0.1xx][Tests] Observe handled Flyout back before cleanup - #39787
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b5d83ad-4b4b-4107-9a42-c1ada4de4e38
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39787Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39787" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the test-only Flyout handled-back fixture update.
No open issues 🎉
What changed in this PR
This test-only follow-up to #39742 addresses a Flyout handled-back fixture race on release/11.0.1xx, without changing product navigation behavior.
Changes:
- Wait for Detail2 before pressing Back, then verify it remains displayed and reports
BackButtonHandled=Truebefore cleanup. - Conditionally expose the existing view model’s handled status on Detail2, leaving ordinary screenshot scenarios unchanged.
| File | Description |
|---|---|
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/FlyoutPageFeatureTests.cs |
Moves readiness before Back and checks initial/final handled status before cleanup. |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/FlyoutPage/FlyoutControlPage.xaml.cs |
Adds a bound Detail2 status label only when back handling is enabled. |
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PureWeen
left a comment
There was a problem hiding this comment.
Adversarial review
Reviewed exact head 2c049b1fcd078270014484aadef62da0d1110fd4, covering both GitHub-reported changed files and all hunks. No actionable code defects survived causal and adversarial adjudication.
The handled-true fixture now waits for Detail2 before native Back, checks the initial False, and verifies both retained-page visibility and the same view model's event-derived True before starting cleanup. The conditional Detail2 label preserves ordinary Detail2 scenarios. This exercises the changed fixture contract without changing product navigation behavior; native execution was not independently performed for this assessment.
Follow-up observation: Assertion failures can leave Detail2 active in this shared ordered fixture. Recovery is a broader harness concern: an in-test finally pop would remove the failed-state screenshot and element-tree evidence captured afterward by teardown. Any recovery should preserve those diagnostics first; this is not raised as a required change to this narrow PR.
Method: 3 independent reviewers with adversarial consensus. Each independent reviewer read the complete changed sources and relevant call chains/history; disputed claims were checked against the exact-head code. Prior feedback included one COMMENT review, four issue comments, and no inline review comments. No prior finding is repeated; thread resolution status is unknown and no thread operation is needed.
Scope: code review only. CI/check status and merge readiness were not evaluated; use the repository's CI-analysis workflow for that assessment.
|
@dalexsoto stamp |
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!
Description of Change
A narrow servicing test-fixture fix targeting
release/11.0.1xx, following #39742. Source2c049b1fcd078270014484aadef62da0d1110fd4has the exact release commitdf9c5fd8109abf9411146d2fe041a2d8967e64edas its direct parent; there are no promotion imports or dependency changes.Flyout_BackButtonPressed_Handled_True_Should_Stop_Navigationpreviously performed back immediately after an asynchronous Detail2 push, then started asynchronous cleanup before reading the root handled-status label. The observed failure was a null reference at that immediate root-label read, not an established product back-dispatch failure.Move the existing Detail2 readiness wait before the back action. Expose the same view model's actual event-derived
BackButtonHandledon the current Detail2 page, only whenShouldHandleBackButtonis true. Assert the initialFalsevalue, then assert Detail2 is still displayed and the actual status becameTrue, before programmatic cleanup. Missing status explicitly fails equality.Only
FlyoutPageFeatureTests.csandFlyoutControlPage.xaml.cschange. The callback, default False value, event/handled-false tests, existing root labels, platform guards, case/category counts, waits, deadlines, retries, and all PNG bytes remain unchanged. Ordinary Detail2 snapshot scenarios do not receive the extra label.Native qualification — exact source, unchanged full/default
maui-pr-uitestsdefinition 313:No parameter or variable overrides were supplied. In build 1658186, the complete relevant Android CoreCLR API30 batch passed 269/273 with 0 failures and 4 existing skips; the complete native Windows batch passed 216/225 with 0 failures and 9 existing skips. All 21 Android and 13 Windows Flyout fixture cases passed, including existing screenshot assertions. Both complete case-name inventories match the original published batches. Both relevant batches passed on their first attempt; no retry occurred.
Raw native logs 5466 (Android) and 5143 (Windows), full paginated results, and both downloaded TRXs were inspected. Local pinned SDK11.0.100 / Android37.2.29 CoreCLR qualification also passed all 21 existing Android Flyout cases on an owned API30 emulator; both managed clients and the Android HostApp compiled successfully. No physical Apple or local macOS XCTest automation was used.
The broader default pipeline is still running and has other batches in failed/running states. This is qualification of the narrow Flyout fixture, not a claim that all CI is green. The original source passed this back case first and failed it on retry, so these results are not represented as a deterministic baseline-red/fix-green/revert-red causal certification.
Upstream recheck found no duplicate back-fixture implementation: #39779 currently changes no Flyout files; #38822 touches this test file only for unrelated RTL/title setup changes.
Issues Fixed
Follow-up to #39742: corrects the newly observed Flyout handled-true fixture race in build 1658120, Android retry run 46159644 / result 100203 (
NullReferenceException, 4853 ms, old test line 512). Original first/retry logs, failure accessibility bytes, and native TRXs are preserved with verified SHA256 hashes. The two separate Bugzilla55912 first-attempt failures were initial GridLabel/StackLabel waits before any tap and are not modified by this PR.