2026-02-06 16:12:44 -08:00
|
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
2025-02-24 02:05:55 -08:00
|
|
|
<!-- Look at Directory.Build.props in root for common stuff as well -->
|
2026-02-06 16:12:44 -08:00
|
|
|
<Import Project="$(RepoRoot)src\Common.Dotnet.CsWinRT.props" />
|
2025-02-20 13:25:20 +08:00
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<OutputType>Library</OutputType>
|
|
|
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
|
|
|
<Nullable>enable</Nullable>
|
|
|
|
|
<PublishAot>true</PublishAot>
|
|
|
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
2025-11-06 03:32:28 -08:00
|
|
|
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
|
2025-06-17 17:56:48 +08:00
|
|
|
<UseWindowsForms>true</UseWindowsForms>
|
|
|
|
|
<PublishTrimmed>false</PublishTrimmed>
|
2025-02-20 13:25:20 +08:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<PackageReference Include="Appium.WebDriver" />
|
2026-02-14 08:47:56 +01:00
|
|
|
<!-- Test libraries/utilities should not use the metapackage. -->
|
|
|
|
|
<PackageReference Include="MSTest.TestFramework" />
|
2025-02-20 13:25:20 +08:00
|
|
|
<PackageReference Include="System.IO.Abstractions" />
|
2025-04-14 17:01:54 +00:00
|
|
|
<PackageReference Include="System.Text.RegularExpressions" />
|
[UI Tests] Replace pixel-by-pixel image comparison with perceptual hash (pHash) for improved visual similarity detection (#40653)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
This PR replaces the previous pixel-by-pixel image comparison logic with
a perceptual hash (pHash)-based comparison using the
CoenM.ImageSharp.ImageHash library.
**Removes the need for golden images from CI pipelines**
Since the comparison is perceptual rather than binary, we no longer need
to fetch pixel-perfect golden images from pipelines for validation.
Developers can now capture screenshots locally and still get meaningful,
robust comparisons.
### Why pHash?
Unlike direct pixel comparison (which fails on minor rendering
differences), pHash focuses on the overall structure and visual
perception of the image. This provides several benefits:
- Robust to minor differences: tolerates compression artifacts,
anti-aliasing, subtle rendering changes, and border padding.
- Resilient to resolution or format changes: works even if images are
scaled or compressed differently.
- Closer to human perception: more accurately reflects whether two
images "look" the same to a person.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [ ] **Closes:** #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2025-07-18 10:32:09 +08:00
|
|
|
<PackageReference Include="CoenM.ImageSharp.ImageHash" />
|
2025-02-20 13:25:20 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
2025-11-06 03:32:28 -08:00
|
|
|
<ItemGroup>
|
|
|
|
|
<ProjectReference Include="..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
2025-02-20 13:25:20 +08:00
|
|
|
</Project>
|