test: refs #8581 rollback
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-03-11 12:44:44 +01:00
parent 418d01b8f6
commit aeab837348
1 changed files with 2 additions and 5 deletions

View File

@ -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);
});