-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Testing] - Enabled Test 29402 to Pass on Both CV1 and CV2 Handlers #29423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hey there @@prakashKannanSf3972! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this 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 fixes an issue with CarouselView's item retention during orientation changes by ensuring that tests always run in portrait mode.
- Added a TearDown method in the test case to reset device orientation to portrait.
- Updated XAML to use the standard CarouselView control instead of a legacy/custom control.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28523.cs | Added a TearDown method to enforce portrait orientation after the test. |
src/Controls/tests/TestCases.HostApp/Issues/Issue28930.xaml | Replaced legacy CarouselView1 with the standard CarouselView control. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
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!
Cause
During the landscape-to-portrait transition, CarouselView fails to retain the expected item position, scrolling to the next item instead. Appium triggers a right-scroll, causing the test to fail in CV2 as Item 3 appears instead of the expected Item 2.
The test
CarouselViewItemShouldScaleProperly
sets the device to landscape but doesn’t reset it to portrait. As a result, the next test,CarouselViewInLineBreakMode
, starts in landscape and switches to portrait during execution, causing inconsistent behavior.This issue is unrelated to
LineBreakMode
and stems from CarouselView’s item position handling during orientation changes. It has already been reported here: [https://github.com/CarouselView Item Changes Unexpectedly on Orientation Change in CV2 #28972]Description of Change
[TearDown]
method to reset the app's orientation to portrait mode after theCarouselViewItemShouldScaleProperly
test is completed, ensuring a consistent test environment setup. The test now passes for both CV1 and CV2 handlers.Issues Fixed
Fixes #29402
Output
CV2_Failing_Before_Reset.mov
CV2_Passed_After_Reset.mov