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;
|
const val = typeof option == 'string' ? option.toLowerCase() : option;
|
||||||
return item.innerText.toLowerCase().includes(val);
|
return item.innerText.toLowerCase().includes(val);
|
||||||
});
|
});
|
||||||
if (matchingItem) {
|
if (matchingItem) return cy.wrap(matchingItem).click();
|
||||||
cy.wrap(matchingItem).click();
|
|
||||||
cy.get('#' + ariaControl).should('not.exist');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (hasWrite) cy.get(selector).clear().type(option);
|
if (hasWrite) cy.get(selector).clear().type(option);
|
||||||
return selectItem(selector, option, ariaControl, false);
|
return selectItem(selector, option, ariaControl, false);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue