1
1
// @flow
2
2
import type { A11yRole , A11yStates , A11yState , A11yValue } from '../types.flow' ;
3
3
import type { WaitForOptions } from '../waitFor' ;
4
- import makeQuery from './makeQuery ' ;
4
+ import makeA11yQuery from './makeA11yQuery ' ;
5
5
6
6
type GetReturn = ReactTestInstance ;
7
7
type GetAllReturn = Array < ReactTestInstance > ;
@@ -118,7 +118,7 @@ export function matchObject<T: {}>(prop?: T, matcher: T): boolean {
118
118
119
119
export const a11yAPI = ( instance : ReactTestInstance ) : A11yAPI =>
120
120
( {
121
- ...makeQuery (
121
+ ...makeA11yQuery (
122
122
'accessibilityLabel' ,
123
123
{
124
124
getBy : [ 'getByA11yLabel' , 'getByAccessibilityLabel' , 'getByLabelText' ] ,
@@ -150,7 +150,7 @@ export const a11yAPI = (instance: ReactTestInstance): A11yAPI =>
150
150
} ,
151
151
matchStringValue
152
152
) ( instance ) ,
153
- ...makeQuery (
153
+ ...makeA11yQuery (
154
154
'accessibilityHint' ,
155
155
{
156
156
getBy : [ 'getByA11yHint' , 'getByAccessibilityHint' , 'getByHintText' ] ,
@@ -178,7 +178,7 @@ export const a11yAPI = (instance: ReactTestInstance): A11yAPI =>
178
178
} ,
179
179
matchStringValue
180
180
) ( instance ) ,
181
- ...makeQuery (
181
+ ...makeA11yQuery (
182
182
'accessibilityRole' ,
183
183
{
184
184
getBy : [ 'getByA11yRole' , 'getByAccessibilityRole' , 'getByRole' ] ,
@@ -202,7 +202,7 @@ export const a11yAPI = (instance: ReactTestInstance): A11yAPI =>
202
202
} ,
203
203
matchStringValue
204
204
) ( instance ) ,
205
- ...makeQuery (
205
+ ...makeA11yQuery (
206
206
'accessibilityStates' ,
207
207
{
208
208
getBy : [ 'getByA11yStates' , 'getByAccessibilityStates' ] ,
@@ -214,7 +214,7 @@ export const a11yAPI = (instance: ReactTestInstance): A11yAPI =>
214
214
} ,
215
215
matchArrayValue
216
216
) ( instance ) ,
217
- ...makeQuery (
217
+ ...makeA11yQuery (
218
218
'accessibilityState' ,
219
219
{
220
220
getBy : [ 'getByA11yState' , 'getByAccessibilityState' ] ,
@@ -226,7 +226,7 @@ export const a11yAPI = (instance: ReactTestInstance): A11yAPI =>
226
226
} ,
227
227
matchObject
228
228
) ( instance ) ,
229
- ...makeQuery (
229
+ ...makeA11yQuery (
230
230
'accessibilityValue' ,
231
231
{
232
232
getBy : [ 'getByA11yValue' , 'getByAccessibilityValue' ] ,
0 commit comments