refactor: refs #8581 remove unused checkNumber command from Cypress support
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
260d3dd133
commit
1c4421aaa2
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue