This commit is contained in:
parent
418d01b8f6
commit
aeab837348
|
@ -123,11 +123,8 @@ function selectItem(selector, option, ariaControl, hasWrite = true) {
|
|||
const val = typeof option == 'string' ? option.toLowerCase() : option;
|
||||
return item.innerText.toLowerCase().includes(val);
|
||||
});
|
||||
if (matchingItem) {
|
||||
cy.wrap(matchingItem).click();
|
||||
cy.get('#' + ariaControl).should('not.exist');
|
||||
return;
|
||||
}
|
||||
if (matchingItem) return cy.wrap(matchingItem).click();
|
||||
|
||||
if (hasWrite) cy.get(selector).clear().type(option);
|
||||
return selectItem(selector, option, ariaControl, false);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue