Skip to content

[Testing] Feature matrix UITest Cases for Grid#31726

Merged
PureWeen merged 4 commits intodotnet:inflight/currentfrom
NafeelaNazhir:grid_feature
Oct 9, 2025
Merged

[Testing] Feature matrix UITest Cases for Grid#31726
PureWeen merged 4 commits intodotnet:inflight/currentfrom
NafeelaNazhir:grid_feature

Conversation

@NafeelaNazhir
Copy link
Contributor

This pull request adds a new Grid feature matrix to the test application, allowing users to interactively explore and configure the properties of the Grid control. It introduces a new GridControlPage and 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:

  • Added GridControlPage and GridControlMainPage classes to provide a navigable page for testing and displaying the grid feature matrix, including dynamic creation of grid cells and support for nested grids.
  • Introduced GridOptionsPage with a comprehensive set of controls for configuring grid properties, including entries, radio buttons, checkboxes, and color selectors, all bound to a shared GridViewModel. [1] [2]

Integration into Host App:

  • Registered the new GridControlPage in the main gallery page factory list to make the grid feature matrix accessible from the app's navigation.

UI and Data Binding:

  • Created new XAML files for both the main grid page (GridControlPage.xaml) and the options page (GridOptionsPage.xaml), leveraging data binding for dynamic updates and user interaction. [1] [2]

Options and Interactivity:

  • Implemented event handlers in GridOptionsPage.xaml.cs to 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

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Sep 23, 2025
@dotnet-policy-service
Copy link
Contributor

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.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Sep 23, 2025
@NafeelaNazhir NafeelaNazhir added area-testing Unit tests, device tests layout-grid labels Sep 23, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@NafeelaNazhir NafeelaNazhir marked this pull request as ready for review September 24, 2025 13:23
Copilot AI review requested due to automatic review settings September 24, 2025 13:23
Copy link
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

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();
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
BindingContext = _viewModel = new GridViewModel();
// Reuse the existing _viewModel to preserve user state

Copilot uses AI. Check for mistakes.
_viewModel.Padding = new Thickness(left, top, right, bottom);
}
}
catch { }
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

Empty catch block silently swallows exceptions, making debugging difficult. Consider logging the exception or providing user feedback when padding parsing fails.

Suggested change
catch { }
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine($"Exception in OnPaddingChanged: {ex}");
}

Copilot uses AI. Check for mistakes.
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current October 9, 2025 21:52
@PureWeen PureWeen merged commit aaa1fc5 into dotnet:inflight/current Oct 9, 2025
78 checks passed
PureWeen pushed a commit that referenced this pull request Oct 30, 2025
* Grid feature tests added

* changes updated

* Added base images

* Added base images
# Conflicts:
#	src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
github-actions bot pushed a commit that referenced this pull request Nov 4, 2025
* Grid feature tests added

* changes updated

* Added base images

* Added base images
# Conflicts:
#	src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-testing Unit tests, device tests community ✨ Community Contribution layout-grid partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants