From 7bd6c92aedda11fd17bd5425ebefad4d56cb4b8e Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 14 Mar 2025 12:47:27 +0100 Subject: [PATCH] fix: refs #8581 streamline form filling command by removing unnecessary backspace --- test/cypress/support/commands.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index bacfa2627..6572a5afa 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -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();