feat: refs #8581 add custom Cypress commands for selecting descriptor options and validating checkboxes
This commit is contained in:
parent
43e0134d41
commit
3993e37f39
|
@ -494,3 +494,13 @@ Cypress.Commands.add('checkDate', (rawDate, expectedVal, operation) => {
|
|||
expect(date.isAfter(compareDate)).to.be.true;
|
||||
}
|
||||
});
|
||||
|
||||
Cypress.Commands.add('selectDescriptorOption', (opt = 1) => {
|
||||
cy.get(
|
||||
`[data-cy="descriptor-more-opts_list"] > :not(template):nth-of-type(${opt})`,
|
||||
).click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('validateCheckbox', (selector, expectedVal = 'true') => {
|
||||
cy.get(selector).should('have.attr', 'aria-checked', expectedVal.toString());
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue