Repository navigation
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38780Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38780" |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Native text-entry-to-trigger and rendered-result coverage needs final human review.
Review effort: Lite
Findings: None
What changed in this PR
Migrates shared managed behavior from device/UI tests into host-based unit and XAML suites, removing redundant tests and trigger snapshots.
Changes:
- Adds Essentials, Core, Controls, and multi-inflator XAML unit coverage.
- Removes duplicated device/UI tests and obsolete baselines.
- Documents test-suite selection and migration guidance.
| File | Reviewed change |
|---|---|
src/Essentials/test/UnitTests/WebUtils_Tests.cs |
Adds query-parsing coverage. |
src/Essentials/test/UnitTests/Share_Tests.cs |
Adds share validation coverage. |
src/Essentials/test/UnitTests/Location_Tests.cs |
Adds location-copy coverage. |
src/Essentials/test/UnitTests/Launcher_Tests.cs |
Adds malformed-URI coverage. |
src/Essentials/test/DeviceTests/Tests/WebUtils_Tests.cs |
Removes migrated tests. |
src/Essentials/test/DeviceTests/Tests/Share_Tests.cs |
Removes duplicate validation tests. |
src/Essentials/test/DeviceTests/Tests/Maps_Tests.cs |
Removes migrated map validation tests. |
src/Essentials/test/DeviceTests/Tests/Launcher_Tests.cs |
Removes the migrated URI test. |
src/Essentials/test/DeviceTests/Tests/Android/Geolocation_Tests.cs |
Removes the migrated copy test. |
src/Core/tests/UnitTests/ImageSource/ImageSourceServiceTests.cs |
Adds service resolution and disposal coverage. |
src/Core/tests/UnitTests/ElementTests.cs |
Moves handler lookup coverage to unit tests. |
src/Core/tests/DeviceTests/Services/ImageSource/ImageSourceServiceTests.cs |
Removes migrated service tests. |
src/Controls/tests/Xaml.UnitTests/TriggerBindingScenarios.xaml.cs |
Adds multi-inflator trigger scenarios. |
src/Controls/tests/Xaml.UnitTests/TriggerBindingScenarios.xaml |
Defines trigger test scenarios. |
src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj |
Links shared trigger test support. |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35399.cs |
Removes migrated UI coverage. |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30690.cs |
Removes migrated refresh tests. |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue26977.cs |
Removes duplicate UI coverage. |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue16910.cs |
Removes migrated binding coverage. |
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TriggersFeatureTests.cs |
Removes migrated trigger tests. |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Triggers/TriggersViewModel.cs |
Updates shared trigger test support. |
src/Controls/tests/DeviceTests/Elements/RefreshView/RefreshViewTests.cs |
Removes migrated managed tests. |
src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs |
Adds selected-state regression coverage. |
src/Controls/tests/Core.UnitTests/RefreshViewTests.cs |
Adds binding and refresh-prevention coverage. |
src/Controls/tests/Core.UnitTests/MapperTests.cs |
Moves mapper checks to unit tests. |
docs/DevelopmentTips.md |
Documents suite-selection guidance. |
|
|
||
| namespace Microsoft.Maui.Controls.Xaml.UnitTests; | ||
|
|
||
| public partial class Maui6932 : ContentPage |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
| var stack = new Page[] { null }.Concat(expected.Skip(1)); | ||
| Assert.Equal(stack, shell.Navigation.NavigationStack); | ||
| Assert.Equal(stack, shell.CurrentItem.CurrentItem.Stack); |
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
|
/azp run maui-pr-uitests |
|
/azp run maui-pr-devicetests |
|
/rebase |
Migrate or deduplicate 30 device-test methods and 15 UI-test methods into existing host unit suites. Replace logical trigger snapshots with all-inflator XAML assertions, remove 55 unused baselines, and document the native-test boundary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace 75 additional UI-test methods with direct value assertions over gallery visual states, BindableLayout behavior, and XAML regressions. Remove 35 unused snapshots while retaining native interaction and rendering smoke coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Consolidate 63 UI methods into managed coverage, including 18 quarantined cases. Add 60 unit cases for Shell, Button, AbsoluteLayout, menus, and safe-area policy. Replace two retained layout screenshots with native assertions and remove 143 obsolete baselines while retaining OS and rendering coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore all 24 gallery files to their original contents and define the seven required global imports once in Controls.Xaml.UnitTests. Preserve existing attribute and System.Drawing.Color bindings at the three ambiguous unit-test sites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the native layout assertions on every platform without calling IsKeyboardShown on unsupported desktop drivers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the original Windows proportional-layout baseline because Win2D BoxView is not exposed through UI Automation. Retain native bounds assertions on the other platforms and document the boundary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve all first-run coverage and diagnostic attachments when retrying UI failures, without replaying successful categories. Remove external WebView navigation and exact-text input races, wait for replacement flyout content, and prevent Play Store updates from covering the CI emulator. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The full script gate exposed two stale expectations left after #38689 switched Review-Tests.ps1 to GPT-6 Astra. Keep the existing model and no-environment-override guards; update only the test expectations. All 2309 workflow Pester checks pass. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Accept VSTest's zero notExecuted counter while still validating every result and total/executed count. Add reproductions for initial and retry reports plus malformed counters. Restrict verified Store disablement to freshly created disposable CI emulators, since force-stop did not prevent its updater reclaiming the foreground. All 2318 script checks pass. The three unchanged native action-sheet cases pass on API30, and merging them into the actual failed CI report preserves all 25 cases (24 passed, one original skip). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the UIA accessibility opt-out case out of unsupported platform fixtures instead of ignoring it after setup. Preserve Windows native coverage, the six cross-platform cases, and strict retry-result validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ede28fb to
5284b2b
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the two unresolved moderate findings in the XAML inflator coverage and Maui6932 detachment assertions.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (5)
Symlink bypass allows publishing arbitrary agent files Validate that every test entry has a corresponding result Gallery tests omit XamlC and SourceGen inflator coverage · New This usesnew Page[] { null }even thoughPageis a non-nullable reference type under nullable… Use the correct issue metadata for the BindableLayout fixture
| <_GalleryTestPage Include="..\TestCases.HostApp\FeatureMatrix\SafeArea\Border\SafeAreaBorderPage.xaml" /> | ||
| <_GalleryTestPage Include="..\TestCases.HostApp\FeatureMatrix\SafeArea\Layout\Grid\SafeAreaGridPage.xaml" /> | ||
| <Compile Include="@(_GalleryTestPage->'%(Identity).cs')" Link="TestCases\%(Filename)%(Extension)" /> | ||
| <MauiXaml Include="@(_GalleryTestPage)" Link="TestCases\%(Filename)%(Extension)" Inflator="Runtime;SourceGen;XamlC" /> |
PureWeen
left a comment
There was a problem hiding this comment.
Adversarial review by an independent reviewer: no actionable, PR-caused code defects found.
Three independent reviewers assessed the changed managed-test migrations, retained native-coverage boundaries, and UI-test retry/reporting changes. Two initially raised candidates were disproven during structured dispute: published retry reports rebase attachments while raw archived reports are diagnostic-only, and retained device tests continue to exercise native Button stroke mapping.
Test coverage assessment: the change replaces selected UI/device checks with focused unit coverage while retaining native handler coverage for platform behavior.
Prior review status: existing PR feedback was considered for duplication.
Scope: code review only. CI/check status and merge readiness were not evaluated; use the repository's CI-analysis workflow for that assessment.
There was a problem hiding this comment.
Expert Review — 0 findings
Reviewed commit 5284b2b.
Source assessment incomplete (7/8 dimensions); finding count is partial.
PR Test Gate |



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
Move or deduplicate 30 device-test methods and 153 UI-test methods into existing host-based unit suites: 183 slow-test methods removed. Remove 232 unused snapshot baselines across Android, Android notch, iOS, iOS 26, Mac Catalyst, and Windows (10,014,320 bytes, approximately 10.01 MB). Keep native coverage for behavior that cannot be proved by managed unit tests.
The expanded migration adds 63 UI-method removals, 60 unit cases, and 142 snapshot removals beyond the earlier batches. It includes 18 methods quarantined in #38777: seven AbsoluteLayout methods, seven menu operations, and four Shell event methods. This does not claim to resolve all 125 quarantined method/platform pairs or their underlying platform behavior.
The four removed safe-area background tests only checked a status label saying
None; they did not verify rendering behind system UI. Their replacements assert the target control's policy, padding, gradient stops and reset behavior. Native inset, keyboard, orientation and additive-padding tests remain. Retained ordered padding tests reset their options to avoid leaking state after neighboring tests are removed.The retained AbsoluteLayout proportional-layout smoke test compares native bounds and edge anchors without density assumptions, using bounded polling and two-pixel rounding tolerance. Windows retains its original visual assertion and unchanged baseline: its Win2D-backed BoxView is not exposed through UI Automation. Soft-keyboard visibility queries are limited to Android/iOS. Visibility is checked through disappearance and restoration of real native elements.
Earlier batches cover:
Maui26977coverage instead of duplicate UI executionGallery replacements source-link the real markup, view models, converters, trigger action and event handlers rather than copying their state machines. Imports required by source-linking are centralized in the unit project's
Usingitems, not scattered through gallery files. Shell tests use the existingShellTestBaseandIShellControllerselection, rather than assumingCurrentItemassignment has native-selection semantics.Native coverage retained: representative font/image rendering, native menu accessibility, disabled input, focus, keyboard completion, gestures, live collection updates, flyout/tab/back-button navigation and OS safe areas. Managed event invocation is not considered proof that native controls raise or suppress events. Manual gallery reproductions and required ordered-fixture setup remain.
CI reliability follow-up
Follow-up commits
5b8fd8d679,fcb038c561, andede28fbc0caddress failures observed while running the retained native coverage:veniambeing changed tovenom. No screenshot baseline or tolerance is changed.HtmlWebViewSourceto a real URL and back/forward through native WebView history. Actual document titles signal navigation readiness; the fixed sleep is removed. The server is canceled when the page unloads.notExecutedcan remain zero while individualNotExecutedresults andtotal - executedaccount for the skips. CI exposed this compatibility gap in the new helper; regression tests reproduce it before the correction. Every case, other counter and failure safeguard remains checked, and merged reports retain the original skips.Assert.Ignoreafter fixture setup on other platforms. Mac CI lost its Appium connection and reported that unsupported case as a setup failure; the retry passed all eleven runnable cases but correctly refused to replace the unsupported case's failure with a skip. Windows retains the native assertion, all six cross-platform accessibility cases remain, and the strict skipped-replacement guard is unchanged. This is not a new quarantine or a conversion of a failure into a pass.CI also exposed two stale policy-test assertions left after #38689 changed the local test reviewer to GPT-6 Astra. Follow-up
c7f19cfd00updates those expectations only; the pinned model, no-environment-override guards and separate primary-reviewer configuration are unchanged.These are test-fixture and CI changes, not production framework changes. The replacement unit projects already run in the Helix unit-test pipeline.
docs/DevelopmentTips.mddocuments migration boundaries and retry behavior. Counts above are source methods, not scheduled platform executions; end-to-end pipeline time savings have not yet been measured.Validation
The expanded migration's related host-unit selections passed 510 cases: 183 gallery cases and 327 Shell cases. TRX definitions confirmed execution of all 60 newly added unit cases (14 AbsoluteLayout, 18 Button, 10 MenuBar, eight safe-area and 10 Shell). Earlier focused Core/Essentials/Controls/XAML selections passed 395 cases with two existing skips; these overlapping counts are not additive.
At the preceding published head
fa27c506ed, main build 1609172 and device build 1609174 succeeded; seven device Helix jobs and 46 aggregate result XMLs were inspected with no failures. Both retained AbsoluteLayout tests passed on all four platforms in UI build 1609173. Other native failures in that UI build prompted the follow-up above; those prior-head results are not claimed as validation of the follow-up.For the reliability follow-up:
fcb038c561. The exact current-head run 35955875938 also passed all 2,318 checks.actionlint.fcb038c561andede28fbc0ciOS CI passed the retained native screenshot cases.ede28fbc0c, all four UI assemblies were rebuilt and actual discovery checked: seven [Windows] AutomationId does not work for ContentView, Layouts and controls that inherit them #4715 cases on Windows, six on Android/iOS/Mac. Current-head native CI then passed all six common cases on every target; the Windows-only native opt-out case passed in 44525220/100009 and was absent elsewhere. This verifies native execution as well as compilation/discovery. Formatting and patch checks passed.At head
fcb038c561, main build 1610024 succeeded. The corrected device inventory contains 60 unique XML reports: 46 from original jobs and 14 from subsequent retry jobs, including both Windows packaging modes. These are reports, not deduplicated test counts. The originally failing gesture and default-ItemsLayout CarouselView cases passed unchanged in the Android CoreCLR and Catalyst retry reports; no speculative leak-test or GC-helper changes were retained. That device build still failed because an Essentials worker had no emulator (DEVICE_NOT_FOUND, exit 81); that attempt produced no result and is not counted as passing coverage. Local ARM64/API36 leak probes still reproduce baseline failures; these are not claimed fixed.Head-
fcb038c561UI evidence exposed the Mac platform-eligibility problem corrected above and the unchanged Android/API36 safe-area failure tracked by #37556. The incomplete old UI build was superseded; it is not presented as a completed green run. Windows native execution was not performed locally; the earlier local Mac Catalyst UI attempt was blocked by host authentication.Current head
ede28fbc0c: all three pipelines were observed to completion after one/azp runrequest.ImageWithUndefinedSizeAndWithBackgroundSetRendersfailed in both Mono attempts, on different workers. This exactly matches the existing [ci-scan] ImageWithUndefinedSizeAndWithBackgroundSetRenders fails on Android #38740 failure onmainbuild 1600801: the same assertion and byte-identical 100x100 captured PNG. The baseline Helix job was correlated from that build's own log, not a source/time guess. Latest-main 1608679 and the original base 1605580 passed the exact case; nine fresh local native executions also passed the unchanged 11-case Image fixture (99/99). No speculative readiness delay, assertion weakening, new skip or product correction was published.Issue22306.ButtonsLayoutResolveWhenParentSizeChangesfails itsOriginal2screenshot with 1.85% difference, exactly as on the PR's base commit inmainbuild 1606067, run/result 44375582/100232. Test, HostApp and baselines are unchanged. The current artifact preserves 216 original cases, retries only 38 fixture cases, and correctly keeps the final result red: 212 passed, one failed, three original skips. The Brush failure recovered; the persistent Button failure was not hidden. The separate green Android Mono and Mac runs are not CoreCLR retries.Observation is complete for this head. The two remaining native failures have exact target-branch matches and remain visible; they are not claimed fixed. CI is not entirely green, and this evidence is not a merge-readiness approval.
Issues Fixed
N/A - test-suite migration, deduplication and retained-test reliability; no product issue is closed by this PR. Selected quarantined coverage comes from #38777.