From 433ba1724db235f0ae19dcd43a14f915840b8dbc Mon Sep 17 00:00:00 2001 From: Cristian Davide Conte <64142998+CristianDavideConte@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:39:40 +0100 Subject: [PATCH] removed useless code in tests --- cypress/e2e/calcScrollbarsDimensions-tests.cy.js | 2 -- cypress/e2e/calcXScrollbarDimension-tests.cy.js | 2 -- cypress/e2e/calcYScrollbarDimension-tests.cy.js | 2 -- 3 files changed, 6 deletions(-) diff --git a/cypress/e2e/calcScrollbarsDimensions-tests.cy.js b/cypress/e2e/calcScrollbarsDimensions-tests.cy.js index bac6fa8..7fd1559 100644 --- a/cypress/e2e/calcScrollbarsDimensions-tests.cy.js +++ b/cypress/e2e/calcScrollbarsDimensions-tests.cy.js @@ -66,8 +66,6 @@ describe("calcScrollbarsDimensions", function () { const _elementWithScrollbarOnTheYAxisOriginalScrollPos = _getCurrentScrollPos(_elementWithScrollbarOnTheYAxis); const _elementWithScrollbarOnTheXYAxesOriginalScrollPos = _getCurrentScrollPos(_elementWithScrollbarOnTheXYAxes); - uss.setPageScroller(_pageScroller); - //Test the scrollbars' dimensions of document.head's elements. expect(constants.arraysAreEqual(uss.calcScrollbarsDimensions(_head), [0, 0])).to.be.true; Array.from(_head.children).forEach(el => expect(constants.arraysAreEqual(uss.calcScrollbarsDimensions(el), [0, 0])).to.be.true); diff --git a/cypress/e2e/calcXScrollbarDimension-tests.cy.js b/cypress/e2e/calcXScrollbarDimension-tests.cy.js index ec1769e..c3264dc 100644 --- a/cypress/e2e/calcXScrollbarDimension-tests.cy.js +++ b/cypress/e2e/calcXScrollbarDimension-tests.cy.js @@ -55,8 +55,6 @@ describe("calcXScrollbarDimension", function () { const _elementWithScrollbarOnTheYAxisOriginalScrollPos = _getCurrentScrollPos(_elementWithScrollbarOnTheYAxis); const _elementWithScrollbarOnTheXYAxesOriginalScrollPos = _getCurrentScrollPos(_elementWithScrollbarOnTheXYAxes); - uss.setPageScroller(_pageScroller); - //Test the x-scrollbar's dimension of document.head's elements. expect(uss.calcXScrollbarDimension(_head)).to.equal(0); Array.from(_head.children).forEach(el => expect(uss.calcXScrollbarDimension(el)).to.equal(0)); diff --git a/cypress/e2e/calcYScrollbarDimension-tests.cy.js b/cypress/e2e/calcYScrollbarDimension-tests.cy.js index 1073a4d..1cd8cbe 100644 --- a/cypress/e2e/calcYScrollbarDimension-tests.cy.js +++ b/cypress/e2e/calcYScrollbarDimension-tests.cy.js @@ -55,8 +55,6 @@ describe("calcYScrollbarDimension", function () { const _elementWithScrollbarOnTheYAxisOriginalScrollPos = _getCurrentScrollPos(_elementWithScrollbarOnTheYAxis); const _elementWithScrollbarOnTheXYAxesOriginalScrollPos = _getCurrentScrollPos(_elementWithScrollbarOnTheXYAxes); - uss.setPageScroller(_pageScroller); - //Test the y-scrollbar's dimension of document.head's elements. expect(uss.calcYScrollbarDimension(_head)).to.equal(0); Array.from(_head.children).forEach(el => expect(uss.calcYScrollbarDimension(el)).to.equal(0));