Plugins: Added e2e flow for triggering panel menu UI extensions (#64855)

Added e2e flow for clicking a panel menu extension item.
This commit is contained in:
Marcus Andersson
2023-03-16 09:57:53 +01:00
committed by GitHub
parent 1c6357637d
commit 8617ad688d
2 changed files with 30 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import { e2e } from '../index';
export enum PanelMenuItems {
Edit = 'Edit',
Inspect = 'Inspect',
More = 'More...',
}
export const openPanelMenuItem = (menu: PanelMenuItems, panelTitle = 'Panel Title') => {
@@ -10,3 +11,15 @@ export const openPanelMenuItem = (menu: PanelMenuItems, panelTitle = 'Panel Titl
e2e.components.Panels.Panel.headerItems(menu).should('be.visible').click();
};
export const openPanelMenuExtension = (extensionTitle: string, panelTitle = 'Panel Title') => {
e2e.components.Panels.Panel.title(panelTitle).should('be.visible').click();
e2e.components.Panels.Panel.headerItems(PanelMenuItems.More)
.should('be.visible')
.parent()
.parent()
.invoke('addClass', 'open');
e2e.components.Panels.Panel.headerItems(extensionTitle).should('be.visible').click();
};