mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 00:26:34 +03:00
chore: remove class active from group items + fix e2e tests
This commit is contained in:
parent
c8b7eed7f0
commit
1ba8a4cf7b
|
@ -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');
|
||||
|
|
|
@ -52,7 +52,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
|
|||
{item.type === 'operation' ? (
|
||||
<OperationMenuItemContent {...this.props} item={item as OperationModel} />
|
||||
) : (
|
||||
<MenuItemLabel depth={item.depth} active={item.active || item.expanded} type={item.type}>
|
||||
<MenuItemLabel depth={item.depth} active={item.active} type={item.type}>
|
||||
<MenuItemTitle title={item.name}>
|
||||
{item.name}
|
||||
{this.props.children}
|
||||
|
|
Loading…
Reference in New Issue
Block a user