diff --git a/cypress/integration/back-to-top.spec.js b/cypress/integration/back-to-top.spec.js --- a/cypress/integration/back-to-top.spec.js +++ b/cypress/integration/back-to-top.spec.js @@ -5,22 +5,22 @@ * See top-level LICENSE file for more information */ -const url = 'api/' +const url = 'api/'; describe('Back-to-top button tests', function() { - beforeEach(function () { + beforeEach(function() { cy.visit(url); - }) + }); it('should be hidden when on top', function() { cy.get('#back-to-top').should('not.be.visible'); - }) + }); it('should be visible when scrolled down', function() { cy.scrollTo('bottom') .get('#back-to-top') .should('be.visible'); - }) + }); it('should scroll to top when clicked', function() { cy.scrollTo('bottom') @@ -29,6 +29,6 @@ .window() .then((window) => { assert.equal(window.scrollY, 0); - }) - }) -}) + }); + }); +}); diff --git a/cypress/integration/home.spec.js b/cypress/integration/home.spec.js --- a/cypress/integration/home.spec.js +++ b/cypress/integration/home.spec.js @@ -14,11 +14,11 @@ cy.visit(url); cy.get('.swh-counter') .then((counters) => { - for(let counter of counters) { + for (let counter of counters) { let innerText = $(counter).text(); const value = parseInt(innerText.replace(/,/g, '')); assert.isAbove(value, 0); } }); - }) -}) + }); +}); diff --git a/cypress/integration/sidebar.spec.js b/cypress/integration/sidebar.spec.js --- a/cypress/integration/sidebar.spec.js +++ b/cypress/integration/sidebar.spec.js @@ -5,12 +5,12 @@ * See top-level LICENSE file for more information */ -const url = '/' +const url = '/'; describe('Sidebar tests On Large Screen', function() { - beforeEach(function () { + beforeEach(function() { cy.visit(url); - }) + }); it('should toggle sidebar when swh-push-menu is clicked', function() { cy.get('.swh-push-menu') @@ -28,8 +28,8 @@ .should('have.class', 'sidebar-open') .get('.nav-link > p') .should('not.have.css', 'opacity', '0'); - }) - }) + }); + }); it('should have less width when collapsed compared to open', function() { let collapsedWidth, expandedWidth; @@ -51,20 +51,20 @@ }) .then(() => { assert.isBelow(collapsedWidth, expandedWidth); - }) - }) -}) + }); + }); +}); describe('Sidebar Tests on small screens', function() { - beforeEach(function () { + beforeEach(function() { cy.viewport('iphone-6'); cy.visit(url); - }) + }); it('should be collapsed by default', function() { cy.get('.swh-sidebar') .should('not.be.visible'); - }) + }); it('should toggle sidebar when swh-push-menu is clicked', function() { cy.get('.swh-push-menu') @@ -77,5 +77,5 @@ .wait(250) .get('.swh-sidebar') .should('not.be.visible'); - }) -}) + }); +});