#8581 invoiceIn e2e #1452

Merged
jorgep merged 153 commits from 8581-invoiceinE2e into dev 2025-03-20 08:58:01 +00:00
1 changed files with 9 additions and 2 deletions
Showing only changes of commit c729c6a241 - Show all commits

View File

@ -173,7 +173,9 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
const field = obj[key];
if (!field) return;
if (typeof field == 'string')
return cy.wrap(el).type(`{selectall}${field}`, { delay: 0 });
return cy
.wrap(el)
.type(`{selectall}{backspace}${field}`, { delay: 0 });
const { type, val } = field;
switch (type) {
@ -181,7 +183,9 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
cy.selectOption(el, val);
break;
case 'date':
cy.get(el).type(`{selectall}${val.split('-').join('')}`);
cy.get(el).type(
`{selectall}{backspace}${val.split('-').join('')}`,
);
break;
case 'time':
cy.get(el).click();
@ -189,6 +193,9 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
cy.get('.q-time .q-time__clock').contains(val.m).click();
cy.get('.q-time .q-time__link').contains(val.x).click();
break;
default:
cy.wrap(el).type(`{selectall}{backspace}${val}`, { delay: 0 });
break;
}
});
});