fix: refs #8581 streamline form filling command by removing unnecessary backspace
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-03-14 12:47:27 +01:00
parent 749b157fcf
commit 7bd6c92aed
1 changed files with 2 additions and 4 deletions

View File

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