From b5be6766e56d5bca2f82cdf08001b17c9c734abd Mon Sep 17 00:00:00 2001 From: Cristian Davide Conte <64142998+CristianDavideConte@users.noreply.github.com> Date: Sun, 14 Jan 2024 19:05:42 +0100 Subject: [PATCH] tests bugfixes --- cypress/e2e/calcBordersDimensions-tests.cy.js | 4 ++-- cypress/e2e/calcScrollbarsDimensions-tests.cy.js | 4 ++-- cypress/e2e/calcXScrollbarDimension-tests.cy.js | 4 ++-- cypress/e2e/calcYScrollbarDimension-tests.cy.js | 4 ++-- cypress/e2e/stopScrolling-tests.cy.js | 3 ++- cypress/e2e/stopScrollingAll-tests.cy.js | 9 ++++++--- cypress/e2e/stopScrollingX-tests.cy.js | 6 ++++-- cypress/e2e/stopScrollingY-tests.cy.js | 6 ++++-- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/cypress/e2e/calcBordersDimensions-tests.cy.js b/cypress/e2e/calcBordersDimensions-tests.cy.js index 5ac28ca..cd9a50f 100644 --- a/cypress/e2e/calcBordersDimensions-tests.cy.js +++ b/cypress/e2e/calcBordersDimensions-tests.cy.js @@ -12,8 +12,8 @@ describe("calcBordersDimensions", function () { .then((win) => { const _maxDim = 10; //See css styles of calcBordersDimensions-tests.html - uss._containersData.clear(); - expect(uss._containersData.size).to.equal(0); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); //Test the window's borders. const _windowBordersDimensions = uss.calcBordersDimensions(win, true); diff --git a/cypress/e2e/calcScrollbarsDimensions-tests.cy.js b/cypress/e2e/calcScrollbarsDimensions-tests.cy.js index baf8d93..e311149 100644 --- a/cypress/e2e/calcScrollbarsDimensions-tests.cy.js +++ b/cypress/e2e/calcScrollbarsDimensions-tests.cy.js @@ -16,8 +16,8 @@ describe("calcScrollbarsDimensions", function () { it("Tests the calcScrollbarsDimensions method", function () { cy.window() .then((win) => { - uss._containersData.clear(); - expect(uss._containersData.size).to.equal(0); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); //Test the window's scrollbars. const _windowScrollbarsDimensions = uss.calcScrollbarsDimensions(win, true); diff --git a/cypress/e2e/calcXScrollbarDimension-tests.cy.js b/cypress/e2e/calcXScrollbarDimension-tests.cy.js index 2c30428..c7629d2 100644 --- a/cypress/e2e/calcXScrollbarDimension-tests.cy.js +++ b/cypress/e2e/calcXScrollbarDimension-tests.cy.js @@ -16,8 +16,8 @@ describe("calcXScrollbarDimension", function () { it("Tests the calcXScrollbarDimension method", function () { cy.window() .then((win) => { - uss._containersData.clear(); - expect(uss._containersData.size).to.equal(0); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); //Test the window's x-scrollbar. const _windowXScrollbarDimension = uss.calcXScrollbarDimension(win, true); diff --git a/cypress/e2e/calcYScrollbarDimension-tests.cy.js b/cypress/e2e/calcYScrollbarDimension-tests.cy.js index 5cb2810..f5b550b 100644 --- a/cypress/e2e/calcYScrollbarDimension-tests.cy.js +++ b/cypress/e2e/calcYScrollbarDimension-tests.cy.js @@ -16,8 +16,8 @@ describe("calcYScrollbarDimension", function () { it("Tests the calcYScrollbarDimension method", function () { cy.window() .then((win) => { - uss._containersData.clear(); - expect(uss._containersData.size).to.equal(0); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); //Test the window's y-scrollbar. const _windowYScrollbarDimension = uss.calcYScrollbarDimension(win, true); diff --git a/cypress/e2e/stopScrolling-tests.cy.js b/cypress/e2e/stopScrolling-tests.cy.js index dde2323..f5c6c6e 100644 --- a/cypress/e2e/stopScrolling-tests.cy.js +++ b/cypress/e2e/stopScrolling-tests.cy.js @@ -146,7 +146,8 @@ describe("stopScrolling-containersData-integrity", function () { expect(uss.isScrolling()).to.be.false; }) .then(() => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); const _testCallback = () => { }; const _testCalculatorFixed = () => 10; diff --git a/cypress/e2e/stopScrollingAll-tests.cy.js b/cypress/e2e/stopScrollingAll-tests.cy.js index 4de7d8e..a327380 100644 --- a/cypress/e2e/stopScrollingAll-tests.cy.js +++ b/cypress/e2e/stopScrollingAll-tests.cy.js @@ -10,7 +10,8 @@ describe("stopScrollingAll", function () { it("Tests the stopScrollingAll method", function () { cy.window() .then((win) => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); cy.testFailingValues(uss.stopScrollingAll, { 0: [constants.failingValuesAll] @@ -79,7 +80,8 @@ describe("stopScrollingAll-immediatelyStopped", function () { it("Initialize a series of scroll-animations on both the x-axis and the y-axis of all scrollable containers and immediately stop them", function () { cy.window() .then((win) => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); cy.testFailingValues(uss.stopScrollingAll, { 0: [constants.failingValuesAll] @@ -146,7 +148,8 @@ describe("stopScrollingAll-containersData-integrity", function () { expect(uss.isScrolling()).to.be.false; }) .then(() => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0) const _elements = [ win, diff --git a/cypress/e2e/stopScrollingX-tests.cy.js b/cypress/e2e/stopScrollingX-tests.cy.js index 881b8a8..58278f4 100644 --- a/cypress/e2e/stopScrollingX-tests.cy.js +++ b/cypress/e2e/stopScrollingX-tests.cy.js @@ -132,7 +132,8 @@ describe("stopScrollingX-containersData-integrity", function () { expect(uss.isXScrolling()).to.be.false; }) .then(() => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); const _testCallback = () => { }; const _testCalculatorFixed = () => 10; @@ -227,7 +228,8 @@ describe("stopScrollingX-containersData-integrity-with-scroll-on-y-axis", functi expect(uss.isXScrolling()).to.be.false; }) .then(() => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); const _testCallback = () => { }; const _testCalculatorFixed = () => 10; diff --git a/cypress/e2e/stopScrollingY-tests.cy.js b/cypress/e2e/stopScrollingY-tests.cy.js index 52527d1..9fd595b 100644 --- a/cypress/e2e/stopScrollingY-tests.cy.js +++ b/cypress/e2e/stopScrollingY-tests.cy.js @@ -132,7 +132,8 @@ describe("stopScrollingY-containersData-integrity", function () { expect(uss.isYScrolling()).to.be.false; }) .then(() => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); const _testCallback = () => { }; const _testCalculatorFixed = () => 10; @@ -227,7 +228,8 @@ describe("stopScrollingY-containersData-integrity-with-scroll-on-x-axis", functi expect(uss.isXScrolling()).to.be.false; }) .then(() => { - uss._containersData.clear(); + //uss._containersData.clear(); //TODO: The observers should be detached + //expect(uss._containersData.size).to.equal(0); const _testCallback = () => { }; const _testCalculatorFixed = () => 10;