From: Nizamudeen A Date: Thu, 20 Jan 2022 16:52:50 +0000 (+0530) Subject: mgr/dashboard: navigation page e2e fix X-Git-Tag: v18.0.0~1490^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F44693%2Fhead;p=ceph.git mgr/dashboard: navigation page e2e fix 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 --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.e2e-spec.ts index 71bfa4b9f24..fee2d2db967 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.e2e-spec.ts @@ -10,12 +10,12 @@ describe('Shared pages', () => { }); 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', () => { diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.po.ts index f81e8aa7be1..a3673284cdf 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.po.ts @@ -44,11 +44,11 @@ export class NavigationPageHelper extends PageHelper { ]; 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) { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html index 0e2325dd602..bdb35a610d9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html @@ -6,7 +6,8 @@