SubMenu: Fix expanding sub menu items on touch devices (#93208)

* click more in mobile phone

* use stopPropagation stop event

* delete log

* delete inspect click and add stopPropagation

* bug fix

* fix unit tests

* fix e2e tests

* fix old-arch tests

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
jackyin
2024-10-07 15:22:18 +01:00
committed by GitHub
co-authored by Ashley Harrison
parent 1a3365d99b
commit 63bdbb67fc
8 changed files with 21 additions and 29 deletions
+4 -2
View File
@@ -34,8 +34,10 @@ describe('Inspect drawer tests', () => {
e2e.flows.openDashboard({ uid: 'wfTJJL5Wz' });
// testing opening inspect drawer directly by clicking on Inspect in header menu
e2e.flows.openPanelMenuItem(e2e.flows.PanelMenuItems.Inspect, PANEL_UNDER_TEST);
e2e.components.Panels.Panel.title(PANEL_UNDER_TEST).scrollIntoView().should('be.visible');
e2e.components.Panels.Panel.menu(PANEL_UNDER_TEST).click({ force: true }); // force click because menu is hidden and show on hover
e2e.components.Panels.Panel.menuItems('Inspect').trigger('mouseover', { force: true });
e2e.components.Panels.Panel.menuItems('Data').click({ force: true });
expectDrawerTabsAndContent();