Skip to content

Commit

Permalink
deleted console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
TetianaParanich committed Apr 18, 2024
1 parent 6ceb0c8 commit 9f97b00
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ export default {
});
})
.then(() => {
console.log('cells', cells);
const result = ArrayUtils.checkIsSortedAlphabetically({ array: cells });
console.log(result);
cy.expect(ArrayUtils.checkIsSortedAlphabetically({ array: cells })).to.equal(true);
});
},
Expand Down
5 changes: 0 additions & 5 deletions cypress/support/utils/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,15 @@ export default {
checkIsSortedAlphabetically({ array = [], accuracy = 1 } = {}) {
cy.wait(5000);
const result = array.reduce((acc, it) => {
console.log('acc.length', acc.length);
if (acc.length) {
const prev = acc[acc.length - 1].value;
console.log('prev', prev);

const current = it.toLowerCase();
console.log('current', current);

return [...acc, { value: current, order: prev.localeCompare(current) }];
} else {
return [{ value: it.toLowerCase(), order: 0 }];
}
}, []);
console.log('result', result);
const invalidOrder = result.filter(({ order }) => order > 0);
return (invalidOrder.length * 100) / array.length < accuracy;
},
Expand Down

0 comments on commit 9f97b00

Please sign in to comment.