Skip to content

Conversation

@TamilarasanSF4853
Copy link
Contributor

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:

  • src\Compatibility\Core\tests\Android
  • src\Compatibility\Core\tests\iOS
  • src\Compatibility\Core\tests\WinUI

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, and Rotation of different UI elements are consistent with their native counterparts.

New tests for property consistency:

Minor changes:

  • Added System.ComponentModel and other necessary namespaces to several test files to support the new tests. [1] [2] [3] [4] [5] [6]

Issues Fixed

Fixes #27303

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Mar 5, 2025
@dotnet-policy-service
Copy link
Contributor

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.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Mar 5, 2025
@ghost ghost added the area-testing Unit tests, device tests label Mar 6, 2025
@TamilarasanSF4853 TamilarasanSF4853 marked this pull request as ready for review March 6, 2025 05:06
Copilot AI review requested due to automatic review settings March 6, 2025 05:06
@TamilarasanSF4853 TamilarasanSF4853 requested a review from a team as a code owner March 6, 2025 05:06
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.

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);

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a 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?

@TamilarasanSF4853 TamilarasanSF4853 force-pushed the Enabled-UnitTest-To-DeviceTest-3 branch from e57e5a7 to 66c4e51 Compare March 7, 2025 09:22
@TamilarasanSF4853
Copy link
Contributor Author

Could you rebase to fix the conflicts?

@jsuarezruiz I’ve rebased and resolved the conflicts

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@github-actions github-actions bot force-pushed the Enabled-UnitTest-To-DeviceTest-3 branch from 71e9c48 to b1b3969 Compare March 10, 2025 07:26
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Mar 14, 2025
@jsuarezruiz
Copy link
Contributor

/rebase

@github-actions github-actions bot force-pushed the Enabled-UnitTest-To-DeviceTest-3 branch from 23bb64f to 6deb60b Compare March 14, 2025 10:30
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current March 18, 2025 18:21
@PureWeen PureWeen merged commit cd3b13b into dotnet:inflight/current Mar 18, 2025
128 checks passed
PureWeen pushed a commit that referenced this pull request Mar 26, 2025
…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>
PureWeen pushed a commit that referenced this pull request Mar 26, 2025
…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>
github-actions bot pushed a commit that referenced this pull request Mar 27, 2025
…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>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 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.

Migrate Compatibility.Core platform-specific unit tests to device tests

3 participants