Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/sidebar.spec.js
/** | /** | ||||
* Copyright (C) 2019 The Software Heritage developers | * Copyright (C) 2019 The Software Heritage developers | ||||
* See the AUTHORS file at the top-level directory of this distribution | * See the AUTHORS file at the top-level directory of this distribution | ||||
* License: GNU Affero General Public License version 3, or any later version | * License: GNU Affero General Public License version 3, or any later version | ||||
* See top-level LICENSE file for more information | * See top-level LICENSE file for more information | ||||
*/ | */ | ||||
const url = '/'; | const url = '/'; | ||||
describe('Sidebar tests On Large Screen', function() { | describe('Sidebar tests On Large Screen', function() { | ||||
beforeEach(function() { | beforeEach(function() { | ||||
cy.visit(url); | cy.visit(url, { | ||||
onBeforeLoad: (win) => { | |||||
win.localStorage.clear(); | |||||
} | |||||
}); | |||||
}); | }); | ||||
it('should toggle sidebar when swh-push-menu is clicked', function() { | it('should toggle sidebar when swh-push-menu is clicked', function() { | ||||
cy.get('.swh-push-menu') | cy.get('.swh-push-menu') | ||||
.click() | .click() | ||||
.then(() => { | .then(() => { | ||||
cy.get('body') | cy.get('body') | ||||
.should('have.class', 'sidebar-collapse') | .should('have.class', 'sidebar-collapse') | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |