Skip to content

[Testing] Feature matrix UITest Cases for MenuBarItem Control#34007

Open
HarishKumarSF4517 wants to merge 14 commits intodotnet:mainfrom
HarishKumarSF4517:harish_feature_matrix_menubaritem
Open

[Testing] Feature matrix UITest Cases for MenuBarItem Control#34007
HarishKumarSF4517 wants to merge 14 commits intodotnet:mainfrom
HarishKumarSF4517:harish_feature_matrix_menubaritem

Conversation

@HarishKumarSF4517
Copy link
Copy Markdown
Contributor

@HarishKumarSF4517 HarishKumarSF4517 commented Feb 12, 2026

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!

This pull request adds a new comprehensive feature matrix test page for MenuBarItem controls, enhancing the test coverage for menu bar functionality in the application. The new page includes a rich XAML UI for interacting with MenuBarItem elements and associated controls, as well as supporting code-behind logic for dynamic menu item population and selection management.

New MenuBarItem Feature Matrix Page:

  • Added a new entry for the MenuBarItemControlPage to the list of feature matrix test pages, making it accessible from the test host app.

  • Introduced the MenuBarItemControlPage.xaml, featuring a detailed UI for testing and interacting with MenuBarItem elements, including dynamic menu items, status displays, entry fields, menu controls, and a locations collection view.

  • Implemented MenuBarItemControlPage.xaml.cs with logic to:

    • Dynamically populate the "Change Location" menu based on the view model's locations collection.
    • Ensure only one location can be selected at a time, updating the selected index accordingly.
    • Handle collection and property changes for location items to keep the menu and selection state in sync.
    • On MacCatalyst, trigger a menu rebuild when the page loads to ensure menu visibility.
MenuBarfeature.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 12, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @@HarishKumarSF4517! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 12, 2026
@Ahamed-Ali Ahamed-Ali added the area-controls-menubar Desktop MenuBarItems label Feb 12, 2026
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm sheiksyedm marked this pull request as ready for review February 12, 2026 12:34
Copilot AI review requested due to automatic review settings February 12, 2026 12:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new MenuBarItem “Feature Matrix” page to the Controls TestCases HostApp and introduces a corresponding set of Appium-based UI feature tests (desktop-focused) to exercise MenuBarItem/menu flyout behavior.

Changes:

  • Added a new FeatureMatrix page (MenuBarItemControlPage) with XAML UI + code-behind for dynamic “Change Location” menu population and selection handling.
  • Added a new view model (MenuBarItemViewModel) driving menu state, commands, and a locations collection.
  • Added a new FeatureMatrix UI test suite (MenuBarItemFeatureTests) and registered the page in the gallery list.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs New desktop-focused Appium UI tests for the MenuBarItem feature matrix page.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemViewModel.cs View model backing the feature matrix page (menu text/enabled state, locations, commands).
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml.cs Code-behind for dynamic submenu population and location selection sync.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml New XAML feature matrix UI for interacting with MenuBarItems and related controls.
src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs Registers the new “MenuBarItem Feature Matrix” page in the gallery.

@rmarinho
Copy link
Copy Markdown
Member

rmarinho commented Feb 18, 2026

🤖 AI Summary

📊 Expand Full Review
🔍 Pre-Flight — Context & Validation
📝 Review SessionAddressed the copilot suggestions · a0f36d2

