[Testing] Fixed Test case failure in net10 branch - 2#32224
[Testing] Fixed Test case failure in net10 branch - 2#32224rmarinho merged 1 commit intodotnet:net10.0from
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. |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This PR resolves UI test image failures in the net10 branch by updating test snapshots and adding platform-specific cropping to accommodate Android's navigation bar in landscape mode.
- Updated snapshots for VerifyModelItemsObservableCollectionWhenMultipleModePreSelection test due to incorrect image from merge conflict
- Added Android-specific left cropping (125px) to three toolbar tests to handle navigation bar in landscape orientation
Reviewed Changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Issue28986_Shell.cs | Added Android-specific left crop to handle navigation bar in landscape mode |
| Issue28986_NavigationPage.cs | Added Android-specific left crop to handle navigation bar in landscape mode |
| Issue28986_FlyoutPage.cs | Added Android-specific left crop to handle navigation bar in landscape mode |
| App.SetOrientationLandscape(); | ||
| App.WaitForElement("ContentGrid"); | ||
| #if ANDROID | ||
| VerifyScreenshot(cropLeft: 125); |
There was a problem hiding this comment.
The magic number 125 is used for cropLeft without explanation. Consider extracting this value to a named constant (e.g., AndroidLandscapeNavigationBarWidth) to improve code clarity and maintainability across all three test files where this same value is duplicated.
| App.SetOrientationLandscape(); | ||
| App.WaitForElement("ContentGrid"); | ||
| #if ANDROID | ||
| VerifyScreenshot(cropLeft: 125); |
There was a problem hiding this comment.
The magic number 125 is duplicated from Issue28986_Shell.cs. Consider extracting this value to a shared named constant (e.g., AndroidLandscapeNavigationBarWidth) to ensure consistency and ease future updates if this dimension changes.
| App.SetOrientationLandscape(); | ||
| App.WaitForElement("ContentGrid"); | ||
| #if ANDROID | ||
| VerifyScreenshot(cropLeft: 125); |
There was a problem hiding this comment.
The magic number 125 is duplicated from the other Issue28986 test files. Consider extracting this value to a shared named constant (e.g., AndroidLandscapeNavigationBarWidth) to maintain consistency across all three toolbar tests.

This PR addresses the UI test image failures that occurred in the net10 branch #32110 and includes updates to improve rendering and test stability across platforms.
Test cases: