From 6f839df3114ddf67e06489b8ab20fbc6ae34518c Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Feb 2025 10:55:12 +0100 Subject: [PATCH] test: refs #6695 fix selectOption command --- test/cypress/integration/claim/claimAction.spec.js | 4 ++-- test/cypress/support/commands.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js index 685e120ce..e98be85fc 100644 --- a/test/cypress/integration/claim/claimAction.spec.js +++ b/test/cypress/integration/claim/claimAction.spec.js @@ -24,9 +24,9 @@ describe('ClaimAction', () => { const rowData = [true]; cy.fillRow(firstRow, rowData); - cy.get('[title="Change destination"]').click(); + cy.get('[title="Change destination"]').click({ force: true }); cy.selectOption(destinationRow, 'Confeccion'); - cy.get('.q-card > .q-card__actions > .q-btn--standard').click(); + cy.get('.q-card > .q-card__actions > .q-btn--standard').click({ force: true }); }); it('should regularize', () => { diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index aab1c80c7..01f706aff 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -89,7 +89,7 @@ Cypress.Commands.add('getValue', (selector) => { // Fill Inputs Cypress.Commands.add('selectOption', (selector, option, timeout = 10000) => { cy.waitForElement(selector, timeout); // Esperar a que el selector sea visible - cy.get(selector).click().invoke('data', 'url').as('dataUrl'); + cy.get(selector).click({ force: true }).invoke('data', 'url').as('dataUrl'); // Escribir la opción deseada let hasUrl; @@ -102,13 +102,13 @@ Cypress.Commands.add('selectOption', (selector, option, timeout = 10000) => { if (hasUrl) { cy.wait('@dataRequest').then(() => { cy.get('.q-menu').should('be.visible').and('exist'); - cy.get('.q-menu').should('not.be.visible'); + cy.get('.q-menu').should('not.be.visible'); cy.get('.q-menu').should('be.visible').and('exist'); }); } // Finalmente, seleccionar la opción deseada - cy.get('.q-menu:visible').find('.q-item').contains(option).click(); + cy.get('.q-menu:visible').find('.q-item').contains(option).click({ force: true }); }); Cypress.Commands.add('countSelectOptions', (selector, option) => {