forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpagemanagedsidebarclosed.spec.ts
More file actions
19 lines (18 loc) · 947 Bytes
/
pagemanagedsidebarclosed.spec.ts
File metadata and controls
19 lines (18 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
describe('Page Managed Sidebar Closed Demo Test', () => {
it('Navigate to page section', () => {
cy.visit('http://localhost:3000/page-managed-sidebar-closed-demo-nav-link');
});
it('Test Page elements', () => {
cy.get('#page-managed-sidebar-closed-demo').within(() => {
cy.get('#uncontrolled-nav-toggle').then((hamburgerIcon: JQuery<HTMLDivElement>) => {
cy.get('.pf-v6-c-page__sidebar.pf-m-collapsed').should('exist');
cy.get('.pf-v6-c-page__sidebar.pf-m-expanded').should('not.exist');
cy.wrap(hamburgerIcon).click();
cy.get('.pf-v6-c-page__sidebar.pf-m-collapsed').should('not.exist');
cy.get('.pf-v6-c-page__sidebar.pf-m-expanded').should('exist');
});
cy.get('div[class="pf-v6-c-masthead__brand"]').invoke('text').should('eq', "Logo that's a div");
cy.get('.pf-v6-c-masthead__content').invoke('text').should('contain', 'header-tools | Avatar');
});
});
});