Skip to content

[Testing] [macOS] Fix screenshot masking and scaling for Retina (high-DPI) displays#35156

Draft
NafeelaNazhir wants to merge 5 commits intodotnet:mainfrom
NafeelaNazhir:MacOS-snapshot-failure-fix
Draft

[Testing] [macOS] Fix screenshot masking and scaling for Retina (high-DPI) displays#35156
NafeelaNazhir wants to merge 5 commits intodotnet:mainfrom
NafeelaNazhir:MacOS-snapshot-failure-fix

Conversation

@NafeelaNazhir
Copy link
Copy Markdown
Contributor

This pull request updates the macOS UI test pipeline configuration and improves the screenshot masking logic in UI tests to better support high-DPI (Retina) displays. The main changes ensure that screenshots are correctly masked and scaled regardless of display density, and that the pipeline uses the appropriate shared pool for macOS agents.

Screenshot logic improvements:

  • Updated the TakeScreenshot() method in UITest.cs to:
    • Detect the display scale factor by comparing screenshot pixel dimensions to logical screen size, supporting both standard and Retina displays.
    • Scale all mask and crop coordinates to pixel units, ensuring the rounded rectangle mask aligns correctly on high-DPI screens.
    • After masking, normalize the resulting image back to logical dimensions so downstream cropping logic remains consistent regardless of pixel density.

PureWeen and others added 2 commits April 22, 2026 16:10
Update macOS UI test public pool configuration in ci-uitests.yml to align
with the pattern already used by Android and iOS UI tests:

- Public pool: Azure Pipelines/macOS-14 -> AcesShared/ACES_VM_SharedPool_Tahoe

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35156

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35156"

@NafeelaNazhir NafeelaNazhir added community ✨ Community Contribution area-testing Unit tests, device tests labels Apr 27, 2026
@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Apr 27, 2026
@Ahamed-Ali Ahamed-Ali changed the base branch from main to AcesSharedMacOS April 28, 2026 05:33
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@Ahamed-Ali Ahamed-Ali changed the base branch from AcesSharedMacOS to main April 28, 2026 07:15
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants