mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-15 02:32:20 +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', () => {
|
it('should sync active menu items while scroll', () => {
|
||||||
cy.contains('h1', 'Introduction')
|
cy.contains('h1', 'Introduction')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.get('[role=menuitem].active:not(.-depth0)')
|
.get('[role=menuitem].active')
|
||||||
.should('have.text', 'Introduction');
|
.should('have.text', 'Introduction');
|
||||||
|
|
||||||
cy.contains('h2', 'Add a new pet to the store')
|
cy.contains('h2', 'Add a new pet to the store')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.get('[role=menuitem].active:not(.-depth0)')
|
.wait(100)
|
||||||
.should('have.length', 2)
|
.get('[role=menuitem].active')
|
||||||
|
.children()
|
||||||
.last()
|
.last()
|
||||||
.should('have.text', 'Add a new pet to the store')
|
.should('have.text', 'Add a new pet to the store')
|
||||||
.should('be.visible');
|
.should('be.visible');
|
||||||
|
|
|
@ -52,7 +52,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
|
||||||
{item.type === 'operation' ? (
|
{item.type === 'operation' ? (
|
||||||
<OperationMenuItemContent {...this.props} item={item as OperationModel} />
|
<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}>
|
<MenuItemTitle title={item.name}>
|
||||||
{item.name}
|
{item.name}
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user