(instance: TestInstance)
| 184 | } |
| 185 | |
| 186 | function getAriaLabelledByIds(instance: TestInstance): string[] { |
| 187 | const ariaLabelledBy = instance.props['aria-labelledby']; |
| 188 | if (typeof ariaLabelledBy === 'string') { |
| 189 | return [ariaLabelledBy]; |
| 190 | } |
| 191 | |
| 192 | const accessibilityLabelledBy = instance.props.accessibilityLabelledBy; |
| 193 | if (Array.isArray(accessibilityLabelledBy)) { |
| 194 | return accessibilityLabelledBy; |
| 195 | } |
| 196 | |
| 197 | if (typeof accessibilityLabelledBy === 'string') { |
| 198 | return [accessibilityLabelledBy]; |
| 199 | } |
| 200 | |
| 201 | return []; |
| 202 | } |
| 203 | |
| 204 | // See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#busy-state |
| 205 | export function computeAriaBusy({ props }: TestInstance): boolean { |
no outgoing calls
no test coverage detected
searching dependent graphs…