From b6252588564afd8dd98050cf13446c0b7d09883c Mon Sep 17 00:00:00 2001 From: jtubau Date: Tue, 15 Apr 2025 16:05:03 +0200 Subject: [PATCH] fix: refs #8413 ensure date input submits correctly in tests --- test/cypress/integration/entry/entryWasteRecalc.spec.js | 2 +- test/cypress/support/commands.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cypress/integration/entry/entryWasteRecalc.spec.js b/test/cypress/integration/entry/entryWasteRecalc.spec.js index 1b358676c..b8fcbdb4c 100644 --- a/test/cypress/integration/entry/entryWasteRecalc.spec.js +++ b/test/cypress/integration/entry/entryWasteRecalc.spec.js @@ -11,7 +11,7 @@ describe('EntryDms', () => { cy.dataCy('recalc').should('be.disabled'); cy.dataCy('dateFrom').should('be.visible').click().type('01-01-2001'); - cy.dataCy('dateTo').should('be.visible').click().type('01-01-2001'); + cy.dataCy('dateTo').should('be.visible').click().type('01-01-2001{enter}'); cy.dataCy('recalc').should('be.enabled').click(); cy.get('.q-notification__message').should( diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 41f91e855..c92bfad85 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -189,8 +189,8 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => { break; case 'date': cy.get(el).type( - `{selectall}{backspace}${val.split('-').join('')}`, - ); + `{selectall}{backspace}${val}`, + ).blur(); break; case 'time': cy.get(el).click();