Skip to content

Conversation

sissbruecker
Copy link
Contributor

Description

Adds several improvements to the menu bar TestBench elements to align them with how the context menu elements work:

  • Adds MenuBarSubMenuElement to represent an opened submenu, with the same API as ContextMenuElement
  • Adds MenuBarButtonElement.openSubMenu() to open the menu for a button and return it. Throws if no menu was opened for this button.
  • Adds MenuBarItemElement.openSubMenu() to open the menu for a menu item and return it. Throws if no menu was opened for this item.

Also deprecates a number of APIs:

  • MenuBarButtonElement.getSubMenuItems() - items can be retrieved through the submenu returned from openSubMenu() or getSubMenu()
  • MenuBarItemElement.getSubMenuItems() - items can be retrieved through the submenu returned from openSubMenu() or getSubMenu()
  • MenuBarElement.getSubMenuItems() - open a submenu for a button instead and get the items from that
  • MenuBarElement.getSubMenuItems(TestBenchElement subMenu) - open a submenu for a button or item instead and get the items from that
  • MenuBarElement.getSubMenu() - open a submenu for a button instead
  • MenuBarElement.getSubMenus() - open submenus through buttons or items instead and use the references returned from those

Related to #7801, #7520

Type of change

  • Feature

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
10.8% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube Cloud

@web-padawan web-padawan merged commit 067491a into main Aug 12, 2025
4 of 5 checks passed
@web-padawan web-padawan deleted the feat/menu-bar-element-improvements branch August 12, 2025 07:43
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.

2 participants