feat: refs #8602 add custom Cypress commands for improved element interaction and request handling

This commit is contained in:
Pablo Natek 2025-03-11 08:50:54 +01:00
parent 92621f7ccc
commit d52f60666a
1 changed files with 15 additions and 0 deletions

View File

@ -402,3 +402,18 @@ Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
Cypress.Commands.add('clickButtonWithText', (buttonText) => {
cy.get('.q-btn').contains(buttonText).click();
});
Cypress.Commands.add('getOption', (index = 1) => {
cy.waitForElement('[role="listbox"]');
cy.get(`[role="listbox"] .q-item:nth-child(${index})`).click();
});
Cypress.Commands.add('searchBtnFilterPanel', () => {
cy.get(
'.q-scrollarea__content > .q-btn--standard > .q-btn__content > .q-icon',
).click();
});
Cypress.Commands.add('waitRequest', (alias, cb) => {
cy.wait(alias).then(cb);
});