From 9a2c7c8012b586803437c4ed3e3654c56556ee19 Mon Sep 17 00:00:00 2001 From: jtubau Date: Tue, 25 Mar 2025 14:02:13 +0100 Subject: [PATCH] fix: refs #8717 streamline field filling logic in tests --- .../integration/route/routeExtendedList.spec.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test/cypress/integration/route/routeExtendedList.spec.js b/test/cypress/integration/route/routeExtendedList.spec.js index a183c08cb..fce4753f1 100644 --- a/test/cypress/integration/route/routeExtendedList.spec.js +++ b/test/cypress/integration/route/routeExtendedList.spec.js @@ -53,17 +53,20 @@ describe('Route extended list', () => { function fillField(selector, type, value) { switch (type) { case 'select': - cy.get(selector).should('be.visible').click(); - cy.dataCy('null_select').clear().type(value); + cy.get(selector).should('be.visible').click().clear().type(value); cy.get('.q-item').contains(value).click(); break; case 'input': - cy.get(selector).should('be.visible').click(); - cy.dataCy('null_input').clear().type(`${value}`); + cy.get(selector) + .should('be.visible') + .click() + .type(`{selectall}{backspace}${value}`); break; case 'date': - cy.get(selector).should('be.visible').click(); - cy.dataCy('null_inputDate').clear().type(`${value}`); + cy.get(selector) + .should('be.visible') + .click() + .type(`{selectall}{backspace}${value}`); break; case 'checkbox': cy.get(selector).should('be.visible').click().click(); @@ -177,7 +180,7 @@ describe('Route extended list', () => { const [month, day, year] = value.split('/'); value = `${day}/${month}/${year}`; } - cy.validateContent(selector, value); + cy.get(selector).should('contain', value); }); });