test: refs #6695 fix selectOption command
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2025-02-03 10:42:39 +01:00
parent 97b93b5e38
commit c9679ac835
1 changed files with 3 additions and 3 deletions

View File

@ -95,15 +95,15 @@ Cypress.Commands.add('selectOption', (selector, option, timeout = 10000) => {
let hasUrl;
cy.get('@dataUrl').then((url) => {
hasUrl = url;
cy.intercept('GET', url).as('dataRequest'); // Ajusta el método y la URL según sea necesario
cy.intercept('GET', url).as('dataRequest');
});
cy.get(selector).clear().type(option);
if (hasUrl) {
cy.wait('@dataRequest').then(() => {
cy.get('.q-menu').should('be.visible').and('exist');
cy.get('.q-menu').should('not.be.visible'); // Esperar que el menú desaparezca
cy.get('.q-menu').should('be.visible').and('exist'); // Esperar que reaparezca
cy.get('.q-menu').should('not.be.visible');
cy.get('.q-menu').should('be.visible').and('exist');
});
}