feat: refs #8602 add custom Cypress commands for improved element interaction and request handling
This commit is contained in:
parent
92621f7ccc
commit
d52f60666a
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue