Skip to content

[Testing] Feature matrix UITest Cases for Border Control#29746

Merged
PureWeen merged 12 commits into
inflight/currentfrom
unknown repository
Sep 11, 2025
Merged

[Testing] Feature matrix UITest Cases for Border Control#29746
PureWeen merged 12 commits into
inflight/currentfrom
unknown repository

Conversation

@HarishKumarSF4517

@HarishKumarSF4517 HarishKumarSF4517 commented May 30, 2025

Copy link
Copy Markdown
Contributor

Description

This pull request introduces a new feature matrix for the Border control in the Maui.Controls.Sample project. It includes updates to the UI, view model, and test cases to support the feature matrix. The feature matrix enables detailed testing of properties like Stroke, StrokeThickness, StrokeShape, Shadow, and dynamic content.

FeatureMatrix : Border Control

  • Added a new entry for BorderControlPage in the gallery navigation to integrate the new feature into the application.

  • Created BorderControlsPage.xaml to define the layout and bindings for the main border control page. This includes a Border element with customizable properties such as stroke, padding, shadow, and content.

  • Added BorderOptionsPage.xaml to provide a UI for configuring border properties like stroke thickness, dash array, shadow, and content options.

  • Implemented BorderControlPage and BorderControlMainPage classes to manage navigation and bind the view model to the main page. Added event handlers for setting grid and stack layouts as content

  • Developed OptionsPage class to handle user input for border configuration, including stroke color, shape, shadow, and line cap/line join options. Added validation and event handling for user interactions

  • Added tests in BorderFeatureMatrixTests.cs to validate default values, property updates, and visual rendering of Border control properties across platforms.

Identified Issue:

  1. StrokeLineJoin values have no effect on iOS and Mac platform #29743
  2. StrokeLineCap values have no effect on Windows platform #29741
  3. [iOS, Mac] StrokeDashArray Property not Rendering #29661
  4. StrokeDashArray on Border does not reset when set to null #29898
Screen.Recording.2025-05-30.at.4.41.00.PM.mov

@dotnet-policy-service dotnet-policy-service Bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels May 30, 2025
@ghost ghost added the area-testing Unit tests, device tests label May 30, 2025
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@HarishKumarSF4517 HarishKumarSF4517 marked this pull request as ready for review May 30, 2025 12:38
Copilot AI review requested due to automatic review settings May 30, 2025 12:38
@HarishKumarSF4517 HarishKumarSF4517 requested a review from a team as a code owner May 30, 2025 12:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 a new Border feature matrix in the Maui.Controls.Sample app, including a view model, two pages for configuring and displaying border properties, and a new navigation entry.

  • Adds BorderViewModel with bindable border properties and content selectors
  • Implements BorderControlMainPage and OptionsPage for live configuration of stroke, padding, shadow, etc.
  • Registers the feature in the gallery and adds initial tests in the HostApp

Reviewed Changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

File Description
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Border/BorderViewModel.cs Implements all border properties and content update methods
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Border/BorderOptionsPage.xaml(.cs) UI for editing border settings and event handlers
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Border/BorderControlsPage.xaml(.cs) Main page with Border bound to the view model and navigation logic
src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs Adds the “Border Feature Matrix” entry to the app navigation
Comments suppressed due to low confidence (3)

src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs:81

  • You've registered the new Border feature matrix in the HostApp, but there’s no corresponding shared automated test in TestCases.Shared.Tests. Please add a test case to cover the new UI flow and ensure it runs against the HostApp.
new GalleryPageFactory(() => new BorderControlPage(), "Border Feature Matrix"),

src/Controls/tests/TestCases.HostApp/FeatureMatrix/Border/BorderOptionsPage.xaml.cs:7

  • [nitpick] The file is named BorderOptionsPage.xaml.cs but the class is OptionsPage. Consider renaming the class to BorderOptionsPage (or vice versa) to keep names consistent and clear.
public partial class OptionsPage : ContentPage

src/Controls/tests/TestCases.HostApp/FeatureMatrix/Border/BorderOptionsPage.xaml.cs:46

  • Assigning a Color to a Brush property may not work. Wrap the selected color in a SolidColorBrush, for example: _viewModel.Stroke = new SolidColorBrush(button.BackgroundColor);.
_viewModel.Stroke = button.BackgroundColor;


