[Testing] Migration of Compatibility.Core platform-specific unit tests into device tests - 2 #28054
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Migration of Compatibility.Core platform-specific unit tests to device tests. This pull request introduces several new tests to verify that the
IsEnabled
property of various UI elements matches the nativeIsEnabled
property. Additionally, it includes tests for specific properties likeCornerRadius
andBackground
for some elements. This is the 2nd groupThere 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.
New Tests for
IsEnabled
Property:src/Controls/tests/DeviceTests/Elements/Border/BorderTests.Windows.cs
: Added a test to verify that theIsEnabled
property of aBorder
matches the nativeIsEnabled
property.src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs
: Added a test to verify that theIsEnabled
property of aBoxView
matches the nativeIsEnabled
property.src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.cs
: Added a test to verify that theIsEnabled
property of aButton
matches the nativeIsEnabled
property.src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs
: Added a test to verify that theIsEnabled
property of anEditor
matches the nativeIsEnabled
property.src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs
: Added a test to verify that theIsEnabled
property of aLabel
matches the nativeIsEnabled
property.src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.cs
: Added a test to verify that theIsEnabled
property of aCheckBox
matches the nativeIsEnabled
property.IsEnabled
property of aSearchBar
matches the nativeIsEnabled
property.IsEnabled
property of aSwipeView
matches the nativeIsEnabled
property.IsEnabled
property of aEntry
matches the nativeIsEnabled
property.New Tests for Other Properties:
src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.cs
: Added a test to verify that theBackground
property of aBoxView
matches the nativeBackground
.src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.iOS.cs
: Added a test to verify that theCornerRadius
property of aButton
matches the nativeCornerRadius
.src/Controls/tests/DeviceTests/Elements/RadioButton/RadioButtonTests.Windows.cs
: Added a test to verify that theCornerRadius
property of aRadioButton
matches the nativeCornerRadius
.Issues Fixed
Fixes #27303