fix: refs #8581 ensure actions descriptor is opened only when necessary in selectDescriptorOption command
This commit is contained in:
parent
6271dea2c7
commit
24cd4caa96
|
@ -501,8 +501,11 @@ Cypress.Commands.add('checkDate', (rawDate, expectedVal, operation) => {
|
|||
});
|
||||
|
||||
Cypress.Commands.add('selectDescriptorOption', (opt = 1) => {
|
||||
cy.openActionsDescriptor();
|
||||
const listItem = '[data-cy="descriptor-more-opts_list"]';
|
||||
cy.get('body').then(($body) => {
|
||||
if (!$body.find(listItem).length) cy.openActionsDescriptor();
|
||||
});
|
||||
|
||||
cy.waitForElement(listItem);
|
||||
cy.get(`${listItem} > :not(template):nth-of-type(${opt})`).click();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue