Skip to content

Commit

Permalink
tests bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CristianDavideConte committed Jan 14, 2024
1 parent 3729c1b commit b5be676
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/calcBordersDimensions-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/calcScrollbarsDimensions-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/calcXScrollbarDimension-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/calcYScrollbarDimension-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/stopScrolling-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 6 additions & 3 deletions cypress/e2e/stopScrollingAll-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/stopScrollingX-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/stopScrollingY-tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b5be676

Please sign in to comment.