PR: #34007 - [Testing] Feature matrix UITest Cases for MenuBarItem Control
Author: HarishKumarSF4517 (Syncfusion partner)
Labels: community ✨, area-controls-menubar, partner/syncfusion
Type: Test-only PR (no bug fix – adds new feature matrix test coverage)
Linked Issue: None
Platforms Affected: Windows and MacCatalyst only (tests wrapped in #if MACCATALYST || WINDOWS)

Files Changed

File Type Changes
src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs Modified +1 (registers new page in gallery)
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml New +231 (XAML for feature matrix page)
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml.cs New +113 (code-behind, Shell subclass)
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemViewModel.cs New +482 (ViewModel with commands/locations)
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs New +536 (22 UI tests)

Key Findings

PR Overview:
The PR adds a new "MenuBarItem Feature Matrix" page to the HostApp and 22 Appium-based UI tests that exercise MenuBarItem/menu flyout behavior on desktop. The MenuBarItemControlPage extends Shell (correct for MenuBarItem), backed by MenuBarItemViewModel using commands and an ObservableCollection of locations.

Platform Note:
Tests are entirely #if MACCATALYST || WINDOWS scoped. Some tests within are further guarded with #if WINDOWS or #if TEST_FAILS_ON_CATALYST. Android testing is NOT applicable for this PR – MenuBar is a desktop-only control.

Copilot PR Review Comments (8 total):

Thread Issue Resolved Actually Fixed?
MenuBarItemControlPage.xaml.cs:94 OnLocationsCollectionChanged doesn't handle Reset action – old handlers leak on Locations.Clear() ✅ Resolved ❌ No fix in code
MenuBarItemControlPage.xaml.cs:60 OnLocationPropertyChanged only handles IsSelected, not Name – submenu doesn't update on rename ✅ Resolved ❌ No fix in code
MenuBarItemViewModel.cs:328 OnExit called Application.Current?.Quit() – terminates HostApp during tests ✅ Resolved ✅ Fixed (Quit commented out, now updates StatusMessage)
MenuBarItemFeatureTests.cs:230 Disabled-menu tests used broad catch { Assert.Pass() } ✅ Resolved ✅ Fixed (now use #if TEST_FAILS_ON_CATALYST with Assert.That(elements, Is.Empty))
MenuBarItemFeatureTests.cs:441 WaitForNoElement("Custom Location") uses text as AutomationId ✅ Resolved ❌ No fix in code
MenuBarItemFeatureTests.cs:163 Edit-location flow didn't tap ConfirmButton ✅ Resolved ✅ Fixed
MenuBarItemFeatureTests.cs (typo) Test name: ResetRestolesDefaultLocations ✅ Resolved (Outdated) ✅ Fixed (ResetRestoresDefaultLocations)
MenuBarItemFeatureTests.cs:37 MenuBarItem_FileMenuExit only opens File menu + screenshot, doesn't test Exit ✅ Resolved ❌ Still misleading name/comments

Additional Observations:

  • MenuBarItemControlPage does NOT have an [Issue] attribute – consistent with other FeatureMatrix pages
  • Category [Category(UITestCategories.Shell)] is reasonable (MenuBarItem is a Shell feature)
  • OnReset calls Locations.Clear() which fires NotifyCollectionChangedAction.Reset – the leaked PropertyChanged subscriptions will re-accumulate on each Reset call
  • MenuBarItem_FileMenuExit test description says "click Exit" but only opens the File menu and calls VerifyScreenshot()

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34007 Adds 22 feature matrix UI tests for MenuBarItem (desktop-only) ⏳ PENDING (Gate) 5 files (+1363) Original PR – test addition, not bug fix

🚦 Gate — Test Verification
📝 Review SessionAddressed the copilot suggestions · a0f36d2

Result: ⚠️ NOT APPLICABLE
Platform Requested: android
Platform Available for Tests: MacCatalyst, Windows (desktop-only)
Mode: N/A – Test-only PR, no bug fix to verify

Explanation

This PR adds new test coverage (feature matrix tests) for MenuBarItem. It is NOT a bug fix PR. The standard Gate verification (tests FAIL without fix → PASS with fix) does not apply because:

  1. No fix files exist – there are no source code changes to revert/restore
  2. Tests are desktop-only – all tests are wrapped in #if MACCATALYST || WINDOWS and will not compile on Android
  3. Android testing is not applicable – MenuBar is a desktop control (Windows/MacCatalyst only)

Tests Exist: ✅ Yes

The PR includes 22 UI tests in MenuBarItemFeatureTests.cs targeting:

  • MenuBarItemControlPage HostApp page (Shell-based)
  • MenuBarItemViewModel backing

Platform Determination

Since no fix verification is possible, Gate is marked as NOT APPLICABLE. Code review findings from Pre-Flight document remaining concerns.


🔧 Fix — Analysis & Comparison
📝 Review SessionAddressed the copilot suggestions · a0f36d2

Status: SKIPPED – Test-only PR, no bug fix to explore alternatives for

This PR adds new test coverage for MenuBarItem. There are no fix files to revert/restore, so the try-fix exploration workflow does not apply.

Code quality issues were documented in Pre-Flight and are addressed in the Report phase.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34007 Adds 22 feature matrix UI tests for MenuBarItem N/A (test-only) 5 files (+1363) No bug fix – try-fix not applicable

Exhausted: N/A
Selected Fix: PR's tests (only candidate – test addition PR)


📋 Report — Final Recommendation
📝 Review SessionAddressed the copilot suggestions · a0f36d2

⚠️ Final Recommendation: REQUEST CHANGES

Summary

PR #34007 adds a feature matrix test page and 22 UI tests for MenuBarItem (desktop-only: Windows and MacCatalyst). The PR is a test addition — no source code fixes are included. Several code issues from the Copilot review were addressed, but three significant issues remain unresolved in the current code.


Title & Description Review

Title: [Testing] Feature matrix UITest Cases for MenuBarItem Control ✅ Accurate

Description Issues:

  • Missing required NOTE block — All PRs must include the community testing NOTE at the top of the description. Current description is missing:
    > [!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!
    

Code Review Findings

🔴 Critical Issues

1. Memory leak: OnLocationsCollectionChanged doesn't handle NotifyCollectionChangedAction.Reset

  • File: MenuBarItemControlPage.xaml.cs:74
  • Problem: OnReset() in the ViewModel calls Locations.Clear() which fires NotifyCollectionChangedAction.Reset. On this action, e.OldItems is null, so the PropertyChanged event handlers on the three old LocationItem objects are never detached. Every call to the Reset button leaks 3 handlers.
  • Fix: Handle the Reset action explicitly:
    private void OnLocationsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
    {
        if (e.Action == NotifyCollectionChangedAction.Reset)
        {
            // Unsubscribe from all tracked items (need to track them separately)
            // Or: unsubscribe from all, re-subscribe to all current items
            foreach (var location in _viewModel.Locations)
                location.PropertyChanged -= OnLocationPropertyChanged;
        }
        // existing New/Old item handling...

2. False-positive test assertion: WaitForNoElement("Custom Location") uses AutomationId lookup

  • File: MenuBarItemFeatureTests.cs:440
  • Problem: App.WaitForNoElement(string marked) calls FindElement(id) which searches by AccessibilityId/AutomationId — NOT by display text. Since no element has AutomationId="Custom Location", this assertion will always pass immediately, even if "Custom Location" is still visible on screen.
  • Fix: Use a text-based query:
    // Instead of:
    App.WaitForNoElement("Custom Location");
    // Use:
    App.WaitForNoElement(x => x.FindElementByText("Custom Location"));

🟡 Suggestions

3. MenuBarItem_FileMenuExit test does not test Exit

  • File: MenuBarItemFeatureTests.cs:22-37
  • Problem: The test is named MenuBarItem_FileMenuExit and comments say "Open File menu and click Exit", but the implementation only opens the File menu and calls VerifyScreenshot(). The Exit item is never tapped. This is misleading.
  • Suggestion: Rename to MenuBarItem_FileMenuOpens or extend to actually tap Exit and verify StatusMessage contains "Exit command executed".

4. OnLocationPropertyChanged doesn't handle Name changes — submenu items stale after rename

  • File: MenuBarItemControlPage.xaml.cs:46
  • Problem: When a location's Name is changed via edit, the Change Location submenu items (which snapshot Text = location.Name) are not updated. Only IsSelected is handled.
  • Suggestion: Add nameof(LocationItem.Name) handling to call PopulateLocationMenuItems():
    if (e.PropertyName == nameof(LocationItem.Name))
        PopulateLocationMenuItems();

✅ Looks Good

  • OnExit correctly avoids calling Application.Current?.Quit() — addresses the critical HostApp termination risk
  • Disabled menu tests use #if TEST_FAILS_ON_CATALYST guard with proper Assert.That(elements, Is.Empty) assertions instead of broad catch { Assert.Pass() }
  • Edit-location flow (Order(7)) correctly taps ConfirmButton and verifies the edited text
  • Test method MenuBarItem_ResetRestoresDefaultLocations typo is fixed
  • MacCatalyst menu rebuild trigger (UIMenuSystem.MainSystem.SetNeedsRebuild()) is correctly gated on #if MACCATALYST
  • Platform guards are appropriate: outer #if MACCATALYST || WINDOWS, inner #if WINDOWS and #if TEST_FAILS_ON_CATALYST

Gate Result

N/A — This is a test-only PR with no bug fix. Standard Gate verification (fail without fix / pass with fix) does not apply. Tests are desktop-only (Windows/MacCatalyst) and cannot run on Android.


Changes Required Before Merge

  1. ❌ Add the required NOTE block to the PR description
  2. ❌ Fix OnLocationsCollectionChanged to handle NotifyCollectionChangedAction.Reset (unsubscribe existing handlers before clear)
  3. ❌ Fix WaitForNoElement("Custom Location") to use a text-based query or the correct AutomationId
  4. ⚠️ (Suggested) Fix MenuBarItem_FileMenuExit test name/behavior mismatch
  5. ⚠️ (Suggested) Fix OnLocationPropertyChanged to call PopulateLocationMenuItems() on Name changes

📋 Expand PR Finalization Review
Title: ✅ Good

Current: [Testing] Feature matrix UITest Cases for MenuBarItem Control

Description: ✅ Good

Description needs updates. See details below.

✨ Suggested PR Description

[!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

This pull request adds a comprehensive feature matrix test page for MenuBarItem controls, enhancing UI test coverage for menu bar functionality on desktop platforms (Windows and MacCatalyst).

⚠️ Platform scope: All UI tests in MenuBarItemFeatureTests.cs are gated on #if MACCATALYST || WINDOWS. A subset of screenshot-based tests (Orders 1–4) are additionally gated on #if WINDOWS only.

New MenuBarItem Feature Matrix Page

CorePageView.cs — Registration
Added a new GalleryPageFactory entry for MenuBarItemControlPage to make it accessible from the test host app gallery.

MenuBarItemControlPage.xaml — HostApp UI
Introduces a Shell-rooted page with:

  • A Shell.MenuBarItems definition containing four MenuBarItem entries: File, Locations, View, and MediaMenuBar
  • The Locations menu includes a MenuFlyoutSubItem (ChangeLocationSubItem) dynamically populated from code-behind, a MenuFlyoutSeparator, and Add/Edit/Remove items
  • The MediaMenuBar demonstrates FontImageSource icons (Play, Pause, Stop)
  • Main content area: status labels, a location Entry with confirm/cancel, menu enable/disable switches, and a CollectionView showing available locations

MenuBarItemControlPage.xaml.cs — Code-behind

  • Dynamically populates the ChangeLocationSubItem from the ViewModel's Locations collection
  • Ensures single-selection behaviour: unchecks other locations when one is selected
  • Subscribes to CollectionChanged and per-item PropertyChanged to keep the menu and selection state in sync
  • On MacCatalyst, calls UIMenuSystem.MainSystem.SetNeedsRebuild() on Loaded to ensure menu bar visibility

MenuBarItemViewModel.cs — ViewModel
MVVM ViewModel (INotifyPropertyChanged) that drives the feature matrix page. Exposes:

  • Properties for each menu item's Text, IsEnabled, and IconImageSource
  • ObservableCollection<LocationItem> with three default locations (Redmond, London, Berlin)
  • Commands: ExitCommand, AddLocationCommand, EditLocationCommand, RemoveLocationCommand, ChangeLocationCommand, RefreshCommand, ConfirmEntryCommand, CancelEntryCommand, ResetCommand

MenuBarItemFeatureTests.cs — UI Tests (22 tests)
Cross-platform test class (_GalleryUITest) covering:

  • Location selection, add, edit, remove via menu
  • Dynamic submenu population
  • Menu enable/disable (File, Locations, View)
  • Reset to defaults
  • Entry visibility toggling and empty-input validation
  • All four menu bars present/functional

Issues Fixed

N/A — This is a new test addition, not a bug fix.

Platforms Tested

  • iOS
  • Android
  • Windows
  • MacCatalyst
Code Review: ⚠️ Issues Found

Code Review — PR #34007

🔴 Critical Issues

AutomationId vs. Text Mismatch in Tests

Files:

  • MenuBarItemControlPage.xaml (XAML AutomationIds)
  • MenuBarItemViewModel.cs (Text property default values)
  • MenuBarItemFeatureTests.cs (element locators)

Problem:
App.WaitForElement(...) in the tests uses strings like "ExitMenuBarFlyoutItem" and "RefreshMenuBarFlyoutItem", but the XAML AutomationId attributes are set to "ExitMenuFlyoutItem" and "RefreshMenuFlyoutItem" (without "Bar"). The tests are actually finding elements by their Text value (set via ViewModel default strings _exitText = "ExitMenuBarFlyoutItem") rather than by AutomationId.

This works on Windows/MacCatalyst because Appium locates native menu items by display text on those platforms, but it makes the intent ambiguous and breaks the convention of locating by AutomationId.

Specific mismatches:

XAML AutomationId ViewModel Text default Test locator string
ExitMenuFlyoutItem "ExitMenuBarFlyoutItem" "ExitMenuBarFlyoutItem" ← finds by text
RefreshMenuFlyoutItem (no override — text is {Binding RefreshText}) "RefreshMenuBarFlyoutItem"

Recommendation:
Either align AutomationIds to match the test locator strings, or explicitly document in comments that these are Text-based lookups (and why AutomationId cannot be used for native menu items on desktop). Using App.FindElementByText(...) for text-based lookups would make the intent explicit.


🟡 Moderate Issues

1. Memory Leak Risk — No Event Unsubscription

File: MenuBarItemControlPage.xaml.cs

Problem:
The constructor subscribes to _viewModel.Locations.CollectionChanged and to PropertyChanged on each LocationItem. There is no Unloaded handler or OnDisappearing override to unsubscribe. While this is test infrastructure (not production code) and the page is typically short-lived, it is still best practice in MAUI to unsubscribe from event handlers to prevent retained references.

// Missing cleanup:
this.Unloaded += (s, e) =>
{
    _viewModel.Locations.CollectionChanged -= OnLocationsCollectionChanged;
    foreach (var location in _viewModel.Locations)
        location.PropertyChanged -= OnLocationPropertyChanged;
};

2. Misleading Test Name

File: MenuBarItemFeatureTests.cs, Order(13)

Problem:
MenuBarItem_MenuTextBindingUpdates doesn't actually test that text updates via binding (i.e., it never changes a ViewModel property and verifies the UI reflects it). It only verifies that menus can be opened and their static items exist. The name implies a dynamic binding scenario that isn't tested.

Recommendation: Rename to MenuBarItem_VerifyAllMenusAndItemsAccessible or implement an actual text binding update test (change a MenuText property in the ViewModel and verify the menu bar title updates).


3. Missing Newlines at End of Files

Files:

  • MenuBarItemControlPage.xaml (\ No newline at end of file)
  • MenuBarItemControlPage.xaml.cs (\ No newline at end of file)
  • MenuBarItemFeatureTests.cs (\ No newline at end of file)

Recommendation: Add a trailing newline to all three files. This is a standard convention in the repo and commonly flagged in CI.


✅ Looks Good

  • Structure follows feature matrix pattern_GalleryUITest base class, GalleryPageName registration in CorePageView.cs, and ViewModel-backed HostApp page all match existing feature matrix tests.
  • MacCatalyst menu rebuild workaroundUIMenuSystem.MainSystem.SetNeedsRebuild() on Loaded is a known-correct pattern for ensuring menu bar visibility on MacCatalyst.
  • TEST_FAILS_ON_CATALYST guard — Tests 10–12 (disable-menu tests) are correctly gated with a link to issue [macOS] IsEnabled property false not working on MenuBarItem #34038. This is the right pattern for known failing tests.
  • OnLocationsCollectionChanged correctly subscribes/unsubscribes PropertyChanged for newly added/removed items, demonstrating awareness of the event pattern.
  • ResetButton at start of each test provides good isolation between ordered tests.
  • 22 tests cover a broad range of MenuBarItem interactions: add, edit, remove, select location, toggle enable/disable, verify initial state, entry visibility, empty validation.
  • Platform guard #if MACCATALYST || WINDOWS correctly scopes the entire test file to desktop platforms only.

@rmarinho rmarinho added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Feb 18, 2026
@HarishKumarSF4517
Copy link
Copy Markdown
Contributor Author

HarishKumarSF4517 commented Feb 19, 2026

🤖 AI Summary

I have addressed the requested changes,

  • Memory Leak Risk — No Event Unsubscription.
  • Removed the unused automationId in the test, as it does not work on the Windows platform, and used the text property for testing on both Windows and macOS.
  • Renamed the test case from MenuBarItem_MenuTextBindingUpdates to MenuBarItem_VerifyAllMenusAndItemsAccessible.
  • Added missing new lines at the end of the files.

@kubaflo kubaflo added s/agent-fix-lose Author adopted the agent's fix and it turned out to be bad s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates and removed s/agent-fix-win AI found a better alternative fix than the PR s/agent-fix-lose Author adopted the agent's fix and it turned out to be bad s/agent-changes-requested AI agent recommends changes - found a better alternative or issues labels Feb 20, 2026
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarishKumarSF4517 HarishKumarSF4517 force-pushed the harish_feature_matrix_menubaritem branch from 00b329b to ff87486 Compare March 25, 2026 07:43
@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 -- 34007

Or

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

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 29, 2026

🚦 Gate — Test Verification

📊 Expand Full Gateff87486 · Added base images

Gate Result: ❌ FAILED

Platform: ANDROID · Base: main · Merge base: 720a9d4a

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ MenuBarItemFeatureTests MenuBarItemFeatureTests ✅ FAIL — 2140s ❌ FAIL — 510s
🔴 Without fix — 🖥️ MenuBarItemFeatureTests: FAIL ✅ · 2140s

(truncated to last 15,000 chars)

TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]

Build FAILED.

/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Failure calling service package: Broken pipe (32) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:  [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass105_0.<InstallPackage>b__0(Task`1 t) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:15:45.01
* daemon not running; starting now at tcp:5037
* daemon started successfully
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:08:37.23
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 1.23 sec).
  Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 16 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 4.36 sec).
  Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 6 sec).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 2 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 2 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 402 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.29 sec).
  5 of 13 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.12]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.42]   Discovered:  Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
   NUnit3TestExecutor discovered 0 of 0 NUnit test cases using Current Discovery mode, Explicit run
NUnit Adapter 4.5.0.0: Test execution complete
No test matches the given testcase filter `MenuBarItemFeatureTests` in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll


🟢 With fix — 🖥️ MenuBarItemFeatureTests: FAIL ❌ · 510s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:06:51.96
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.17]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.51]   Discovered:  Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
   NUnit3TestExecutor discovered 0 of 0 NUnit test cases using Current Discovery mode, Explicit run
NUnit Adapter 4.5.0.0: Test execution complete
No test matches the given testcase filter `MenuBarItemFeatureTests` in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll


⚠️ Issues found
  • MenuBarItemFeatureTests FAILED with fix (should pass)
📁 Fix files reverted (1 files)
  • eng/pipelines/ci-copilot.yml

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 29, 2026

🤖 AI Summary

📊 Expand Full Reviewff87486 · Added base images
🔍 Pre-Flight — Context & Validation

Issue: N/A — Test-only PR (no linked issue)
PR: #34007 - [Testing] Feature matrix UITest Cases for MenuBarItem Control
Author: HarishKumarSF4517 (Syncfusion partner)
Platforms Affected: Windows and MacCatalyst only (all tests wrapped in #if MACCATALYST || WINDOWS)
Files Changed: 4 implementation/test files (new), 1 modified — all in test projects

Key Findings

  • Test-only PR: Adds a new "MenuBarItem Feature Matrix" gallery page + 22 Appium UI tests for desktop MenuBarItem functionality. No production code changes.
  • Desktop-only scope: All tests are guarded by #if MACCATALYST || WINDOWS. The Android gate platform is NOT applicable for this PR — MenuBar is a desktop control only.
  • Gate FAILED reason: Gate ran on Android. Both "without fix" (2140s) and "with fix" (510s) FAILED because (a) the test methods compile away on Android, and (b) the Android build itself hit an ADB broken pipe infrastructure error. This is a platform mismatch, not a logic error in the tests.
  • Prior agent review exists: rmarinho posted a previous AI summary. Key unresolved issues from prior review:
    1. OnLocationsCollectionChanged does NOT handle NotifyCollectionChangedAction.ResetLocations.Clear() leaves old PropertyChanged handlers attached, causing memory leaks that compound on each Reset call.
    2. OnLocationPropertyChanged only handles IsSelected, not Name — renaming a location doesn't update the "Change Location" submenu.
    3. WaitForNoElement("Custom Location") uses display text as if it's an AutomationId — this passes trivially and doesn't validate removal properly.
    4. MenuBarItem_FileMenuExit test name/comments claim to "click Exit" but only opens the File menu + screenshot — misleading.
  • Partially fixed issues: ExitCommand no longer quits the app; disabled-menu tests fixed; edit-location test now taps ConfirmButton; typo in test name fixed.
  • Category: [Category(UITestCategories.Shell)] — reasonable since MenuBarItem is a Shell feature.
  • MenuBarItemControlPage extends Shell — correct architecture for MenuBarItem.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34007 Adds 22 feature matrix UI tests for MenuBarItem (desktop-only) ❌ FAILED (Gate — Android platform mismatch) 5 files (+1363 lines) Test-only PR; gate platform is wrong

🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix (claude-opus-4.6) Handle NotifyCollectionChangedAction.Reset with _trackedLocations list in OnLocationsCollectionChanged ⏸️ BLOCKED (compile ✅) 1 file Memory leak / duplicate subscription fix
2 try-fix (claude-sonnet-4.6) Fix WaitForNoElement("Custom Location") text/AutomationId confusion; rename MenuBarItem_FileMenuExitMenuBarItem_FileMenuOpens ⏸️ BLOCKED (compile ✅) 1 file Test assertion correctness
3 try-fix (gpt-5.3-codex) Add bounds guard in OnConfirmEntry() for stale _editingLocationIndex ⏸️ BLOCKED (compile ✅) 1 file Defensive ViewModel fix
4 try-fix (gpt-5.4) Add missing AutomationId to static XAML menu elements (FileMenuBar, LocationsMenuBar, ViewMenuBar, ExitMenuBarFlyoutItem, RefreshMenuBarFlyoutItem) ⏸️ BLOCKED (compile ✅) 1 file Test wiring fix
5 try-fix (claude-sonnet-4.6) Refactor MenuBarItemControlPage from ShellContentPage — removes Shell nesting; uses ContentPage.MenuBarItems (valid on base Page); removes MacCatalyst UIMenuSystem hack ⏸️ BLOCKED (compile ✅) 2 files Most impactful: arch fix
6 try-fix (gpt-5.3-codex) Add deterministic AutomationId to runtime-generated MenuFlyoutItem instances in PopulateLocationMenuItems() ⏸️ BLOCKED (compile ✅) 1 file Dynamic item discoverability
7 try-fix (claude-sonnet-4.6) Replace bound Label.Text with static strings to eliminate accessibility name collision between MenuBarItem and page-body Labels ⏸️ BLOCKED (compile ✅) 1 file Prevents Appium finding wrong element
PR PR #34007 Adds 22 feature matrix UI tests for MenuBarItem (desktop-only) ❌ FAILED (Gate — Android platform mismatch) 5 files Test-only PR; gate ran wrong platform

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 Yes Shell→ContentPage refactor (attempt 5)
gpt-5.3-codex 2 Yes Dynamic AutomationIds in PopulateLocationMenuItems (attempt 6)
claude-sonnet-4.6 2 Yes Label/MenuBarItem accessibility name collision (attempt 7)
claude-opus-4.6 3 Yes Alternative: keep Shell but fix hosting model (set as Window.Page); exceeds max rounds

Exhausted: Yes (max 3 cross-pollination rounds reached)

Selected Fix: Combination of Attempt 5 + Attempt 1 + Attempt 7 as highest-priority fixes.

  • Attempt 5 (Shell→ContentPage) is the most structurally important: all other FeatureMatrix pages use ContentPage/NavigationPage. Nesting a Shell inside the gallery's own Shell is architecturally incorrect and will likely cause all menu tests to fail or produce unreliable results. Page.MenuBarItems is defined on the base Page class and works on ContentPage. Compile-verified ✅.
  • Attempt 1 (Reset handler) fixes a memory leak that compounds on each Reset. Compile-verified ✅.
  • Attempt 7 (label collision) fixes a test reliability issue where Appium could find the wrong element. Compile-verified ✅.

Note: All attempts are "Blocked" because the gate platform is Android and these tests only compile/run on Windows/MacCatalyst. This is a platform mismatch in the gate setup, not a defect in the fixes.


📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Test-only PR, desktop-only (Windows/MacCatalyst), no linked issue
Gate ❌ FAILED Android platform — NOT applicable (tests are #if MACCATALYST || WINDOWS only)
Try-Fix ✅ COMPLETE 7 attempts, all ⏸️ Blocked (compile ✅; can't run desktop tests on Android)
Report ✅ COMPLETE

Summary

PR #34007 adds a new "MenuBarItem Feature Matrix" gallery page and 22 Appium UI tests for desktop MenuBarItem functionality. It is a test-only PR with no production code changes. The gate failure is a platform mismatch — the gate ran on Android, but all tests are guarded by #if MACCATALYST || WINDOWS and cannot run on Android. This should be re-gated on Windows or MacCatalyst.

However, 7 independent code quality issues were identified during the Try-Fix exploration, 3 of which are significant enough to block merge.

Root Cause

No production bug — this is a test addition PR. The issues found are in the new test code:

  1. Architectural (HIGH): MenuBarItemControlPage extends Shell — it is the only FeatureMatrix page that does. All 19+ other FeatureMatrix pages use ContentPage or NavigationPage. Nesting a Shell inside the gallery's host Shell likely breaks the gallery navigation infrastructure and may cause all menu tests to fail or produce unreliable results at runtime.

  2. Memory Leak (MEDIUM): OnLocationsCollectionChanged does not handle NotifyCollectionChangedAction.Reset. Locations.Clear() fires a Reset with e.OldItems == null, leaving old PropertyChanged handlers attached. Since OnReset calls Locations.Clear(), subscriptions accumulate on every reset operation.

  3. Test Reliability (MEDIUM): MenuBarItem.Text and page-body Label.Text are bound to the same ViewModel properties ("FileMenuBar", "LocationsMenuBar", "ViewMenuBar"). Appium's WaitForElement(string) searches by accessibility name and may find the inert Label before the native MenuBar item, causing App.Tap(...) to tap the wrong element silently.

  4. False Assertion (LOW): App.WaitForNoElement("Custom Location") uses the display text as if it's an AutomationId. Since no element has AutomationId="Custom Location", this trivially passes even if the item is still visible.

  5. Misleading Test (LOW): MenuBarItem_FileMenuExit only opens the File menu and calls VerifyScreenshot() — it never taps Exit. The name/comments are misleading.

  6. Missing AutomationIds (LOW): Several elements referenced by tests (FileMenuBar, LocationsMenuBar, ViewMenuBar, ExitMenuBarFlyoutItem, RefreshMenuBarFlyoutItem) do not have AutomationId attributes in the XAML. Dynamic menu items in PopulateLocationMenuItems() also lack AutomationId.

  7. Defensive ViewModel (LOW): OnConfirmEntry() edit path doesn't validate _editingLocationIndex is still within bounds before indexing into Locations.

Fix Quality

The PR's approach is reasonable for a first pass, but several issues require fixes before merge:

Must Fix (blocks merge):

  • Refactor MenuBarItemControlPage from ShellContentPage (use <ContentPage.MenuBarItems> — valid on base Page class). Remove the MacCatalyst UIMenuSystem.SetNeedsRebuild() workaround which is a Shell-specific hack. (Attempt 5 — compile-verified ✅)
  • Fix OnLocationsCollectionChanged to handle NotifyCollectionChangedAction.Reset. (Attempt 1 — compile-verified ✅)
  • Fix label/MenuBarItem accessibility name collision: labels at lines 133, 150, 167 must use different text than the MenuBarItem text values. (Attempt 7 — compile-verified ✅)

Should Fix (quality):

  • Add AutomationId to static XAML menu elements and to dynamic MenuFlyoutItem instances in PopulateLocationMenuItems(). (Attempts 4 and 6 — compile-verified ✅)
  • Fix WaitForNoElement("Custom Location") and rename MenuBarItem_FileMenuExit. (Attempt 2 — compile-verified ✅)

Gate Note: The gate was run on Android which is the wrong platform for this PR. The gate result is NOT indicative of test correctness. The PR should be re-gated on Windows or MacCatalyst once the above issues are addressed.

Selected Fix: PR's fix (after required changes above are applied) — the overall test structure and ViewModel design are sound; the issues found are fixable with focused changes.


@MauiBot MauiBot added the s/agent-changes-requested AI agent recommends changes - found a better alternative or issues label Mar 29, 2026
@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Mar 29, 2026

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-menubar Desktop MenuBarItems community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants