From 1ba8a4cf7b1511f3ced8aeb1433f9494d35ed005 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 22 Aug 2018 13:22:58 +0300 Subject: [PATCH] chore: remove class active from group items + fix e2e tests --- e2e/integration/menu.e2e.ts | 7 ++++--- src/components/SideMenu/MenuItem.tsx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/e2e/integration/menu.e2e.ts b/e2e/integration/menu.e2e.ts index 28602821..5111de10 100644 --- a/e2e/integration/menu.e2e.ts +++ b/e2e/integration/menu.e2e.ts @@ -12,13 +12,14 @@ describe('Menu', () => { it('should sync active menu items while scroll', () => { cy.contains('h1', 'Introduction') .scrollIntoView() - .get('[role=menuitem].active:not(.-depth0)') + .get('[role=menuitem].active') .should('have.text', 'Introduction'); cy.contains('h2', 'Add a new pet to the store') .scrollIntoView() - .get('[role=menuitem].active:not(.-depth0)') - .should('have.length', 2) + .wait(100) + .get('[role=menuitem].active') + .children() .last() .should('have.text', 'Add a new pet to the store') .should('be.visible'); diff --git a/src/components/SideMenu/MenuItem.tsx b/src/components/SideMenu/MenuItem.tsx index a1532a5b..69282b0b 100644 --- a/src/components/SideMenu/MenuItem.tsx +++ b/src/components/SideMenu/MenuItem.tsx @@ -52,7 +52,7 @@ export class MenuItem extends React.Component { {item.type === 'operation' ? ( ) : ( - + {item.name} {this.props.children}