Looks like the newly added relative position for the sidebar is
causing cypress to verify that the sidebar is hidden from the user view.
Fixes: https://tracker.ceph.com/issues/53960
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit
6b2be10dbba639cea4d40c39fb63900b7bc0ccd0)
});
it('should display the vertical menu by default', () => {
- shared.getVerticalMenu().should('be.visible');
+ shared.getVerticalMenu().should('not.have.class', 'active');
});
it('should hide the vertical menu', () => {
shared.getMenuToggler().click();
- shared.getVerticalMenu().should('not.be.visible');
+ shared.getVerticalMenu().should('have.class', 'active');
});
it('should navigate to the correct page', () => {
];
getVerticalMenu() {
- return cy.get('ul.cd-navbar-primary');
+ return cy.get('nav[id=sidebar]');
}
getMenuToggler() {
- return cy.get('cd-navigation > div.cd-navbar-top button.btn.btn-link');
+ return cy.get('[aria-label="toggle sidebar visibility"]');
}
checkNavigations(navs: any) {
<div class="cd-navbar-top">
<nav class="navbar navbar-expand-md navbar-dark cd-navbar-brand">
<button class="btn btn-link py-0"
- (click)="showMenuSidebar = !showMenuSidebar">
+ (click)="showMenuSidebar = !showMenuSidebar"
+ aria-label="toggle sidebar visibility">
<i class="fa fa-bars fa-2x"
aria-hidden="true"></i>
</button>