refactor: refs #8581 remove unused checkNumber command from Cypress support
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-03-17 12:18:30 +01:00
parent 260d3dd133
commit 1c4421aaa2
1 changed files with 0 additions and 15 deletions

View File

@ -505,21 +505,6 @@ Cypress.Commands.add('validateVnTableRows', (opts = {}) => {
});
});
Cypress.Commands.add('checkNumber', (text, expectedVal, operation) => {
const num = parseFloat(text.trim().replace(/[^\d.-]/g, '')); // Remove the currency symbol
switch (operation) {
case 'equal':
expect(num).to.equal(expectedVal);
break;
case 'greater':
expect(num).to.be.greaterThan(expectedVal);
break;
case 'less':
expect(num).to.be.lessThan(expectedVal);
break;
}
});
Cypress.Commands.add('checkDate', (rawDate, expectedVal, operation) => {
const date = moment(rawDate.trim(), 'MM/DD/YYYY');
const compareDate = moment(expectedVal, 'DD/MM/YYYY');