Skip to content

Commit

Permalink
tests bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
CristianDavideConte committed Jan 14, 2024
1 parent cecdd92 commit 3729c1b
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions cypress/support/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const getChildrenRecursively = (element) => {
return _children.concat(_newChildren);
}

const unsupportedElement = () => {};
Object.setPrototypeOf(unsupportedElement, Element.prototype);

//TODO: find a way to import the common.js keys instead of creating them from scratch
export const constants = {
K_IDX:0, //Key to get the scroll id on the x-axis
Expand Down Expand Up @@ -77,18 +74,18 @@ export const constants = {

defaultUssException: "USS fatal error (execution stopped)",
defaultTimeout: 1000,
failingValuesAll: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, null, undefined],
failingValuesAllNoUndefined: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, null],
failingValuesAll: [Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, null, undefined],
failingValuesAllNoUndefined: [Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, null],
failingValuesAllNoUnsupportedNoUndefined: [Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, null],
failingValuesNoString: [unsupportedElement, Infinity, -Infinity, true, false, NaN, 10, -10, 0, null, undefined],
failingValuesNoStringNoUndefined: [unsupportedElement, Infinity, -Infinity, true, false, NaN, 10, -10, 0, null],
failingValuesNoNull: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, undefined],
failingValuesNoUndefined: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, null],
failingValuesNoNullOrUndefined: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0],
failingValuesNoFiniteNumber: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", null, undefined],
failingValuesNoPositiveNumber: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", -10, 0, null, undefined],
failingValuesNoPositiveNumberOrUndefined: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", -10, 0, null],
failingValuesNoPositiveNumberOrZero: [unsupportedElement, Infinity, -Infinity, true, false, NaN, "fail", "", -10, null, undefined],
failingValuesNoString: [Infinity, -Infinity, true, false, NaN, 10, -10, 0, null, undefined],
failingValuesNoStringNoUndefined: [Infinity, -Infinity, true, false, NaN, 10, -10, 0, null],
failingValuesNoNull: [Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, undefined],
failingValuesNoUndefined: [Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0, null],
failingValuesNoNullOrUndefined: [Infinity, -Infinity, true, false, NaN, "fail", "", 10, -10, 0],
failingValuesNoFiniteNumber: [Infinity, -Infinity, true, false, NaN, "fail", "", null, undefined],
failingValuesNoPositiveNumber: [Infinity, -Infinity, true, false, NaN, "fail", "", -10, 0, null, undefined],
failingValuesNoPositiveNumberOrUndefined: [Infinity, -Infinity, true, false, NaN, "fail", "", -10, 0, null],
failingValuesNoPositiveNumberOrZero: [Infinity, -Infinity, true, false, NaN, "fail", "", -10, null, undefined],
arraysAreEqual: arraysAreEqual,
getChildrenRecursively: getChildrenRecursively,
}

0 comments on commit 3729c1b

Please sign in to comment.