test: refs #6695 fix selectOption command
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2025-02-03 10:55:12 +01:00
parent c9679ac835
commit 6f839df311
2 changed files with 5 additions and 5 deletions

View File

@ -24,9 +24,9 @@ describe('ClaimAction', () => {
const rowData = [true]; const rowData = [true];
cy.fillRow(firstRow, rowData); cy.fillRow(firstRow, rowData);
cy.get('[title="Change destination"]').click(); cy.get('[title="Change destination"]').click({ force: true });
cy.selectOption(destinationRow, 'Confeccion'); 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', () => { it('should regularize', () => {

View File

@ -89,7 +89,7 @@ Cypress.Commands.add('getValue', (selector) => {
// Fill Inputs // Fill Inputs
Cypress.Commands.add('selectOption', (selector, option, timeout = 10000) => { Cypress.Commands.add('selectOption', (selector, option, timeout = 10000) => {
cy.waitForElement(selector, timeout); // Esperar a que el selector sea visible 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 // Escribir la opción deseada
let hasUrl; let hasUrl;
@ -102,13 +102,13 @@ Cypress.Commands.add('selectOption', (selector, option, timeout = 10000) => {
if (hasUrl) { if (hasUrl) {
cy.wait('@dataRequest').then(() => { cy.wait('@dataRequest').then(() => {
cy.get('.q-menu').should('be.visible').and('exist'); 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'); cy.get('.q-menu').should('be.visible').and('exist');
}); });
} }
// Finalmente, seleccionar la opción deseada // 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) => { Cypress.Commands.add('countSelectOptions', (selector, option) => {