Skip to content

Run the regression suites out of sight and wait for the colour popup - #59

Merged
leafOfTree merged 1 commit into
masterfrom
settings-editors-popup-wait
Oct 10, 2026
Merged

leafOfTree merged 1 commit into
masterfrom
settings-editors-popup-wait

Conversation

@leafOfTree

@leafOfTree leafOfTree commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Why

  • Test runs flashed popups in the screen corners and could take focus. The suites place their windows off-screen, but WinForms keeps dropdowns and tooltips on a screen, so they land at the top-left of the leftmost monitor (popups and shadows from Architecture, PopupRendering, SettingsEditors, SettingsTheme) or near (32,32) on the primary one (TabInteraction tips and menus, TaskbarPreview).
  • SettingsEditors occasionally failed with a NullReferenceException in visiblePopup(): one DoEvents after clicking the colour swatch was not always enough for the popup to show.

What

  • tests/Run-Tests.ps1 creates a hidden desktop per run and starts every suite on it (child processes such as PrintWindowHelper inherit it). -VisibleDesktop keeps the old behaviour for watching a run.
  • visiblePopup in tests/SettingsEditors.fsx pumps messages for up to 2 s and fails with "Colour popup did not open" if none appears.
  • AGENTS.md and docs/testing.md describe the hidden desktop.

Verification

  • All 13 suites pass through the new runner; a WinEvent monitor on the user's desktop saw no window from any suite (before the change it logged popups from 8 suites).
  • Run-Tests.ps1 -Suites SettingsEditors -Repeat 5 passes 5/5.
  • -VisibleDesktop still runs (WindowIcon).
  • Not run locally: -Coverage; CI covers it.

WinForms keeps dropdowns and tooltips on a screen even when a suite places
their owner off-screen, so test runs flashed popups in the screen corners
and could take focus. Run-Tests.ps1 now starts every suite on a hidden
desktop of its own; -VisibleDesktop runs them on the current one.

SettingsEditors pumped messages only once after clicking the colour swatch
and occasionally found no popup yet, failing with a NullReferenceException.
It now waits up to two seconds and reports "Colour popup did not open".
@leafOfTree
leafOfTree merged commit 854c5e2 into master Oct 10, 2026
2 checks passed
@leafOfTree
leafOfTree deleted the settings-editors-popup-wait branch October 10, 2026 12:27
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