[winappcli] Add Command Palette UI test suite (winappCli-driven)#48788
Draft
LegendaryBlair wants to merge 2 commits into
Draft
[winappcli] Add Command Palette UI test suite (winappCli-driven)#48788LegendaryBlair wants to merge 2 commits into
LegendaryBlair wants to merge 2 commits into
Conversation
Adds a PowerShell-only UI test suite that drives the PowerToys Command Palette (CmdPal) module via Microsoft's winappCli UI-Automation client and translates the manual release-checklist boxes into runnable assertions. Contents (focused on CmdPal as a worked example): - WinAppCli.PowerToys: shared helper module (test harness, PT settings, shared events, UIA actions, asserts, lifecycle). - modules/_shared/Assertions.ps1: uniform Assert-* vocabulary. - modules/command-palette-checklist.ps1: CmdPal orchestrator entry point with -Only/-Skip/-Tag filtering. - modules/cmdpal/: 24 per-provider test files + CmdPal-specific helpers. - Supporting docs: README, AAA-PATTERN-CONVENTION, 0.99 coverage-gaps. The suite runs against an installed PowerToys (winget/AppX); it does not build the product. Verified locally against CmdPal 0.11 with winappCli 0.3.1: CmdPal_Installed_* and all 6 CmdPal_Calculator_* functional tests pass (0 failures). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reachability analysis (direct + transitive call graph) from the CmdPal orchestrator, test files and helpers showed 4 function files in WinAppCli.PowerToys are never reached by the suite: - 05-PtSettingsJson.ps1 (CmdPal mutation tests use their own cmdpal/helpers/cmdpal-settings.ps1 backup/restore, not the generic Tier-B Backup-/Restore-/Set-PtSettingJson) - 11-MouseInput.ps1 (no mouse simulation in CmdPal tests) - 13-Asserts.ps1 (Assert-Eventually* — CmdPal uses Wait-Until + the _shared Assert-* vocabulary instead) - 14-Lifecycle.ps1 (Use-ClipboardSnapshot / New-FreshAppX unused; CmdPal uses Use-CmdPalClipboardSnapshot) Removed the files and their entries from FunctionsToExport. Module still imports cleanly (63 functions); CmdPal_Installed_* + all CmdPal_Calculator_* tests still pass (7 PASS / 0 FAIL). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a PowerShell-only UI test suite that drives the PowerToys Command Palette (CmdPal) module via Microsoft's winappCli UI-Automation client, translating the manual release-checklist boxes into runnable assertions.
This PR is intentionally focused on Command Palette as a worked example of the winappcli approach, so it can serve as a template for porting other modules.
What's included
WinAppCli.PowerToys/— shared helper module (test harness, PT settings read/write, shared-event signalling, UIA actions, asserts, lifecycle).modules/_shared/Assertions.ps1— uniformAssert-*vocabulary.modules/command-palette-checklist.ps1— CmdPal orchestrator / entry point with-Only/-Skip/-Tagfiltering.modules/cmdpal/— 24 per-provider test files (Calculator, Files, WebSearch, System, Shell, Registry, Dock/Pin, Settings-UI, stability, mutation, …) plus CmdPal-specific helpers.README.md,AAA-PATTERN-CONVENTION.md,command-palette-099-coverage-gaps.md.How it runs
The suite runs against an installed PowerToys (winget / AppX) and does not build the product. Prerequisites: winappCli ≥ 0.3.1, PowerShell 7.2+, PowerToys with CmdPal enabled.
Validation
Verified locally against CmdPal 0.11.11561.0 with winappCli 0.3.1:
CmdPal_Installed_*→ PASS 1 · FAIL 0CmdPal_Calculator_*(functional, drives the live UI end-to-end: typing, invoking, clipboard + on-disk history assertions) → PASS 6 · FAIL 0