Implement screenshot cropping based on device orientation#31737
Implement screenshot cropping based on device orientation#31737Ahamed-Ali wants to merge 12 commits intodotnet:mainfrom
Conversation
|
Hey there @@Ahamed-Ali! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors screenshot cropping logic to automatically handle device orientation differences, eliminating the need for platform-specific manual cropping. The changes ensure proper cropping based on device orientation and prevent unwanted cropping artifacts.
- Removes manual
cropLeftandcropRightparameters from screenshot verification methods - Implements automatic orientation detection to apply appropriate cropping based on portrait/landscape mode
- Simplifies test code by removing platform-specific conditional cropping statements
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Controls/tests/TestCases.Shared.Tests/UITest.cs |
Refactors screenshot cropping logic to automatically detect orientation and apply appropriate cropping, removes manual cropLeft/cropRight parameters |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28523.cs |
Removes Android-specific manual left cropping, now handled automatically |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22606.cs |
Removes Android-specific manual left cropping, now handled automatically |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue15154.cs |
Removes Android-specific manual left cropping, now handled automatically |
4ecb92a to
0693427
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
left a comment
There was a problem hiding this comment.
Several Mac tests fails because the size of the snapshot is different:
Example: Snapshot different than baseline: CarouselViewItemShouldScaleProperly.png (size differs - baseline is 2436x974 pixels, actual is 2436x1084 pixels)
Something similar happens on there platforms, like Android.
Example: Snapshot different than baseline: ButtonsLayoutResolveWhenParentSizeChangesSizeButtonsDownLandscape.png (size differs - baseline is 1920x895 pixels, actual is 1795x1020 pixels)
eef8649 to
0f7fda5
Compare
I have addressed those failures, Can you please re-trigger the CI ? @jsuarezruiz |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
left a comment
There was a problem hiding this comment.
The test EntrySelectionLengthRuntimeUpdate is failing on iOS with a small difference clipping a text selected, could you review if is related with the changes?
The failing test is unrelated to the changes in this PR. @jsuarezruiz |
713933d to
04695ad
Compare
8b225e6 to
27044f0
Compare
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — changed based on main latest ·
|
| Reviewer | Status | Comment |
|---|---|---|
| copilot-pull-request-reviewer | COMMENTED | Breaking change: removing public API params; intermediate variables add unnecessary complexity |
| jsuarezruiz | CHANGES_REQUESTED (x2) | Snapshot size mismatches (landscape snapshots differ in dimensions); iOS test EntrySelectionLengthRuntimeUpdate failing |
Disagreements / Edge Cases
| File:Line | Reviewer Says | Author Says | Status |
|---|---|---|---|
| UITest.cs:412 | Removing cropLeft/cropRight is a breaking change |
N/A | |
| UITest.cs | retryTimeout removed from signature but still used in body |
N/A | ❌ COMPILE ERROR |
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31737 | Auto-detect orientation in UITest.cs, remove manual cropLeft/cropRight | ⏳ PENDING (Gate) | 20 files | Has critical compile error with retryTimeout |
🚦 Gate — Test Verification
📝 Review Session — changed based on main latest · 6a58063
Result: ❌ FAILED
Platform: android
Mode: Full Verification
Verification Attempt
The task agent attempted to run verify-tests-fail-without-fix with TestFilter: 'Issue28523'.
Reported Result:
- Tests WITHOUT fix: FAIL ✅ (as expected)
- Tests WITH fix: FAIL ❌ (not expected)
Critical Compile Error Identified
Code inspection reveals that this PR has a critical compile error that prevents the tests from building:
File: src/Controls/tests/TestCases.Shared.Tests/UITest.cs
The VerifyScreenshot method signature (lines 234-243) was modified to remove retryTimeout as a parameter:
public void VerifyScreenshot(
string? name = null,
TimeSpan? retryDelay = null, // retryTimeout was removed here
int cropTop = 0,
int cropBottom = 0,
double tolerance = 0.0
)However, the method body still references retryTimeout at lines 249, 254, and 264:
if (retryTimeout.HasValue) // CS0103: 'retryTimeout' does not exist
while (stopwatch.Elapsed < retryTimeout.Value) // same error
if (... < retryTimeout.Value) // same errorAdditionally, 719 callers in the test suite still call VerifyScreenshot(retryTimeout: ...) using the named argument:
// Example from BorderFeatureTests.cs (repeated 720+ times across tests)
VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2));These callers would also fail to compile since retryTimeout is no longer a valid parameter name.
Why Gate FAILED
The PR has a compile error that causes tests to fail even WITH the fix applied. This is the root cause of Gate failure, not a test logic issue.
- Tests FAIL without fix: ✅ (expected for issue-related tests, or due to compile error)
- Tests FAIL with fix: ❌ (compile error prevents test execution)
🔧 Fix — Analysis & Comparison
📝 Review Session — changed based on main latest · 6a58063
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31737 | Auto-detect orientation in UITest.cs, remove manual cropLeft/cropRight | ❌ FAIL (Gate) | 20 files | Critical compile error: retryTimeout removed from signature but still used in body |
Exhausted: N/A (Gate failed - skipped try-fix phase)
Selected Fix: N/A
📋 Report — Final Recommendation
📝 Review Session — changed based on main latest · 6a58063
⚠️ Final Recommendation: REQUEST CHANGES
Summary
PR #31737 aims to automate screenshot cropping based on device orientation in the UI test infrastructure. The concept is sound: instead of each test manually specifying #if ANDROID cropLeft: 125 #else ... #endif, the VerifyScreenshot() method detects orientation automatically and applies the appropriate crop. However, the PR has a critical compile error that must be fixed before it can be merged.
Root Cause (of the compile error)
When removing cropLeft, cropRight from the VerifyScreenshot signature, retryTimeout was also accidentally removed from the parameter list. However, the method body still references retryTimeout.HasValue at lines 249, 254, and 264, and 719 callers across the test suite still pass retryTimeout: as a named argument. This makes the entire test project uncompilable.
Gate Result: ❌ FAILED
Tests failed both with and without the fix applied, consistent with a compile error preventing test execution.
Issues Found
🔴 Critical: Compile Error
File: UITest.cs lines 249, 254, 264
retryTimeout was removed from the method signature but is still used in the body:
// Method signature (line 234-243) - retryTimeout MISSING
public void VerifyScreenshot(
string? name = null,
TimeSpan? retryDelay = null, // retryTimeout was here, now gone
int cropTop = 0,
...
)
{
// Method body - retryTimeout STILL USED → CS0103 compile error
if (retryTimeout.HasValue) // line 249: 'retryTimeout' does not exist🔴 Critical: 719 Callers Broken
All calls like VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)) will fail with CS1739. These are spread across BorderFeatureTests.cs, StackLayoutFeatureTests.cs, and many other test files.
🟡 Design Concern: Removing cropLeft/cropRight Parameters
These parameters were public API. Removing them is a breaking change for anyone passing manual crop values. The PR should either:
- Keep them as optional override parameters, OR
- Explicitly document this as intentional breaking change
🟡 Nitpick: Intermediate variables add unnecessary complexity
The Copilot review noted that the intermediate cropX, cropY, cropWidth, cropHeight variables don't improve readability over the original inline calculation.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31737 | Auto-detect orientation in UITest.cs | ❌ FAIL (Gate) | 20 files | Critical compile error with retryTimeout |
Selected Fix: None — PR needs fixes before approval
Required Changes Before Merge
- Fix compile error: Re-add
retryTimeoutas an optional parameter toVerifyScreenshotandVerifyScreenshotOrSetException, OR remove all references toretryTimeoutfrom the method body (but this removes existing retry timeout functionality) - Update callers OR keep parameter: 719 test files use
retryTimeout:- these need updating if removing the parameter, or the parameter must be kept - Reconsider removing
cropLeft/cropRight: These provide manual override capability that orientation detection cannot fully replace
PR Title/Description
Current title: Implement screenshot cropping based on device orientation
Suggested title: [Testing] UITest: Auto-detect orientation for screenshot cropping
Description needs updating to mention:
- The compile error fix (when addressed)
- The breaking API changes
- The orientation detection mechanism
📋 Expand PR Finalization Review
Title: ✅ Good
Current: Implement screenshot cropping based on device orientation
Description: ❌ Needs Rewrite
Description needs updates. See details below.
Missing Elements:
**
- Root cause (why manual
cropLeft/cropRightwith#if ANDROIDblocks existed) - What was changed in
UITest.cs(orientation-aware auto-crop logic, parameter removals) - Which parameters were removed from the public API (
retryTimeout,cropLeft,cropRight) - Which test files had
#if ANDROID cropLeft:blocks removed (8 test files) - Issues Fixed section
See recommended-description.md for a full replacement.
Phase 2: Code Review
See code-review.md for full findings.
✨ Suggested PR Description
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root Cause
Screenshot tests that involve orientation changes (portrait → landscape) on Android required manual #if ANDROID ... cropLeft: 125 ... #else ... #endif guards in every test. The Android navigation bar moves from the bottom (portrait) to the left side (landscape) of the screen, but the existing VerifyScreenshot() infrastructure always cropped from the bottom regardless of orientation. On iOS, the status bar disappears in landscape, meaning portrait-based top-crop values were incorrectly applied.
Description of Change
Refactored UITest.cs (VerifyScreenshot and VerifyScreenshotOrSetException) to automatically detect device orientation via App.GetOrientation() and apply the correct crop:
- Android portrait: crop 125px from bottom (navigation bar)
- Android landscape: crop 125px from left (navigation bar moves to left side)
- iOS portrait: crop top (status bar — unchanged)
- iOS landscape: no top crop (status bar hidden in landscape)
This eliminates the need for #if ANDROID cropLeft: 125 #else ... #endif boilerplate in individual tests.
Parameters removed from VerifyScreenshot and VerifyScreenshotOrSetException:
cropLeft— replaced by automatic orientation-aware logiccropRight— replaced by automatic orientation-aware logic
Test files updated (removed #if ANDROID cropLeft: 125 blocks):
StackLayoutFeatureTests.cs(2 tests)Issue15154.cs,Issue22306.cs,Issue22606.cs,Issue28523.csIssue28986_FlyoutPage.cs,Issue28986_NavigationPage.cs,Issue28986_Shell.cs
Snapshot baselines updated for 10 PNG files (Android + iOS landscape screenshots now captured with corrected crop regions).
Key Technical Details
Orientation detection (Android + iOS only):
var orientation = OpenQA.Selenium.ScreenOrientation.Portrait;
#if ANDROID || IOSUITEST
orientation = App.GetOrientation();
#endifAutomatic crop logic:
if (_testDevice == TestDevice.Android)
{
if (orientation == Portrait) cropFromBottom = 125; // nav bar at bottom
else cropFromLeft = 125; // nav bar at left
}
else if (_testDevice == TestDevice.iOS)
{
cropFromBottom = 40; // home indicator
}Issues Fixed
N/A
Platforms Tested
- Android
- iOS
- Windows (no change)
- Mac (no change)
Code Review: ⚠️ Issues Found
Code Review — PR #31737
🔴 Critical Issues
1. Compile Error: retryTimeout Removed from Signature but Still Used in Body
File: src/Controls/tests/TestCases.Shared.Tests/UITest.cs
Lines: 234–243 (signature), 249, 254, 264 (body references)
The retryTimeout parameter was removed from the VerifyScreenshot method signature (along with cropLeft and cropRight), but the method body still references it in three places:
// Method signature (line 234–243) — retryTimeout is GONE
public void VerifyScreenshot(
string? name = null,
TimeSpan? retryDelay = null,
int cropTop = 0,
int cropBottom = 0,
double tolerance = 0.0
)
{
// Method body — retryTimeout still used → CS0103 compile error
if (retryTimeout.HasValue) // line 249
while (stopwatch.Elapsed < retryTimeout.Value) // line 254
if (stopwatch.Elapsed + retryDelay.Value < retryTimeout.Value) // line 264This causes CS0103: The name 'retryTimeout' does not exist in the current context — the entire test project fails to compile.
Fix: Re-add retryTimeout as an optional parameter:
public void VerifyScreenshot(
string? name = null,
TimeSpan? retryDelay = null,
TimeSpan? retryTimeout = null, // ← restore this
int cropTop = 0,
int cropBottom = 0,
double tolerance = 0.02. 743 Callers Broken by Removal of retryTimeout Named Argument
Files: Throughout src/Controls/tests/TestCases.Shared.Tests/ — 743 call sites
Example: VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2))
Even if the method body compile error is fixed, all 743 callers that use retryTimeout: as a named argument would generate CS1739: The best overload for 'VerifyScreenshot' does not have a parameter named 'retryTimeout'.
This is confirmed by checking:
$ grep -rn "retryTimeout" src/Controls/tests/TestCases.Shared.Tests/ --include="*.cs" | grep -v UITest.cs | wc -l
743
Fix: Keep retryTimeout as a parameter (see issue #1 fix above). If removal is intentional, all 743 callers must also be updated.
🟡 Minor Suggestions
3. Unnecessary Intermediate Variables
File: src/Controls/tests/TestCases.Shared.Tests/UITest.cs
Lines: ~453–460
The intermediate variables cropX, cropY, cropWidth, cropHeight were introduced but they just map 1:1 to cropFromLeft, cropFromTop, etc., adding indirection without clarity benefit. This was also flagged by the automated Copilot reviewer.
Current:
int cropX = cropFromLeft;
int cropY = cropFromTop;
int cropWidth = width - cropFromLeft;
int cropHeight = height - cropFromTop - cropFromBottom;
imageEditor.Crop(cropX, cropY, cropWidth, cropHeight);Suggested:
imageEditor.Crop(
cropFromLeft,
cropFromTop,
width - cropFromLeft,
height - cropFromTop - cropFromBottom
);4. Stale XML Documentation in VerifyScreenshot
File: src/Controls/tests/TestCases.Shared.Tests/UITest.cs
Lines: ~228**
The XML doc example still references retryTimeout: as if it's a valid parameter:
/// VerifyScreenshot("AnimatedElement", retryTimeout: TimeSpan.FromSeconds(2));If retryTimeout is restored to the signature, this is correct. If it's intentionally removed, this doc comment must also be updated.
✅ Looks Good
Orientation-Aware Crop Approach
The core logic change in UITest.cs is clean and correct:
- Detects orientation via
App.GetOrientation()gated on#if ANDROID || IOSUITEST - Android portrait → bottom crop, landscape → left crop (nav bar moves)
- iOS landscape → no top crop (status bar hidden)
- This eliminates per-test
#if ANDROIDguards consistently across 8 test files
Removal of #if ANDROID cropLeft: Blocks
The 8 test files that had #if ANDROID VerifyScreenshot(cropLeft: 125) #else VerifyScreenshot() #endif patterns have been correctly simplified to a single VerifyScreenshot(...) call. This is the main value of the PR and is well-executed.
6a58063 to
0ccda2e
Compare
I have reviewed the AI feedback,
|
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
🚦 Gate - Test Before and After Fix📊 Expand Full Gate —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue15154 Issue15154 |
✅ FAIL — 1637s | ❌ FAIL — 504s |
🖥️ Issue22306 Issue22306 |
✅ FAIL — 0s | ❌ FAIL — 0s |
🖥️ Issue22606 Issue22606 |
✅ FAIL — 0s | ❌ FAIL — 0s |
🖥️ Issue28523 Issue28523 |
✅ FAIL — 0s | ❌ FAIL — 0s |
🖥️ Issue28986_FlyoutPage Issue28986_FlyoutPage |
✅ FAIL — 0s | ❌ FAIL — 0s |
🖥️ Issue28986_NavigationPage Issue28986_NavigationPage |
✅ FAIL — 0s | ❌ FAIL — 0s |
🖥️ Issue28986_Shell Issue28986_Shell |
✅ FAIL — 0s | ❌ FAIL — 0s |
🖥️ StackLayoutFeatureTests StackLayoutFeatureTests |
✅ FAIL — 0s | ❌ FAIL — 0s |
🖥️ UITest UITest |
✅ FAIL — 0s | ❌ FAIL — 0s |
🔴 Without fix — 🖥️ Issue15154: FAIL ✅ · 1637s
(truncated to last 15,000 chars)
[/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
Build FAILED.
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Failure calling service package: Broken pipe (32) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass105_0.<InstallPackage>b__0(Task`1 t) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
0 Warning(s)
1 Error(s)
Time Elapsed 00:16:03.73
* daemon not running; starting now at tcp:5037
* daemon started successfully
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:08:31.79
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 2.05 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 4 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 4.62 sec).
Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 6.83 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 2 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 2 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 642 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 3.99 sec).
5 of 13 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
/home/vsts/work/1/s/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TriggersFeatureTests.cs(41,56): error CS1739: The best overload for 'VerifyScreenshotOrSetException' does not have a parameter named 'cropLeft' [/home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj]
/home/vsts/work/1/s/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34273.cs(27,20): error CS1739: The best overload for 'VerifyScreenshot' does not have a parameter named 'cropLeft' [/home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj]
/home/vsts/work/1/s/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33407.cs(43,20): error CS1739: The best overload for 'VerifyScreenshot' does not have a parameter named 'cropLeft' [/home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj]
🟢 With fix — 🖥️ Issue15154: FAIL ❌ · 504s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:06:37.46
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13683507
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
/home/vsts/work/1/s/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34273.cs(27,20): error CS1739: The best overload for 'VerifyScreenshot' does not have a parameter named 'cropLeft' [/home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj]
/home/vsts/work/1/s/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33407.cs(43,20): error CS1739: The best overload for 'VerifyScreenshot' does not have a parameter named 'cropLeft' [/home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj]
/home/vsts/work/1/s/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/TriggersFeatureTests.cs(41,56): error CS1739: The best overload for 'VerifyScreenshotOrSetException' does not have a parameter named 'cropLeft' [/home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj]
🔴 Without fix — 🖥️ Issue22306: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ Issue22306: FAIL ❌ · 0s
Log file empty
🔴 Without fix — 🖥️ Issue22606: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ Issue22606: FAIL ❌ · 0s
Log file empty
🔴 Without fix — 🖥️ Issue28523: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ Issue28523: FAIL ❌ · 0s
Log file empty
🔴 Without fix — 🖥️ Issue28986_FlyoutPage: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ Issue28986_FlyoutPage: FAIL ❌ · 0s
Log file empty
🔴 Without fix — 🖥️ Issue28986_NavigationPage: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ Issue28986_NavigationPage: FAIL ❌ · 0s
Log file empty
🔴 Without fix — 🖥️ Issue28986_Shell: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ Issue28986_Shell: FAIL ❌ · 0s
Log file empty
🔴 Without fix — 🖥️ StackLayoutFeatureTests: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ StackLayoutFeatureTests: FAIL ❌ · 0s
Log file empty
🔴 Without fix — 🖥️ UITest: FAIL ✅ · 0s
Log file empty
🟢 With fix — 🖥️ UITest: FAIL ❌ · 0s
Log file empty
⚠️ Issues found
- ❌ Issue15154 FAILED with fix (should pass)
- ❌ Issue22306 FAILED with fix (should pass)
- ❌ Issue22606 FAILED with fix (should pass)
- ❌ Issue28523 FAILED with fix (should pass)
- ❌ Issue28986_FlyoutPage FAILED with fix (should pass)
- ❌ Issue28986_NavigationPage FAILED with fix (should pass)
- ❌ Issue28986_Shell FAILED with fix (should pass)
- ❌ StackLayoutFeatureTests FAILED with fix (should pass)
- ❌ UITest FAILED with fix (should pass)
📁 Fix files reverted (1 files)
eng/pipelines/ci-copilot.yml
🤖 AI Summary📊 Expand Full Review —
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31737 | Auto-detect orientation in UITest.cs, remove cropLeft/cropRight params | ❌ FAILED (Gate) | 19 code files + 12 PNGs | 3 callers still use removed cropLeft param |
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31737 | Auto-detect orientation in UITest.cs, remove cropLeft/cropRight | ❌ FAILED (Gate) | 19 files + 12 PNGs | Incomplete: 3 callers still use removed cropLeft param |
| 1 | try-fix (claude-opus-4.6) | Re-add cropLeft/cropRight as deprecated no-op params to UITest.cs |
✅ PASS | 1 file (UITest.cs) | Keeps dead params in API; silent no-op |
| 2 | try-fix (claude-sonnet-4.6) | Update 3 callers to remove cropLeft: 125 (auto-detected now) |
✅ PASS | 3 files (Issue34273, Issue33407, TriggersFeatureTests) | Cleanest, most aligned with PR intent |
| 3 | try-fix (gpt-5.3-codex) | Reintroduce cropLeft/cropRight as additive functional overrides |
✅ PASS | 1 file (UITest.cs) | More complex; keeps explicit override ability |
| 4 | try-fix (gpt-5.4) | Update 3 callers + restore cropFromRight variable in Crop() math |
✅ PASS | 4 files | Caller cleanup + minor regression fix in crop width calc |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | No | "NO NEW IDEAS" — 4 attempts cover the fix space comprehensively |
Exhausted: Yes
Selected Fix: Candidate #2 (Attempt 2) — Update 3 callers to remove cropLeft: 125. This is the most minimal, clean completion of the PR's intent. The PR already auto-detects Android landscape orientation and crops 125px from left; the callers were redundantly specifying the same value. Attempt 4 is a close second but the cropFromRight = 0 addition is cosmetic (always 0 with no way to set it).
📋 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | No linked issue — proactive test infra improvement |
| Gate | ❌ FAILED | Android — compile errors in 3 unupdated callers |
| Try-Fix | ✅ COMPLETE | 4 attempts, all 4 passing; cross-pollination exhausted |
| Report | ✅ COMPLETE |
Summary
PR #31737 adds orientation-aware automatic screenshot cropping to UITest.cs, removing the manual cropLeft/cropRight parameters. The approach is sound — auto-detecting Android landscape orientation and cropping the nav bar (125px from left) eliminates boilerplate #if ANDROID cropLeft: 125 blocks in individual tests.
However, the PR is incomplete: 3 test files that also use cropLeft: 125 were missed and not updated, causing compile errors that break the entire test build.
Root Cause
PR removed cropLeft/cropRight parameters from VerifyScreenshot and VerifyScreenshotOrSetException but did not update:
Tests/Issues/Issue34273.cs(line ~27):VerifyScreenshot(cropLeft:125, retryTimeout: ...)Tests/Issues/Issue33407.cs(line ~43):VerifyScreenshot(cropLeft:125, retryTimeout: ...)Tests/FeatureMatrix/TriggersFeatureTests.cs(line ~41):VerifyScreenshotOrSetException(ref exception, name, cropLeft: 125, ...)
Compile error: CS1739: The best overload for 'VerifyScreenshot' does not have a parameter named 'cropLeft'
Fix Quality
The PR's orientation-detection logic in UITest.cs is correct and the approach is good. The implementation is incomplete. Required changes are minimal and mechanical:
For Issue34273.cs and Issue33407.cs — collapse the #if ANDROID blocks:
// BEFORE (3 callers)
#if ANDROID
VerifyScreenshot(cropLeft:125, retryTimeout: TimeSpan.FromSeconds(2));
#else
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2));
#endif
// AFTER (auto-detection handles the crop)
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2));For TriggersFeatureTests.cs — remove cropLeft: 125 from VerifyScreenshotOrSetExceptionWithCroppingLeft:
// BEFORE
#if ANDROID
VerifyScreenshotOrSetException(ref exception, name, cropLeft: 125, tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2));
#else
VerifyScreenshotOrSetException(ref exception, name, tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2));
#endif
// AFTER
VerifyScreenshotOrSetException(ref exception, name, tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2));Optional improvement (Attempt 4 finding): The PR also removed cropFromRight from the Crop() call width calculation (width - cropFromLeft instead of width - cropFromLeft - cropFromRight). Since cropRight was removed from the parameter list, this is always 0 and functionally equivalent — but restoring the symmetric math keeps the code consistent with the original intent.
Selected Fix
Candidate #2 (Attempt 2) — Update the 3 callers to remove cropLeft: 125 and collapse the redundant #if ANDROID blocks. This is the most aligned completion of the PR's intent: 3 files changed, no UITest.cs API changes needed.
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Refactored UITest.cs (VerifyScreenshot and VerifyScreenshotOrSetException) to automatically detect device orientation via App.GetOrientation() and apply the correct crop:
This eliminates the need for #if ANDROID cropLeft: 125 #else ... #endif boilerplate in individual tests.
Parameters removed from VerifyScreenshot and VerifyScreenshotOrSetException:
cropLeft — replaced by automatic orientation-aware logic
cropRight — replaced by automatic orientation-aware logic
Test files updated (removed #if ANDROID cropLeft: 125 blocks):
StackLayoutFeatureTests.cs (2 tests)
Issue15154.cs, Issue22306.cs, Issue22606.cs, Issue28523.cs
Issue28986_FlyoutPage.cs, Issue28986_NavigationPage.cs, Issue28986_Shell.cs
Key Technical Details
Orientation detection (Android + iOS only):
Automatic crop logic: