Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Forfold committed Jan 23, 2024
1 parent e56b258 commit ea72f6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/cypress/support/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ function fillFormField(
}

// select dropdowns
if (el.attr('role') === 'combobox') {
if (el.siblings().attr('aria-haspopup') === 'listbox') {
cy.log('log: is a select')
// action to clear multi-select
if (value === '') {
cy.log('log: clear multi')
cy.get(selector).clear()

el.parent()
Expand All @@ -69,6 +71,7 @@ function fillFormField(

return cy.get(selector).selectByLabel(value)
}
cy.log('log: not a select')

if (Array.isArray(value)) {
throw new TypeError('arrays only supported for search-select inputs')
Expand Down

0 comments on commit ea72f6c

Please sign in to comment.