feat: refs #8581 add validation command for card descriptor
This commit is contained in:
parent
6d12fc2c1a
commit
9b0365aac4
|
@ -418,6 +418,7 @@ Cypress.Commands.add('clickButtonWith', (type, value) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
|
Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
|
||||||
cy.get(`.q-icon.${iconClass}`).parent().click();
|
cy.get(`.q-icon.${iconClass}`).parent().click();
|
||||||
});
|
});
|
||||||
|
@ -425,3 +426,14 @@ Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
|
||||||
Cypress.Commands.add('clickButtonWithText', (buttonText) => {
|
Cypress.Commands.add('clickButtonWithText', (buttonText) => {
|
||||||
cy.get('.q-btn').contains(buttonText).click();
|
cy.get('.q-btn').contains(buttonText).click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('validateDescriptor', (toCheck = {}) => {
|
||||||
|
const { title, listbox } = toCheck;
|
||||||
|
|
||||||
|
if (title) cy.dataCy('cardDescriptor_title').contains(title);
|
||||||
|
|
||||||
|
for (const index in listbox)
|
||||||
|
cy.get('[data-cy="cardDescriptor_listbox"] > *')
|
||||||
|
.eq(index)
|
||||||
|
.should('contain.text', listbox[index]);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue