Skip to content

Conversation

PureWeen
Copy link
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Issues Fixed

Fixes #

@Copilot Copilot AI review requested due to automatic review settings September 18, 2025 18: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 adds comprehensive test cases for various .NET MAUI controls, including new issue reproductions and feature matrix test pages. The changes primarily focus on expanding the test coverage for UI controls and their properties, with particular emphasis on navigation, layout controls, and visual elements.

  • Issue test cases: Adds test cases for 10 new issues covering FlyoutPage, RefreshView, CollectionView, LinearGradientBrush, PointerGestureRecognizer, Shell, and navigation scenarios
  • Feature matrix pages: Introduces comprehensive test pages for WebView, TwoPaneView, SwipeView, Shapes, RefreshView, NavigationPage, HorizontalStackLayout, FlyoutPage, and ContentView controls
  • Test infrastructure: Adds ViewModels, options pages, and supporting classes to enable thorough testing of control properties and behaviors

Reviewed Changes

Copilot reviewed 81 out of 723 changed files in this pull request and generated 4 comments.

File Description
src/Controls/tests/TestCases.HostApp/Issues/*.cs Issue reproduction test cases for various UI controls and navigation scenarios
src/Controls/tests/TestCases.HostApp/Issues/Issue30483.xaml* XAML-based Shell FlyoutMenu test case
src/Controls/tests/TestCases.HostApp/FeatureMatrix//.cs ViewModels and code-behind for comprehensive control testing
src/Controls/tests/TestCases.HostApp/FeatureMatrix//.xaml XAML UI definitions for feature matrix test pages
Comments suppressed due to low confidence (2)

src/Controls/tests/TestCases.HostApp/FeatureMatrix/Shapes/ShapeConverters.cs:1

  • The cast ((Issue31351CollectionViewItem)this) is unnecessary and should be this.Title.Equals(...)
using System.Globalization;

src/Controls/tests/TestCases.HostApp/FeatureMatrix/NavigationPage/NavigationPageControlPage.xaml.cs:1

  • [nitpick] Creating a new ViewModel instance discards the existing state and navigation tracking. Consider whether this is intentional or if state should be preserved.
using System;

Issue31390ViewModel _viewModel;
public Issue31390FlyoutPage(Issue31390ViewModel _viewModel)
{
_viewModel = new Issue31390ViewModel();
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

The parameter _viewModel passed to the constructor is ignored, and a new instance is created instead. This should use the passed parameter: this._viewModel = _viewModel;

Suggested change
_viewModel = new Issue31390ViewModel();
this._viewModel = _viewModel;

Copilot uses AI. Check for mistakes.


private async void NavigateToPopover_Clicked(object sender, EventArgs e)
{
BindingContext = _viewModel = new Issue31390ViewModel();
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

Creating a new ViewModel instance here discards any state from the existing _viewModel. This should likely reuse the existing instance or ensure state is properly transferred.

Suggested change
BindingContext = _viewModel = new Issue31390ViewModel();
BindingContext = _viewModel;

Copilot uses AI. Check for mistakes.


private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
{
BindingContext = _viewModel = new StackLayoutViewModel();
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

[nitpick] Creating a new ViewModel instance discards any existing property values. This pattern appears multiple times and may not preserve user-configured settings.

Suggested change
BindingContext = _viewModel = new StackLayoutViewModel();
// Reuse the existing _viewModel to preserve property values

Copilot uses AI. Check for mistakes.


private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
{
BindingContext = _viewModel = new ShapesViewModel();
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

[nitpick] Creating a new ViewModel instance discards any existing shape configuration. Consider preserving state or documenting that this is intentional reset behavior.

Suggested change
BindingContext = _viewModel = new ShapesViewModel();
// Preserve existing shape configuration by reusing the current _viewModel

Copilot uses AI. Check for mistakes.

@PureWeen PureWeen changed the title Inflight/candidate Candidate Branch September 22nd Sep 18, 2025
@PureWeen
Copy link
Member Author

/rebase

@PureWeen
Copy link
Member Author

@kubaflo it looks like CurrentItemShouldWork is failing

@kubaflo
Copy link
Contributor

kubaflo commented Sep 18, 2025

@kubaflo it looks like CurrentItemShouldWork is failing

Can we try to azp this PR?
#31685

@sheiksyedm
Copy link
Contributor

@kubaflo These tests failed with this PR changes. Can you look at it?

  • TitleView_Add_Visual
  • TitleIcon_And_TitleView_Persist_On_Push_Then_Clear (see overlaping on icon and title).
image image

@kubaflo
Copy link
Contributor

kubaflo commented Sep 20, 2025

@kubaflo These tests failed with this PR changes. Can you look at it?

  • TitleView_Add_Visual
  • TitleIcon_And_TitleView_Persist_On_Push_Then_Clear (see overlaping on icon and title).

image image

#31701

@PureWeen
Copy link
Member Author

/rebase

@PureWeen
Copy link
Member Author

/rebase

MartyIX and others added 12 commits September 23, 2025 16:01
* [Android] Sort gradient stops by offset

Updated the gradient stop processing to order stops by their offset before populating color and offset arrays. This ensures gradients are rendered correctly according to stop positions.

* Added a UITest

* Add snapshots

---------

Co-authored-by: Gerald Versluis <[email protected]>
…aded event while navigating on MacCatalyst and iOS (#29410)

* Fixed Crash on shell navigation for Mac Catalyst

* Test case added

* test case name modified

* updated the fix

* Issue linked

* curly brace added

* modified the condition.

* Modified the fix
* added test cases

* updated test cases

* updated ui

* added test cases

* added failing condition

* added Android and iOS snapshots

* added snapshots

* removed VerifyScreenshot

* added additional test case

* added mac snapshot

* modified ProgressSpinnerNotDisabledOnStartup test case

* Replaced DragCoordinates with the ScrollUp method
* feature_matrix_twopaneview

* Updated TwoPaneViewFeatureTest

* Updated TwoPaneView Feature matrix

* Update TwoPaneViewFeatureTests.cs

* Added properties

* Added the Snapshots

* Updated Two Pane View

* Added Snapshots

* Added snapshots

* Added snapshots for windows

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TwoPaneViewFeatureTests.cs

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

* Update TwoPaneViewFeatureTests.cs

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
* Added WebView Feature Tests

* Added base image

* Updated the test case

---------

Co-authored-by: Shane Neuville <[email protected]>
* added the sample and test class files

* added snapshot for iOS and android

* added FailsOn attributes

* updated

* test case modified

* changes updated

* revert this changes

* added snapshot from CI

* update copilot suggestion

* update test case

---------

Co-authored-by: Shane Neuville <[email protected]>
* 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
* Added Flyout Feature tests

* changes updated

* Added base images

* Added base images

* changes updated

* Update src/Controls/tests/TestCases.HostApp/FeatureMatrix/FlyoutPage/FlyoutPageViewModel.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/FlyoutPageFeatureTests.cs

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

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/FlyoutPageFeatureTests.cs

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

* Addressed copilot suggestions

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
* ContentPage_Feature_Matrix

* Added Testcases

* Added Testcases

* Added snapshots

* Updated the testcase

* Update src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ContentPageFeatureTests.cs

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

* Added snapshots

* Updated the Android and iOS snapdhots

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
…ltiWindow. (#31143)

* Included the test for the PointerGesture Issue on windows

* Used Windows API for minimizing the window

* Minimize the window using GetWindowHandle

* prevent unwanted issues
…eshing is set to True (#31471)

* fix added

* Update RefreshViewHandler.Windows.cs

* Update RefreshViewHandler.Windows.cs

* Update RefreshViewHandler.Windows.cs

* test case added

* Update RefreshViewHandler.Windows.cs

* Update Issue31375.cs

* Update Issue31375.cs
Dhivya-SF4094 and others added 22 commits September 23, 2025 16:01
…splay selection correctly (#31549)

* Update ItemsViewHandler.Windows.cs

* Testcases added

* commit for testcases

* Update Issue31351.cs

* Update Issue31351.cs

* Update Issue31351.cs
* Added sample  class files

* updated sample

* added test case

* updated UI

* updated

* updated test cases

* updated snapshot for iOS

* added issue link

* added CI snapshots

---------

Co-authored-by: Shane Neuville <[email protected]>
* AbsoluteLayout Feature tests

* Added base images

* Added base images

---------

Co-authored-by: Shane Neuville <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Added the testbed sample for the NavigationPage Feature Matrix

* Added the testcases for NavigationPage

* Updated NavigationPageFeatureTests

* Added the Snapshots

* Added snapshots for mac and windows

* Updated the testcases

* Update NavigationPageFeatureTests.cs

* Update NavigationPageFeatureTests.cs

* Added Windows and Mac snapshots

* Update TitleViewCleared.png

---------

Co-authored-by: nivetha-nagalingam <[email protected]>
…ck Layout (#31393)

* Added snapshots

* Updated tests

* Removed snapshots

* Added Snapshots

* Added base images

* Updated the suggestions

* Added the Snapshots

---------

Co-authored-by: Shane Neuville <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Added UI test for null selectin bug

* Handle when group update changes to no values

* Added unit test

* new file to file scoped namespace

* Ignore child added if layout is null

* Piggy backed off of existing UI sample

* removing unused using

* reverting whitespace

* removing unused using

* Have RadioButton default to itself for uniqueness

* Added comment justifying madness

* less hacky way

* Less hacky and added unit test

---------

Co-authored-by: Evin Ballantyne <[email protected]>
* Update NavigationRenderer.cs

* test case added

* Update Issue31539.cs

* snapshot added
…causes back button to disappear (#28132)

* [Android] Shell.BackButtonBehavior - improvement

* Added a UITest

* Updated snapshots
* Misc nativeAOT Windows compatibility fixes

* Adjust conditional for font retrieval in FontManager.Windows

* Revert ShellItemHandler changes and  update MauiNavigationView with dynamic dependencies
…ushAsync (#31536)

* Update NavigationPage.cs

* Added test

* Update NavigationPage.cs

* Update NavigationPage.cs
)

* [CarouselViewHandler2] CurrentItem does not work when PeekAreaInsets is set

* Added a UITest
…31701)

* [iOS] Shell/NavigationPage TitleView

Replaces the custom CalculateUIEdgeInsets method with an override of AlignmentRectInsets that leverages the IView.Margin property. This ensures the alignment insets reflect the view’s actual margins, allowing developers to align the TitleView directly with the screen edges.

* [iOS] Shell/NavigationPage TitleView

Replaces the custom CalculateUIEdgeInsets method with an override of AlignmentRectInsets that leverages the IView.Margin property. This ensures the alignment insets reflect the view’s actual margins, allowing developers to align the TitleView directly with the screen edges.
@PureWeen PureWeen disabled auto-merge September 24, 2025 01:48
@PureWeen
Copy link
Member Author

The PR CI is having trouble starting the API 33 devices

I ran on an internal pipeline here
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=12448437&view=results

and it's all green

@PureWeen PureWeen merged commit 32458cc into main Sep 24, 2025
128 of 130 checks passed
@PureWeen PureWeen deleted the inflight/candidate branch September 24, 2025 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.