| 3102 | const elemId = getElementId(elem) |
| 3103 | |
| 3104 | const proceedMultiple = async fields => { |
| 3105 | const fieldResults = toArray( |
| 3106 | await forEachAsync(fields, async el => { |
| 3107 | const elementId = getElementId(el) |
| 3108 | return this.browser.getElementAttribute(elementId, 'value') |
| 3109 | }), |
| 3110 | ) |
| 3111 | |
| 3112 | if (typeof value === 'boolean') { |
| 3113 | equals(`no. of items matching > 0: ${field}`)[assertType](value, !!fieldResults.length) |
| 3114 | } else { |
| 3115 | // Assert that results were found so the forEach assert does not silently pass |
| 3116 | equals(`no. of items matching > 0: ${field}`)[assertType](true, !!fieldResults.length) |
| 3117 | fieldResults.forEach(val => stringIncludes(`fields by ${field}`)[assertType](value, val)) |
| 3118 | } |
| 3119 | } |
| 3120 | |
| 3121 | const proceedSingle = async el => { |
| 3122 | let res = await el.getValue() |
no test coverage detected