mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-09-01 19:51:34 +02:00
## Summary of the Pull Request Adds a greenfield `AlwaysOnTop.UITests` project using `Microsoft.PowerToys.UITest.Next` and winappcli. Seven end-to-end scenarios automate all nine Always On Top sign-off checks from #40669, including topmost state, border rendering and live customization, virtual desktops, window state changes, sound gating, exclusions, and Game Mode. Closes #40669 ## PR Checklist - [x] Closes: #40669 - [x] **Communication:** Implements the test plan tracked in #40669 - [x] **Tests:** Added and all pass - [x] **Localization:** N/A - test-only change with no end-user-facing strings - [x] **Dev docs:** Updated `doc/devdocs/modules/alwaysontop.md` with the automated suite and runtime prerequisites - [x] **New binaries:** N/A - no shipping binaries added; the test project is registered in `PowerToys.slnx` and discovered by the UI-test pipeline - [x] **Documentation updated:** N/A - no public documentation changes ## Detailed Description of the Pull Request / Additional comments - Adds `src/modules/alwaysontop/Tests/AlwaysOnTop.UITests/AlwaysOnTop.UITests.csproj` with PerMonitorV2 DPI awareness and x64/ARM64 solution mappings. - Uses deterministic module settings and a native WinForms fixture to assert `WS_EX_TOPMOST`, `AlwaysOnTop_Pinned`, and `AlwaysOnTop_Border` behavior. - Verifies custom border color and thickness through composed screen pixels and border geometry. - Uses `IVirtualDesktopManager` to confirm desktop transitions before checking border visibility or cleaning up the created desktop. - Uses Direct3D 9 full-screen exclusive mode to exercise the Game Mode block. - Uses an NTFS oplock on the configured WAV path to verify that sound playback is attempted only when enabled, without requiring an audio endpoint. - Unpins fixtures before destroying their windows so the product border timer cannot retain a stale target. ## Validation Steps Performed - Built `AlwaysOnTop.UITests` in Release for x64 and ARM64. - Ran the complete 7/7 suite in persistent local VMs on Windows 10 and Windows 11 under both default and constrained (1 vCPU / 4 GB) profiles. - Ran Azure DevOps UI Test Automation build [156249158](https://dev.azure.com/microsoft/c93e867a-8815-43c1-92c4-e7dd5404f1e1/_build/results?buildId=156249158) against current head `3eae3f81ac`: all five ARM64/x64 full-build stages succeeded and all 21/21 test executions passed across ARM64, Windows 10, and Windows 11. - Completed [PowerToys CI build 387751](https://dev.azure.com/shine-oss/62769a65-d989-45e3-803c-9ad21fcf2ea2/_build/results?buildId=387751): x64 and ARM64 Release builds and the Windows 10, Windows 11, and ARM64 UI-test jobs all passed.  --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PowerToys Modules
This section contains documentation for individual PowerToys modules, including their architecture, implementation details, and debugging tools.
Available Modules
| Module | Description |
|---|---|
| Advanced Paste | Tool for enhanced clipboard pasting with formatting options |
| Always on Top | Tool for pinning windows to stay on top of other windows |
| Awake | Tool to keep your computer awake without modifying power settings |
| Color Picker | Tool for selecting and managing colors from the screen |
| Command Not Found | Tool suggesting package installations for missing commands |
| Crop and Lock | Tool for cropping application windows into smaller windows or thumbnails |
| Environment Variables | Tool for managing user and system environment variables |
| FancyZones (debugging tools) | Window manager utility for custom window layouts |
| File Explorer add-ons | Extensions for enhancing Windows File Explorer functionality |
| File Locksmith | Tool for finding processes that lock files |
| Hosts File Editor | Tool for managing the system hosts file |
| Image Resizer | Tool for quickly resizing images within File Explorer |
| Keyboard Manager | Tool for remapping keys and keyboard shortcuts |
| Mouse Utilities | Collection of tools to enhance mouse and cursor functionality |
| Mouse Without Borders | Tool for controlling multiple computers with a single mouse and keyboard |
| NewPlus | Context menu extension for creating new files in File Explorer |
| Peek | File preview utility for quick file content viewing |
| Power Rename | Bulk file renaming tool with search and replace functionality |
| PowerToys Run (deprecation soon) | Quick application launcher and search utility |
| Quick Accent | Tool for quickly inserting accented characters and special symbols |
| Registry Preview | Tool for visualizing and editing Registry files |
| Screen Ruler | Tool for measuring pixel distances and color boundaries on screen |
| Shortcut Guide | Tool for displaying Windows keyboard shortcuts when holding the Windows key |
| Text Extractor | Tool for extracting text from images and screenshots |
| Workspaces | Tool for saving and restoring window layouts for different projects |
| ZoomIt | Screen zoom and annotation tool |
Adding New Module Documentation
When adding documentation for a new module:
- Create a dedicated markdown file for the module (e.g.,
modulename.md) - If the module has specialized debugging tools, consider creating a separate tools document (e.g.,
modulename-tools.md) - Update this index with links to the new documentation
- Follow the existing documentation structure for consistency