Skip to content

Implement Close All command, enhance dark mode contrast, and add searchable filter#19

Merged
Malcolmnixon merged 3 commits into
mainfrom
feature/appium-inspection-screenshots
Jul 23, 2026
Merged

Implement Close All command, enhance dark mode contrast, and add searchable filter#19
Malcolmnixon merged 3 commits into
mainfrom
feature/appium-inspection-screenshots

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request introduces several improvements and new features across the documentation, build/test automation, and the application codebase. The most important changes add a new "Close All" command to the workspace, improve test reliability and diagnostics (especially for Appium integration tests on Windows), and enhance documentation to clarify new behaviors and troubleshooting steps.

Workspace "Close All" functionality:

  • Added a new CloseAllSourcesAsync method to MainWindowShell, allowing users to close all workspace sources at once and return to a clean, empty state. This is now backed by the File menu's "Close All" command and is fully documented in both user and design docs. [1] [2] [3] [4]
  • Added the corresponding ClearSources method to WorkspaceSourceSet, which removes all registered sources in one operation, supporting the new "Close All" workflow.
  • Updated requirements and verification documents to reflect and test the new "Close All" behavior, including new test cases and requirement IDs. [1] [2] [3] [4]

Test automation and diagnostics improvements:

  • Added environment variables (SYSML2WORKBENCH_ARTIFACTS_DIR, SYSML2WORKBENCH_STARTUP_FILE) to the build and test scripts to better control test artifacts and preloaded workspace state for integration tests. [1] [2]
  • Implemented a Windows-only preflight check in run-under-appium.ps1 to detect when the interactive session is locked (e.g., at the Winlogon/LockApp desktop), which would otherwise cause all UI automation tests to fail with cryptic errors. The script now fails fast with an actionable message if the session is locked.
  • Enhanced troubleshooting documentation for Appium integration tests, explaining the locked session issue and the new preflight check.

Test coverage and documentation:

  • Expanded Appium test coverage to include the new "Close All" menu item and improved the structure and cleanup of integration tests, especially those that mutate shared workspace state. [1] [2] [3]
  • Added new words to .cspell.yaml to support new terminology and avoid false positives in spell checking.

Minor codebase improvements:

  • Minor codebase and style improvements, including theme override support for testing in App.axaml.cs. [1] [2]

These changes collectively improve the user experience, test reliability, and developer clarity around workspace management and integration testing.

Malcolm Nixon and others added 3 commits July 23, 2026 14:56
…-filter flyout

- Add a real File > Close All menu command (MainWindowShell.CloseAllSourcesAsync /
  WorkspaceSourceSet.ClearSources) so the integration-test session can reset app state
  between tests without restarting the process.
- Fix ElementFilterView chip legibility in dark mode: the chip Border's background stays
  a fixed light gray regardless of theme, but its TextBlock/remove Button inherited the
  ambient (light, in dark theme) foreground. Both now use an explicit dark foreground.
- Add a search box to the "+" add-type-filter flyout (ElementFilterViewModel
  .AddableTypeFilterSearchText/AddableTypeFilterCandidates/BeginAddableTypeFilterSearch/
  TryCommitAddableTypeFilterSearch) so users can type-ahead and press Enter to add a
  chip, matching the existing PickerSearchTextBox pattern. This also sidesteps a real
  NovaWindows/Avalonia flyout light-dismiss race where a pointer click on a ListBoxItem
  inside an open Flyout could be swallowed by the dismiss overlay.
- Move ElementFilterView's "ElementFilterRoot" AutomationId from the inner StackPanel to
  the UserControl root: a plain StackPanel's automation peer is not exposed as a UIA
  control element, so NovaWindows silently skipped it and reparented its children under
  the nearest control ancestor, making the id unreachable via FindElement.
- Remove the AppFixture window Move/Resize "normalization" hack (confirmed upstream
  NovaWindows bug: Selenium's Position/Size setters each send half the SetWindowRect
  fields, which arrive as undefined and defeat the driver's !== null guards); shrink
  MainWindowView's default size instead so it fits under the taskbar without needing
  runtime resize.
- Add SYSML2WORKBENCH_STARTUP_FILE-driven inspection screenshot coverage of a populated
  query dialog with an active filter chip, and InspectionScreenshot.CaptureElement for
  cropped element screenshots.
- Add a preflight to run-under-appium.ps1 that fast-fails when no real interactive
  desktop is available (background/CI-sandbox execution), since Appium/UI Automation
  cannot bring a window to the foreground there.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…hip-wait to avoid false positive, protect finally cleanup, add ElementFilter search-flyout requirements/verification traceability

- InspectionScreenshot.CaptureElement: use File.Create instead of File.OpenWrite so a
  re-run that produces a smaller PNG doesn't leave a prior run's trailing bytes appended,
  corrupting the file (found by formal-review-ots-appium).
- MainWindowShellIntegrationTests: scope the chip-render WaitUntil poll to
  elementFilterRoot's own subtree instead of the whole session, so it can no longer be
  satisfied by the still-typed search TextBox or a lingering flyout ListBoxItem sharing
  the same accessible Name as the real chip - both are hosted in a detached Avalonia
  Popup outside ElementFilterRoot's subtree, so this also confirms the chip actually
  rendered rather than producing another silent false positive (found by
  formal-review-ots-appium).
- MainWindowShellIntegrationTests: wrap the test's finally-block CloseAllSources() call
  in its own try/catch, matching TryCloseAnyOpenDialogWithEscape's existing pattern - a
  secondary cleanup failure while another exception is already propagating would
  otherwise silently replace the real test failure per CLR finally-block semantics
  (found by change-review follow-up).
- Add ElementFilter reqstream requirement and verification scenarios for the add-filter
  flyout search/commit workflow (BeginAddableTypeFilterSearch,
  AddableTypeFilterSearchText, TryCommitAddableTypeFilterSearch), closing a
  traceability gap flagged by formal-review-elementpickersubsystem.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ation-tests

The build-docs job's needs list was [build, codeql], omitting
appium-windows-integration-tests. Since that job runs independently/in
parallel (not gated by build-docs), its trx artifact upload could still be
in flight when build-docs' 'Download all job artifacts' step ran, silently
dropping the only evidence for the Appium-DriveDesktopApplicationEndToEnd
and Appium-LocateControlsByAutomationId requirements and failing
'dotnet reqstream --enforce' with 'Only 113 of 115 requirements are
satisfied with tests' - confirmed via the actual failing run's job log
('Found 9 artifact(s)' / 'Total of 5 artifact(s) downloaded', missing
artifacts-appium-windows-integration-tests even though it existed for that
run). Adding the missing dependency makes build-docs wait for that job's
artifact upload to complete before downloading, like it already does for
build and codeql.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Malcolmnixon
Malcolmnixon merged commit 738d782 into main Jul 23, 2026
7 checks passed
@Malcolmnixon
Malcolmnixon deleted the feature/appium-inspection-screenshots branch July 23, 2026 20:06
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