Skip to content

[Testing] Added UITest for MenuFlyoutItem Clicked/Command delegate #29604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2025

Conversation

anandhan-rajagopal
Copy link
Contributor

Description of Change

This pull request addresses Issue #20685, which concerns MenuBarItem commands not functioning correctly on Mac Catalyst. It introduces a new test case to validate the behavior of MenuFlyoutItem commands and their interactions.

Additions to test cases for Issue #20685:

  • New UI Test for Mac Catalyst and Windows:

    • Added a test class Issue20685 in TestCases.HostApp to reproduce the issue by implementing a MenuBarItem with three types of MenuFlyoutItem commands: a clicked event, a command, and a command with a parameter.
    • The test validates the expected behavior of each command type and ensures proper feedback is displayed in the UI.
  • Automated Test cases:

    • Added a corresponding test class Issue20685 in TestCases.Shared.Tests with NUnit tests to verify the functionality of the MenuFlyoutItem commands on supported desktop platforms (Mac Catalyst and Windows). These tests include:
      • Verifying the Clicked event handler execution.
      • Testing command execution without parameters.
      • Testing command execution with parameters.

Issues Fixed

Fixes #20718

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels May 21, 2025
@anandhan-rajagopal anandhan-rajagopal marked this pull request as ready for review May 21, 2025 07:30
@Copilot Copilot AI review requested due to automatic review settings May 21, 2025 07:30
@anandhan-rajagopal anandhan-rajagopal requested a review from a team as a code owner May 21, 2025 07:30
Copy link
Contributor

@Copilot 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

This PR introduces new UI tests to verify the functionality of MenuFlyoutItem commands on both Mac Catalyst and Windows, addressing Issue #20685.

  • Added a shared NUnit test class to verify the execution of clicked events, commands, and commands with parameters.
  • Added a HostApp test case that sets up a MenuBarItem with MenuFlyoutItems wired to display appropriate result messages.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20685.cs Contains NUnit tests ensuring that the MenuFlyoutItem events and commands are triggered and update the UI correctly.
src/Controls/tests/TestCases.HostApp/Issues/Issue20685.cs Defines a UI test page configuring MenuBarItem and MenuFlyoutItems with the required event and command handlers.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current May 22, 2025 18:19
@PureWeen PureWeen merged commit 1bb4b57 into dotnet:inflight/current May 22, 2025
76 of 79 checks passed
github-actions bot pushed a commit that referenced this pull request May 22, 2025
…29604)

* Added test cases to ensure menuflyoutitem commands

* code optimization

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20685.cs

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
github-actions bot pushed a commit that referenced this pull request May 30, 2025
…29604)

* Added test cases to ensure menuflyoutitem commands

* code optimization

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20685.cs

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration testing-missing-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Test] Write UITest for MenuFlyoutItem Clicked/Command delegate
3 participants