-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Migration of Compatibility.Core platform-specific unit tests into device tests - 5 #28193
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
[Testing] Migration of Compatibility.Core platform-specific unit tests into device tests - 5 #28193
Conversation
|
Hey there @TamilarasanSF4853! 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.
PR Overview
This PR migrates several Compatibility.Core platform-specific unit tests into device tests for Android (with some minor updates in iOS and shared test files), ensuring that UI elements’ Scale and Rotation properties match their native counterparts. Key changes include:
- Adding device tests for ScaleX, ScaleY, Scale, RotationX, RotationY, and Rotation for elements like Image, Entry, Picker, Label, TabbedPage, SwipeView, SearchBar, Button, Editor, CheckBox, TemplatedView, and BoxView.
- Introducing necessary namespace imports (e.g. System.ComponentModel) to support the new tests.
- Minor adjustments in existing files (e.g. Label tests) to align with the migrated test structure.
Reviewed Changes
| File | Description |
|---|---|
| src/Controls/tests/DeviceTests/Elements/Image/ImageTests.Android.cs | New tests for verifying Scale and Rotation properties on Image. |
| src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs | New tests for verifying Scale and Rotation properties on Entry. |
| src/Controls/tests/DeviceTests/Elements/Picker/PickerTests.Android.cs | New tests for verifying Scale and Rotation properties on Picker. |
| src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs | New tests for verifying Scale and Rotation properties on Label. |
| src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs | New tests for verifying Scale and Rotation properties on TabbedPage. |
| src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs | New tests for verifying Scale and Rotation properties on SwipeView. |
| src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs | New tests for verifying Scale and Rotation properties on SearchBar. |
| src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs | New tests for verifying Scale and Rotation properties on Button. |
| src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs | New tests for verifying Scale and Rotation properties on Editor. |
| src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs | New tests for verifying Scale and Rotation properties on CheckBox. |
| src/Controls/tests/DeviceTests/Elements/TemplatedView/TemplatedViewTests.Android.cs | New tests for verifying Scale and Rotation properties on TemplatedView. |
| src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs | New tests for verifying Scale and Rotation properties on BoxView. |
| src/Controls/tests/DeviceTests/Elements/Label/LabelTests.iOS.cs | New RTL tests for Label with FormattedText and LineHeight. |
| src/Controls/tests/DeviceTests/Elements/Label/LabelTests.cs | Minor comment adjustment for Label background color consistency. |
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs:69
- [nitpick] Consider renaming 'PlatformEditor' to 'platformEditor' for consistency with local variable naming conventions.
var PlatformEditor = GetPlatformControl(handler);
src/Controls/tests/DeviceTests/Elements/TemplatedView/TemplatedViewTests.Android.cs
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
left a comment
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.
Could you rebase to fix the conflicts?
e57e5a7 to
66c4e51
Compare
@jsuarezruiz I’ve rebased and resolved the conflicts |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
71e9c48 to
b1b3969
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
…dViewTests.Android.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
23bb64f to
6deb60b
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
…s into device tests - 5 (#28193) * Test case added * Update LabelTests.iOS.cs * test case added * code changes * reverted changes * Update src/Controls/tests/DeviceTests/Elements/TemplatedView/TemplatedViewTests.Android.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * handler code change * conflict code changes * flow direction test * Revert "flow direction test" This reverts commit 1f5c535. * Reverted changes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Anandhan Rajagopal <97146406+anandhan-rajagopal@users.noreply.github.com>
…s into device tests - 5 (#28193) * Test case added * Update LabelTests.iOS.cs * test case added * code changes * reverted changes * Update src/Controls/tests/DeviceTests/Elements/TemplatedView/TemplatedViewTests.Android.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * handler code change * conflict code changes * flow direction test * Revert "flow direction test" This reverts commit 1f5c535. * Reverted changes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Anandhan Rajagopal <97146406+anandhan-rajagopal@users.noreply.github.com>
…s into device tests - 5 (#28193) * Test case added * Update LabelTests.iOS.cs * test case added * code changes * reverted changes * Update src/Controls/tests/DeviceTests/Elements/TemplatedView/TemplatedViewTests.Android.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * handler code change * conflict code changes * flow direction test * Revert "flow direction test" This reverts commit 1f5c535. * Reverted changes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Anandhan Rajagopal <97146406+anandhan-rajagopal@users.noreply.github.com>
Description of Change
Migration of Compatibility.Core platform-specific unit tests to device tests. Here the migrated cases which ensuring that the IsEnabled and CornerRadius consistency of different elements matches their native counterparts. We are going to migrate tests in blocks in different PRs. This is the 5st group.
There are unit tests under:
That are not running right now. these cases from Xamarin.Forms where they could run as unit tests, but now with .NET MAUI this is not possible. So here I migrated the following cases in device tests.
This pull request includes several changes to the Android device tests for various UI elements. The primary focus is on adding tests to ensure that the properties
ScaleX,ScaleY,Scale,RotationX,RotationY, andRotationof different UI elements are consistent with their native counterparts.New tests for property consistency:
src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs: Added tests to verify that theScaleX,ScaleY,Scale,RotationX,RotationY, andRotationproperties of aBoxVieware consistent with the native properties.src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs: Added tests to verify that theScaleX,ScaleY,Scale,RotationX,RotationY, andRotationproperties of aButtonare consistent with the native properties. [1] [2]src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs: Added tests to verify that theScaleX,ScaleY,Scale,RotationX,RotationY, andRotationproperties of aCheckBoxare consistent with the native properties. [1] [2]src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs: Added tests to verify that theScaleX,ScaleY,Scale,RotationX,RotationY, andRotationproperties of anEditorare consistent with the native properties. [1] [2]src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs: Added tests to verify that theScaleX,ScaleY,Scale,RotationX,RotationY, andRotationproperties of anEntryare consistent with the native properties. [1] [2]src/Controls/tests/DeviceTests/Elements/Image/ImageTests.Android.cs: Added tests to verify that theScaleX,ScaleY,Scale,RotationX,RotationY, andRotationproperties of anImageare consistent with the native properties. [1] [2]Minor changes:
System.ComponentModeland other necessary namespaces to several test files to support the new tests. [1] [2] [3] [4] [5] [6]Issues Fixed
Fixes #27303