-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Feature matrix UITest Cases for Secondary Toolbar #30811
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
base: net10.0
Are you sure you want to change the base?
[Testing] Feature matrix UITest Cases for Secondary Toolbar #30811
Conversation
Hey there @@NafeelaNazhir! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this 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 pull request introduces comprehensive test coverage for Primary and Secondary toolbar functionality by adding a new ToolbarFeaturePage to the test application and implementing corresponding UI tests. The changes standardize toolbar interaction methods across existing test cases and add new feature matrix testing capabilities.
Key Changes:
- Added a new ToolbarFeaturePage with comprehensive toolbar item testing capabilities
- Updated existing test cases to use standardized toolbar interaction methods (
App.WaitForMoreButton
andApp.TapMoreButton
) - Implemented extensive test coverage for toolbar item behaviors including enable/disable, text changes, and command modifications
Reviewed Changes
Copilot reviewed 8 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs | Added navigation entry for new ToolbarFeaturePage |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/ToolbarItem/ToolbarFeaturePage.xaml | Created XAML layout defining toolbar items and test UI controls |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/ToolbarItem/ToolbarFeaturePage.xaml.cs | Implemented code-behind logic for toolbar item interactions and state management |
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ToolbarFeatureTests.cs | Added comprehensive test suite for toolbar functionality validation |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20177.cs | Updated platform constraints and standardized toolbar interaction methods |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29499.cs | Updated platform constraints and replaced direct Selenium calls |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue7156.cs | Removed Windows-only constraint and standardized toolbar methods |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue6127.cs | Updated comment to reference specific GitHub issue |
App.WaitForElement("IsEnabledButton2"); | ||
App.Tap("IsEnabledButton2"); | ||
// Wait for 1 seconds to ensure the button is disabled after the delay | ||
Thread.Sleep(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Thread.Sleep in UI tests is an anti-pattern that can lead to flaky tests. Consider using App.WaitForElement with a timeout or a more deterministic waiting mechanism instead.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The element is initially enabled and transitions to a disabled state after a one-second delay introduced at the sample level. Since the element is already present in the UI, Thread.Sleep is used to accommodate the known timing of this state change. In this context, WaitForElement is not appropriate, as it only waits for the element to appear , not for changes in its enabled or disabled state.
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ToolbarFeatureTests.cs
Outdated
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ToolbarFeatureTests.cs
Outdated
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ToolbarFeatureTests.cs
Outdated
Show resolved
Hide resolved
…ToolbarFeatureTests.cs Co-authored-by: Copilot <[email protected]>
…ToolbarFeatureTests.cs Co-authored-by: Copilot <[email protected]>
…ToolbarFeatureTests.cs Co-authored-by: Copilot <[email protected]>
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
This pull request introduces a new
ToolbarFeaturePage
to the application, enhancing the Primary and Secondary toolbar functionality and adding comprehensive test coverage. The changes include the addition of a new feature matrix page, implementation of toolbar item interactions, and updates to existing test cases to improve compatibility and functionality.New Toolbar Feature Implementation:
ToolbarFeaturePage
to theCorePageView
navigation, allowing users to interact with various toolbar items and test their behaviors (src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
).ToolbarFeaturePage.xaml
to define the UI layout and toolbar items, including primary and secondary toolbar items with various properties (src/Controls/tests/TestCases.HostApp/FeatureMatrix/ToolbarItem/ToolbarFeaturePage.xaml
).ToolbarFeaturePage.xaml.cs
to handle toolbar item interactions, such as enabling/disabling items, changing text, and modifying commands dynamically (src/Controls/tests/TestCases.HostApp/FeatureMatrix/ToolbarItem/ToolbarFeaturePage.xaml.cs
).Test Coverage for Toolbar Features:
ToolbarFeatureTests
, to validate toolbar item behaviors, including enabling/disabling, text changes, command updates, and interactions between primary and secondary items (src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ToolbarFeatureTests.cs
).Updates to Existing Test Cases:
Issue20177
,Issue29499
,Issue7156
,Issue6127
) to replace toolbar interaction methods withApp.WaitForMoreButton
andApp.TapMoreButton
, ensuring compatibility across platforms (src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20177.cs
,Issue29499.cs
,Issue7156.cs
,Issue6127.cs
) [1] [2] [3] [4] [5] [6] [7].Issues Identified
Screen.Recording.2025-07-24.at.4.00.19.PM.mov