From 44b3b66ff388b3a710a7bbe20b029492826b1e8c Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Tue, 25 Aug 2020 09:27:02 +0200 Subject: [PATCH] Add static test id to the menu items --- src/components/AppLayout/MenuList.tsx | 4 ++-- src/components/AppLayout/menuStructure.ts | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/components/AppLayout/MenuList.tsx b/src/components/AppLayout/MenuList.tsx index 1ab5589a0..fe01803eb 100644 --- a/src/components/AppLayout/MenuList.tsx +++ b/src/components/AppLayout/MenuList.tsx @@ -258,7 +258,8 @@ const MenuList: React.FC = props => { [classes.menuListItemActive]: isAnyChildActive })} key={menuItem.label} - data-testid={menuItem.label.toLowerCase()} + data-testid={menuItem.testingContextId} + data-test="menuItemEntry" >
= props => { menuItem.ariaLabel === activeSubMenu.label && activeSubMenu.isActive })} - data-test={menuItem.label} onClick={() => handleSubMenu(menuItem.ariaLabel)} >