From 4f694512a2aaba497ac4f13ff6dde8d53ebf2bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Aslo-=C3=98stergaard?= Date: Fri, 6 Nov 2026 16:48:25 +0100 Subject: [PATCH 1/2] test(ui): make the FlaUI suite pass again, without the mouse or keyboard All ten UI tests were failing. Not a product bug: the tests had drifted from the app, and nothing runs them in CI. - Dialogs are owned by the main window, so UI Automation lists them under it, not at the top level. FindDialog searches both. - Border / StackPanel / Grid have no automation peer, so the AutomationIds on SidebarSessionList and TerminalGrid were never visible. Views/UiaElements adds peer-carrying subclasses; sidebar rows, dormant rows, terminal panes, the pane close button and the empty-state text get ids. - Buttons are pressed through the Invoke pattern instead of mouse clicks, and sessions are closed with the pane's close button instead of a synthesized Ctrl+W: keystrokes fail with "Access is denied" on a locked desktop. - EmptyState was matched by an exact name its two-line text never had. 10/10 pass, run on a locked screen. Unit tests 765/765. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NsYm9iLc2aRnRDfV2uZRQX --- src/CodeShellManager/MainWindow.xaml | 9 +- src/CodeShellManager/MainWindow.xaml.cs | 11 +- src/CodeShellManager/Views/UiaElements.cs | 37 ++++ .../Helpers/AppActions.cs | 161 ++++++++++-------- tests/CodeShellManager.UITests/LayoutTests.cs | 5 +- .../CodeShellManager.UITests/ProfilesTests.cs | 24 +-- .../CodeShellManager.UITests/SessionTests.cs | 22 +-- .../CodeShellManager.UITests/SettingsTests.cs | 31 +--- 8 files changed, 160 insertions(+), 140 deletions(-) create mode 100644 src/CodeShellManager/Views/UiaElements.cs diff --git a/src/CodeShellManager/MainWindow.xaml b/src/CodeShellManager/MainWindow.xaml index c517e0e..0fd7e04 100644 --- a/src/CodeShellManager/MainWindow.xaml +++ b/src/CodeShellManager/MainWindow.xaml @@ -1,6 +1,7 @@ - + - - + - +