Skip to content

Cover the app-selection panel helpers - #86

Merged
BiosSystem merged 1 commit into
masterfrom
feature/gui-app-selection-tests
Sep 29, 2026
Merged

BiosSystem merged 1 commit into
masterfrom
feature/gui-app-selection-tests

Conversation

@BiosSystem

Copy link
Copy Markdown
Owner

The helpers that drive the app list take live WPF controls (checkboxes, combo boxes, panels, text blocks) but not a fully built window, so they are STA-runspace-buildable. Nothing exercised them outside the Sandbox smoke run.

Test-GuiAppSelection.ps1 builds the controls in a per-scenario STA runspace (the pattern the schema and control-state tests already use) and drives each function:

  • Update-AppRemovalScopeDescription - all three scope copies
  • Update-AppSelectionStatus - the selected count, scope-section show/hide, and the rule that keeps the scope combo disabled while target-user is selected
  • Update-AppsPanelRebuildSearchIndex - keeps only highlighted checkboxes, maps the active match to its index, skips non-checkbox children
  • Update-SortArrows - active column full opacity, others dimmed
  • Update-AppsPanelSort - ascending and descending reorder
  • Invoke-AppPreset - additive (matches checked, others untouched) vs exclusive (non-matches unchecked)

Invoke-AppPreset delegates to Update-AppPresetStates, which reaches the main window through FindName; the scenario overrides it with a stub so only the check/uncheck logic runs. The window-bound helpers (Update-AppPresetStates, the scroll helpers) stay in the Sandbox run.

Test-only. New file wired into CI. Validation run locally: static validation clean (141 files), full unit suite 325 passed / 0 failed (was 312). Not run locally: the Sandbox suite (unchanged) and CI's pwsh/MTA pass, which runs on the PR.

The helpers that drive the app list (scope description, selection status,
search index rebuild, sort arrows, sort, and the preset check/uncheck)
take live checkboxes, combo boxes, panels and text blocks but not a fully
built window. Nothing exercised them outside the Sandbox smoke run.

Test-GuiAppSelection.ps1 builds the controls in a per-scenario STA
runspace (the pattern the schema and control-state tests already use) and
drives each function: the three scope-description branches, the selection
count plus scope-section show/hide and the target-user disable rule, the
search index that keeps only highlighted boxes, the active-column arrow
opacity, ascending and descending sort order, and additive vs exclusive
preset selection.

Invoke-AppPreset calls Update-AppPresetStates, which reaches the main
window through FindName; the scenario overrides it with a stub so only the
check/uncheck logic runs. The window-bound helpers stay in the Sandbox
run.
@BiosSystem
BiosSystem merged commit abd6782 into master Sep 29, 2026
1 check passed
@BiosSystem
BiosSystem deleted the feature/gui-app-selection-tests branch September 29, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant