[Testing] Migration of Compatibility.Core platform-specific unit tests into device tests - 7#28409
Merged
PureWeen merged 5 commits intoinflight/currentfrom Mar 18, 2025
unknown repository
Merged
[Testing] Migration of Compatibility.Core platform-specific unit tests into device tests - 7#28409PureWeen merged 5 commits intoinflight/currentfrom unknown repository
PureWeen merged 5 commits intoinflight/currentfrom
unknown repository
Conversation
Contributor
|
Hey there @nivetha-nagalingam! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates platform-specific unit tests from Compatibility.Core into device tests to ensure that the behavior of CollectionView and Shell components matches native expectations.
- Migrates CollectionView unit tests for both Android and iOS with new test cases for observable collections and snap points.
- Adds new Shell tests on Android to verify flyout header updates and default BottomNavigationView colors.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.Android.cs | Migrated and enhanced CollectionView tests for Android. |
| src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.iOS.cs | Migrated and enhanced CollectionView tests for iOS. |
| src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.Android.cs | Migrated and enhanced Shell tests on Android. |
src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.Android.cs
Outdated
Show resolved
Hide resolved
src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.Android.cs
Outdated
Show resolved
Hide resolved
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
rmarinho
approved these changes
Mar 18, 2025
PureWeen
pushed a commit
that referenced
this pull request
Mar 26, 2025
…s into device tests - 7 (#28409) * Enabled the Shell and ObservableItemsSource for device test * Updated CollectionViewTests.Android.cs * Addressed the feedback * Removed three test cases from the CollectionView test * Corrected the misspelled words
PureWeen
pushed a commit
that referenced
this pull request
Mar 26, 2025
…s into device tests - 7 (#28409) * Enabled the Shell and ObservableItemsSource for device test * Updated CollectionViewTests.Android.cs * Addressed the feedback * Removed three test cases from the CollectionView test * Corrected the misspelled words
github-actions bot
pushed a commit
that referenced
this pull request
Mar 27, 2025
…s into device tests - 7 (#28409) * Enabled the Shell and ObservableItemsSource for device test * Updated CollectionViewTests.Android.cs * Addressed the feedback * Removed three test cases from the CollectionView test * Corrected the misspelled words
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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. Here the migrated cases which ensuring that the ShellTest and ObservableItemsSource consistency of different elements matches their native counterparts. We are going to migrate tests in blocks in different PRs. This is the 7th 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.
CollectionView Tests Enhancements:
ObservableCollectionmodifications and their reflection after the UI thread processes them, including item addition, removal, and position updates.SnapPointsTypeset onCollectionViewdoes not cause crashes on older APIs.MockCollectionChangedNotifier, to facilitate the new tests.CollectionViewTests.Android.csandCollectionViewTests.iOS.cs.https://github.com/dotnet/maui/blob/main/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.Android.cs
https://github.com/dotnet/maui/blob/main/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.iOS.cs
Shell Tests Enhancements:
BottomNavigationViewin Shell are set to white.These changes ensure that the CollectionView and Shell components behave as expected under various conditions, improving the reliability of the application.
Issues Fixed
Fixes #27303