summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/cypress/integration/ui/navigation.e2e-spec.ts
blob: fee2d2db967adcdc2a638fa19a91efc48fcba894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { NavigationPageHelper } from './navigation.po';

describe('Shared pages', () => {
  const shared = new NavigationPageHelper();

  beforeEach(() => {
    cy.login();
    Cypress.Cookies.preserveOnce('token');
    shared.navigateTo();
  });

  it('should display the vertical menu by default', () => {
    shared.getVerticalMenu().should('not.have.class', 'active');
  });

  it('should hide the vertical menu', () => {
    shared.getMenuToggler().click();
    shared.getVerticalMenu().should('have.class', 'active');
  });

  it('should navigate to the correct page', () => {
    shared.checkNavigations(shared.navigations);
  });
});