-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Include more testing around Windows Image Aspect recent fixes #31694
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
base: net10.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive UI testing coverage for the recent Windows Image Aspect fixes related to issue 30403. The changes validate that images with AspectFit now properly respect VerticalOptions and HorizontalOptions on Windows platforms.
Key changes:
- Adds extensive test coverage for different image sizes and alignment scenarios
- Creates dedicated test pages for panoramic images, small images, and general image alignment
- Implements automated UI tests to verify aspect ratio preservation and alignment behavior
Reviewed Changes
Copilot reviewed 8 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt |
Adds new public API for Windows ImageHandler.GetDesiredSize override |
src/Core/src/Handlers/Image/ImageHandler.Windows.cs |
Implements GetDesiredSize override and platform constraint management for AspectFit images |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30403SmallImages.cs |
Automated tests for small image behavior with various alignments and container sizes |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30403PanoramicImages.cs |
Automated tests for panoramic image alignment and aspect ratio preservation |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30403.cs |
Basic UI test for the original issue scenario |
src/Controls/tests/TestCases.HostApp/Issues/Issue30403SmallImages.cs |
Test page UI for small image scenarios with multiple test cases |
src/Controls/tests/TestCases.HostApp/Issues/Issue30403PanoramicImages.cs |
Test page UI for panoramic image scenarios with interactive elements |
src/Controls/tests/TestCases.HostApp/Issues/Issue30403.cs |
Basic test page for the original issue reproduction |
Comments suppressed due to low confidence (1)
src/Core/src/Handlers/Image/ImageHandler.Windows.cs:1
- Consider adding null checks for ih.PlatformView before setting MaxWidth and MaxHeight properties to prevent potential null reference exceptions.
using System;
Description of Change
Added more tests to validate the recent changes related with Windows image Aspect: #30936 (comment)
Issues Fixed
Fixes #31686