Skip to content
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 - 1 #27695

Merged
merged 6 commits into from
Feb 22, 2025

Conversation

anandhan-rajagopal
Copy link
Contributor

@anandhan-rajagopal anandhan-rajagopal commented Feb 11, 2025

Description of Change

Migration of Compatibility.Core platform-specific unit tests to device tests. Here the migrated cases which ensuring that the background color consistency of different elements matches their native counterparts. We are going to migrate tests in blocks in different PRs. This is the 1st 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.

Background Color Consistency Tests:

  • BoxView: Added a new test BoxViewBackgroundColorConsistent to verify that the BackgroundColor of a BoxView matches the native background color. (src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.cs)
  • Button: Added a new test ButtonBackgroundColorConsistent to verify that the BackgroundColor of a Button matches the native background color. (src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.cs)
  • Editor: Added a new test EditorBackgroundColorConsistent to verify that the BackgroundColor of an Editor matches the native background color. (src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.cs)
  • Entry: Added a new test EntryBackgroundColorConsistent to verify that the BackgroundColor of an Entry matches the native background color. (src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.cs)
  • Image: Added a new test ImageBackgroundColorConsistent to verify that the BackgroundColor of an Image matches the native background color. (src/Controls/tests/DeviceTests/Elements/Image/ImageTests.cs)
  • Label: Added a new test LabelBackgroundColorConsistent to verify that the BackgroundColor of a Label matches the native background color. (src/Controls/tests/DeviceTests/Elements/Label/LabelTests.cs)
  • Picker: Added a new test PickerBackgroundColorConsistent to verify that the BackgroundColor of a Picker matches the native background color. (src/Controls/tests/DeviceTests/Elements/Picker/PickerTests.cs)

Issues Fixed

Fixes #27303

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 11, 2025
@anandhan-rajagopal anandhan-rajagopal marked this pull request as ready for review February 11, 2025 07:51
@Copilot Copilot bot review requested due to automatic review settings February 11, 2025 07:51
@anandhan-rajagopal anandhan-rajagopal requested a review from a team as a code owner February 11, 2025 07:51
@anandhan-rajagopal anandhan-rajagopal added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 11, 2025
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.

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

Files not reviewed (2)
  • src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.cs: Evaluated as low risk
  • src/Controls/tests/DeviceTests/Elements/Label/LabelTests.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/Controls/tests/DeviceTests/Elements/Image/ImageTests.cs:81

  • [nitpick] The test description should be more specific. Consider renaming to 'The BackgroundColor of an Image should match the native background color'.
[Description("The BackgroundColor of a Image should match with native background color")]

@anandhan-rajagopal anandhan-rajagopal added the area-testing Unit tests, device tests label Feb 11, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

This comment was marked as off-topic.

@jsuarezruiz

This comment was marked as off-topic.

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Feb 18, 2025

/azp run

This comment was marked as off-topic.

@jsuarezruiz

This comment was marked as off-topic.

@jfversluis jfversluis self-assigned this Feb 20, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
because this test fails unable to get the current color.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis added this to the .NET 9 SR5 milestone Feb 22, 2025
@jfversluis jfversluis merged commit 77993d1 into dotnet:main Feb 22, 2025
123 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 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