[Testing] Feature matrix UITest Cases for Grid#31726
[Testing] Feature matrix UITest Cases for Grid#31726PureWeen merged 4 commits intodotnet:inflight/currentfrom
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 |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a comprehensive Grid feature matrix testing framework to the .NET MAUI test application. It enables interactive testing of Grid control properties and behaviors through a new navigable UI with configurable options.
- Creates a Grid feature matrix with options page for interactive property configuration
- Implements comprehensive UI tests covering Grid layout scenarios, spacing, padding, alignment, and nested grids
- Integrates the new Grid feature matrix into the main test application gallery
Reviewed Changes
Copilot reviewed 7 out of 127 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| GridFeatureTests.cs | Implements 24 UI test cases covering Grid layout properties, spacing, alignment options, and nested grid scenarios |
| GridViewModel.cs | Provides data binding model for Grid properties with support for dynamic row/column definitions and layout configuration |
| GridOptionsPage.xaml.cs | Contains event handlers for user interactions with Grid configuration options |
| GridOptionsPage.xaml | Defines the options UI with controls for configuring Grid properties like spacing, padding, colors, and layout options |
| GridControlPage.xaml.cs | Implements the main Grid display page with dynamic cell generation and nested grid support |
| GridControlPage.xaml | Defines the main Grid feature matrix display page with data-bound properties |
| CorePageView.cs | Registers the new Grid feature matrix in the test application gallery |
|
|
||
| private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e) | ||
| { | ||
| BindingContext = _viewModel = new GridViewModel(); |
There was a problem hiding this comment.
Creating a new GridViewModel instance discards the existing view model state that users may have configured. This will reset all user configurations when navigating to the options page. Instead, reuse the existing _viewModel instance.
| BindingContext = _viewModel = new GridViewModel(); | |
| // Reuse the existing _viewModel to preserve user state |
| _viewModel.Padding = new Thickness(left, top, right, bottom); | ||
| } | ||
| } | ||
| catch { } |
There was a problem hiding this comment.
Empty catch block silently swallows exceptions, making debugging difficult. Consider logging the exception or providing user feedback when padding parsing fails.
| catch { } | |
| catch (Exception ex) | |
| { | |
| System.Diagnostics.Debug.WriteLine($"Exception in OnPaddingChanged: {ex}"); | |
| } |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* Grid feature tests added * changes updated * Added base images * Added base images # Conflicts: # src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
* Grid feature tests added * changes updated * Added base images * Added base images # Conflicts: # src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
This pull request adds a new Grid feature matrix to the test application, allowing users to interactively explore and configure the properties of the
Gridcontrol. It introduces a newGridControlPageand associated view model, as well as a dedicated options page for customizing grid parameters such as row/column count, spacing, padding, background color, layout options, visibility, flow direction, and nested grids.New Grid Feature Matrix:
GridControlPageandGridControlMainPageclasses to provide a navigable page for testing and displaying the grid feature matrix, including dynamic creation of grid cells and support for nested grids.GridOptionsPagewith a comprehensive set of controls for configuring grid properties, including entries, radio buttons, checkboxes, and color selectors, all bound to a sharedGridViewModel. [1] [2]Integration into Host App:
GridControlPagein the main gallery page factory list to make the grid feature matrix accessible from the app's navigation.UI and Data Binding:
GridControlPage.xaml) and the options page (GridOptionsPage.xaml), leveraging data binding for dynamic updates and user interaction. [1] [2]Options and Interactivity:
GridOptionsPage.xaml.csto respond to user input, updating the view model and grid display in real time for properties like padding, background color, layout options, visibility, flow direction, and nested grid toggling.Screen.Recording.2025-09-18.at.6.01.59.PM.mov