Skip to content

Conversation

@NafeelaNazhir
Copy link
Contributor

This PR includes a comprehensive set of UI test cases for the CarouselView control. The tests validate the CarouselView Control including properties such as: EmptyView , EmptyViewTemplate, ItemsLayout, ItemsSource, ItemsUpdatingScrollMode, Loop, IsSwipeEnabled, PeekAreaInsets, Position, ScrollTo, FlowDirection, CurrentItemChanged and PositionChanged events and ItemTemplate.

Issues Identified in CarouselView:

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels May 16, 2025
@NafeelaNazhir NafeelaNazhir added area-testing Unit tests, device tests partner/syncfusion Issues / PR's with Syncfusion collaboration community ✨ Community Contribution and removed community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels May 16, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NafeelaNazhir NafeelaNazhir marked this pull request as ready for review May 19, 2025 06:47
Copilot AI review requested due to automatic review settings May 19, 2025 06:47
@NafeelaNazhir NafeelaNazhir requested a review from a team as a code owner May 19, 2025 06:47
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 PR adds a comprehensive suite of UI test cases for the CarouselView control to validate its various properties and behaviors. Key changes include:

  • A new view model (CarouselViewViewModel) encapsulating CarouselView settings and behavior.
  • Updated XAML pages and code-behind files for configuring and interacting with CarouselView test cases.
  • Integration of the CarouselView test pages into the gallery through CorePageView.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewViewModel.cs Introduces the CarouselView view model and related properties.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewOptionsPage.xaml.cs Implements options handling for CarouselView test cases.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewOptionsPage.xaml Provides the UI definitions for CarouselView options.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewFeaturePage.xaml.cs Creates a feature page for CarouselView tests.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewFeaturePage.xaml XAML layout for the CarouselView feature page.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewControlPage.xaml.cs Implements CarouselView control logic including event handling.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewControlPage.xaml XAML definitions for the CarouselView control test page.
src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs Registers the new CarouselView test page in the gallery.
Comments suppressed due to low confidence (3)

src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewViewModel.cs:12

  • [nitpick] The enum member 'ObservableCollectionT' can be ambiguous; consider renaming it to a more descriptive name such as 'ObservableCollection'.
ObservableCollectionT,

src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewViewModel.cs:152

  • [nitpick] The property name 'Thickness' is ambiguous given that it represents a numerical value for PeekAreaInsets; consider renaming it to something more descriptive like 'PeekThickness'.
public int Thickness

src/Controls/tests/TestCases.HostApp/FeatureMatrix/CarouselView/CarouselViewOptionsPage.xaml:72

  • The AutomationId 'EmptViewNone' appears to have a typo; consider renaming it to 'EmptyViewNone' for consistency with the naming convention.
<RadioButton x:Name="EmptyViewNone" Content="None" IsChecked="True" GroupName="EmptyView" FontSize="11" CheckedChanged="OnEmptyViewChanged" AutomationId="EmptViewNone"/>

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS //In CV2 related issue link: https://github.com/dotnet/maui/issues/27711
[Test]
[Category(UITestCategories.CarouselView)]
public void VerifyCarouselViewWithRTLFlowDirection()
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is failing on Android:

   at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2420
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2437
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 680
   at Microsoft.Maui.TestCases.Tests.CarouselViewFeatureTests.VerifyCarouselViewWithRTLFlowDirection() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CarouselViewFeatureTests.cs:line 877
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @jsuarezruiz I have modified the test and committed the code changes.

@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 May 22, 2025 18:19
@PureWeen PureWeen merged commit 17f5565 into dotnet:inflight/current May 22, 2025
79 of 80 checks passed
github-actions bot pushed a commit that referenced this pull request May 22, 2025
* Added the CarouselView FeatureMatrix to the hostapp

* added test cases

* added test cases

* updated changes

* updated the test cases

* modified changes

* added issue link

* updated layout

* updated changes

* updated test cases

* Changes updated

* changes updated

* Fix Formatting

* Changes updated

---------

Co-authored-by: nivetha-nagalingam <nivetha.nagalingam@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
github-actions bot pushed a commit that referenced this pull request May 30, 2025
* Added the CarouselView FeatureMatrix to the hostapp

* added test cases

* added test cases

* updated changes

* updated the test cases

* modified changes

* added issue link

* updated layout

* updated changes

* updated test cases

* Changes updated

* changes updated

* Fix Formatting

* Changes updated

---------

Co-authored-by: nivetha-nagalingam <nivetha.nagalingam@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
github-actions bot pushed a commit that referenced this pull request May 30, 2025
* Added the CarouselView FeatureMatrix to the hostapp

* added test cases

* added test cases

* updated changes

* updated the test cases

* modified changes

* added issue link

* updated layout

* updated changes

* updated test cases

* Changes updated

* changes updated

* Fix Formatting

* Changes updated

---------

Co-authored-by: nivetha-nagalingam <nivetha.nagalingam@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
@rmarinho rmarinho added this to the .NET 9 SR8 milestone May 30, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 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 partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants