Skip to content

Implement View-menu toggle behavior with Appium tests#20

Merged
Malcolmnixon merged 1 commit into
mainfrom
feature/appium-view-menu-toggle-tests
Jul 23, 2026
Merged

Implement View-menu toggle behavior with Appium tests#20
Malcolmnixon merged 1 commit into
mainfrom
feature/appium-view-menu-toggle-tests

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request enhances the View menu panel toggling functionality in the SysML2Workbench desktop application, making the Workspace, Predefined Views, and Diagnostics panels behave as true checkbox-style toggles. It also adds comprehensive integration tests to verify this behavior, improves accessibility for automation testing, and updates documentation to reflect these changes.

Feature and Behavior Improvements

  • Updated the ShowOrFocusPanel method in MainWindowView.axaml.cs to implement true open/close toggle behavior for panels, so clicking a View menu item closes an open panel or reopens a closed one, matching the menu item's checked state.
  • Modified the View menu items (WorkspacePanelMenuItem, PredefinedViewsMenuItem, DiagnosticsMenuItem) in MainWindowView.axaml to use ToggleType="CheckBox", clarifying their toggle semantics in the UI.

Accessibility and Automation

  • Added AutomationProperties.AutomationId="DiagnosticsListBox" to the Diagnostics panel's ListBox in DiagnosticsToolView.axaml to enable reliable automation-based lookup.

Testing

  • Added three new integration tests (DesktopApp_ViewMenu_WorkspacePanelMenuItem_TogglesWorkspacePanel, DesktopApp_ViewMenu_PredefinedViewsMenuItem_TogglesPredefinedViewsPanel, DesktopApp_ViewMenu_DiagnosticsMenuItem_TogglesDiagnosticsPanel) and a shared helper method to ensure each View menu item truly toggles its respective panel open/closed, verifying panel presence via automation IDs.
  • Registered the new tests in the Appium test manifest (appium.yaml).

Documentation

  • Updated the verification documentation to describe the new panel toggle tests and the rationale for verifying panel state via content presence rather than menu item checked state, due to Avalonia's current automation limitations.

- MainWindowView.axaml.cs: ShowOrFocusPanel now toggles open/closed based
  on Tool.IsOpen (checkbox semantics: checked/open closes on click,
  unchecked/closed opens+focuses on click).
- MainWindowView.axaml: added ToggleType="CheckBox" to the three
  View-menu items so the checkmark glyph renders alongside their icons.
- DiagnosticsToolView.axaml: added AutomationId to the diagnostics
  ListBox for Appium discoverability.
- Added 3 Appium integration tests driving a full close/reopen round
  trip per panel, verified via panel-content presence/absence rather
  than UIA checked-state (Avalonia's Win32 automation bridge does not
  expose the Toggle pattern for MenuItem).
- Synced reqstream traceability and verification docs with the final
  test names and toggle-behavior description.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Malcolmnixon
Malcolmnixon merged commit a22c972 into main Jul 23, 2026
7 checks passed
@Malcolmnixon
Malcolmnixon deleted the feature/appium-view-menu-toggle-tests branch July 23, 2026 23:31
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