private void OnSetGridContentClicked(object sender, EventArgs e)
{
var grid = new Grid

Copilot AI May 30, 2025

Copy link

Choose a reason for hiding this comment

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

The grid is instantiated but never applied to the Border or ViewModel. You should assign it (e.g., _viewModel.ContentView = grid;) so the UI actually updates when the button is clicked.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the event handler and updated the corresponding changes.


private void OnSetStackContentClicked(object sender, EventArgs e)
{
var stack = new VerticalStackLayout

Copilot AI May 30, 2025

Copy link

Choose a reason for hiding this comment

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

The stack layout is created but not used. Consider assigning it to the ViewModel (e.g., _viewModel.ContentView = stack;) or directly to the Border so it appears in the UI.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the event handler and updated the corresponding changes.

@jsuarezruiz jsuarezruiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pending snapshots already available in the latest build.
image

Could you commit the images?

@HarishKumarSF4517

Copy link
Copy Markdown
Contributor Author

Pending snapshots already available in the latest build. image

Could you commit the images?

Hi @jsuarezruiz, I have attached the required Snapshots

@rmarinho rmarinho changed the base branch from main to inflight/current May 30, 2025 18:56
@ghost ghost requested a review from jsuarezruiz May 31, 2025 11:04
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@github-actions github-actions Bot force-pushed the inflight/current branch from f5a279d to c33253a Compare June 2, 2025 17:32
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz jsuarezruiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think is not related with the PR, but the test NullPointerExceptionOnFastLabelTextColorChange is failing on iOS and Cataluyst because a crash.
The app was expected to be running still, investigate as possible crash

@github-actions github-actions Bot force-pushed the inflight/current branch 3 times, most recently from 24dd756 to 0423cbb Compare June 7, 2025 13:18
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz jsuarezruiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some tests are failing on Windows:
image

Example:
Border_StrokeColorWithStrokeThickness
Snapshot different than baseline: Border_StrokeColorWithStrokeThickness.png (5.05% difference)
image

Could you review it?

@HarishKumarSF4517

Copy link
Copy Markdown
Contributor Author

Hi @jsuarezruiz,
I have checked and addressed the failed test cases and committed the changes. Can you review and share your concerns?

@PureWeen

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@ghost ghost requested a review from jsuarezruiz August 19, 2025 05:47
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz jsuarezruiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some Windows reference snapshots requires an update:
image

Snapshot different than baseline: Border_Shadow.png (size differs - baseline is 1010x729 pixels, actual is 1010x661 pixels)

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/rebase

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current September 11, 2025 15:47
@PureWeen PureWeen merged commit 2e9d2c3 into dotnet:inflight/current Sep 11, 2025
78 checks passed
PureWeen pushed a commit that referenced this pull request Sep 18, 2025
* harish_feature_matrix_border

* Update BorderFeatureTests.cs

* Updated BorderFeatureTest.cs

* Update BorderFeatureTests.cs

* Added Shapes for Border Control

* Updated the TestCases

* Added Snapshots

* Updated the SnapShots

* Added Fails to the Testcase

* Update BorderFeatureTests.cs

* Update BorderFeatureTests.cs

* Updated the Windows Snapshots
PureWeen pushed a commit that referenced this pull request Sep 18, 2025
* harish_feature_matrix_border

* Update BorderFeatureTests.cs

* Updated BorderFeatureTest.cs

* Update BorderFeatureTests.cs

* Added Shapes for Border Control

* Updated the TestCases

* Added Snapshots

* Updated the SnapShots

* Added Fails to the Testcase

* Update BorderFeatureTests.cs

* Update BorderFeatureTests.cs

* Updated the Windows Snapshots
github-actions Bot pushed a commit that referenced this pull request Sep 18, 2025
* harish_feature_matrix_border

* Update BorderFeatureTests.cs

* Updated BorderFeatureTest.cs

* Update BorderFeatureTests.cs

* Added Shapes for Border Control

* Updated the TestCases

* Added Snapshots

* Updated the SnapShots

* Added Fails to the Testcase

* Update BorderFeatureTests.cs

* Update BorderFeatureTests.cs

* Updated the Windows Snapshots
github-actions Bot pushed a commit that referenced this pull request Sep 23, 2025
* harish_feature_matrix_border

* Update BorderFeatureTests.cs

* Updated BorderFeatureTest.cs

* Update BorderFeatureTests.cs

* Added Shapes for Border Control

* Updated the TestCases

* Added Snapshots

* Updated the SnapShots

* Added Fails to the Testcase

* Update BorderFeatureTests.cs

* Update BorderFeatureTests.cs

* Updated the Windows Snapshots
github-actions Bot pushed a commit that referenced this pull request Sep 23, 2025
* harish_feature_matrix_border

* Update BorderFeatureTests.cs

* Updated BorderFeatureTest.cs

* Update BorderFeatureTests.cs

* Added Shapes for Border Control

* Updated the TestCases

* Added Snapshots

* Updated the SnapShots

* Added Fails to the Testcase

* Update BorderFeatureTests.cs

* Update BorderFeatureTests.cs

* Updated the Windows Snapshots
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants