(elements, state)
| 3396 | } |
| 3397 | |
| 3398 | async function filterFieldsBySelectionState(elements, state) { |
| 3399 | const matches = [] |
| 3400 | for (const element of elements) { |
| 3401 | const isSelected = await elementSelected(element) |
| 3402 | if (isSelected === state) { |
| 3403 | matches.push(element) |
| 3404 | } |
| 3405 | } |
| 3406 | return matches |
| 3407 | } |
| 3408 | |
| 3409 | async function elementSelected(element) { |
| 3410 | const type = await element.getProperty('type').then(el => el.jsonValue()) |
no test coverage detected