@testing-library/react-native 11.3.0 → 11.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +5 -2
  2. package/build/act.js +9 -15
  3. package/build/act.js.map +1 -1
  4. package/build/cleanup.d.ts +1 -1
  5. package/build/cleanup.js +0 -4
  6. package/build/cleanup.js.map +1 -1
  7. package/build/config.d.ts +15 -2
  8. package/build/config.js +16 -8
  9. package/build/config.js.map +1 -1
  10. package/build/fireEvent.js +3 -31
  11. package/build/fireEvent.js.map +1 -1
  12. package/build/flushMicroTasks.d.ts +1 -1
  13. package/build/flushMicroTasks.js +0 -3
  14. package/build/flushMicroTasks.js.map +1 -1
  15. package/build/helpers/accessiblity.d.ts +10 -1
  16. package/build/helpers/accessiblity.js +28 -24
  17. package/build/helpers/accessiblity.js.map +1 -1
  18. package/build/helpers/component-tree.js +6 -27
  19. package/build/helpers/component-tree.js.map +1 -1
  20. package/build/helpers/debugDeep.d.ts +5 -1
  21. package/build/helpers/debugDeep.js +7 -6
  22. package/build/helpers/debugDeep.js.map +1 -1
  23. package/build/helpers/debugShallow.js +0 -5
  24. package/build/helpers/debugShallow.js.map +1 -1
  25. package/build/helpers/errors.js +4 -25
  26. package/build/helpers/errors.js.map +1 -1
  27. package/build/helpers/filterNodeByType.js +0 -2
  28. package/build/helpers/filterNodeByType.js.map +1 -1
  29. package/build/helpers/findAll.d.ts +10 -0
  30. package/build/helpers/findAll.js +44 -0
  31. package/build/helpers/findAll.js.map +1 -0
  32. package/build/helpers/format.d.ts +5 -1
  33. package/build/helpers/format.js +17 -7
  34. package/build/helpers/format.js.map +1 -1
  35. package/build/helpers/getTextContent.d.ts +2 -0
  36. package/build/helpers/getTextContent.js +20 -0
  37. package/build/helpers/getTextContent.js.map +1 -0
  38. package/build/helpers/matchers/accessibilityState.d.ts +3 -0
  39. package/build/helpers/matchers/accessibilityState.js +28 -0
  40. package/build/helpers/matchers/accessibilityState.js.map +1 -0
  41. package/build/helpers/matchers/accessibilityValue.d.ts +9 -0
  42. package/build/helpers/matchers/accessibilityValue.js +12 -0
  43. package/build/helpers/matchers/accessibilityValue.js.map +1 -0
  44. package/build/helpers/matchers/matchArrayProp.js +0 -3
  45. package/build/helpers/matchers/matchArrayProp.js.map +1 -1
  46. package/build/helpers/matchers/matchObjectProp.js +0 -2
  47. package/build/helpers/matchers/matchObjectProp.js.map +1 -1
  48. package/build/helpers/matchers/matchStringProp.js +0 -3
  49. package/build/helpers/matchers/matchStringProp.js.map +1 -1
  50. package/build/helpers/matchers/matchTextContent.d.ts +3 -0
  51. package/build/helpers/matchers/matchTextContent.js +22 -0
  52. package/build/helpers/matchers/matchTextContent.js.map +1 -0
  53. package/build/helpers/stringValidation.js +0 -7
  54. package/build/helpers/stringValidation.js.map +1 -1
  55. package/build/helpers/timers.js +10 -21
  56. package/build/helpers/timers.js.map +1 -1
  57. package/build/index.flow.js +169 -56
  58. package/build/index.js +0 -6
  59. package/build/index.js.map +1 -1
  60. package/build/matches.d.ts +7 -3
  61. package/build/matches.js +2 -4
  62. package/build/matches.js.map +1 -1
  63. package/build/pure.d.ts +12 -23
  64. package/build/pure.js +8 -15
  65. package/build/pure.js.map +1 -1
  66. package/build/queries/a11yState.d.ts +15 -14
  67. package/build/queries/a11yState.js +16 -13
  68. package/build/queries/a11yState.js.map +1 -1
  69. package/build/queries/a11yValue.d.ts +15 -20
  70. package/build/queries/a11yValue.js +16 -13
  71. package/build/queries/a11yValue.js.map +1 -1
  72. package/build/queries/displayValue.d.ts +11 -9
  73. package/build/queries/displayValue.js +2 -12
  74. package/build/queries/displayValue.js.map +1 -1
  75. package/build/queries/hintText.d.ts +23 -20
  76. package/build/queries/hintText.js +11 -11
  77. package/build/queries/hintText.js.map +1 -1
  78. package/build/queries/labelText.d.ts +11 -8
  79. package/build/queries/labelText.js +11 -11
  80. package/build/queries/labelText.js.map +1 -1
  81. package/build/queries/makeQueries.d.ts +9 -9
  82. package/build/queries/makeQueries.js +40 -24
  83. package/build/queries/makeQueries.js.map +1 -1
  84. package/build/queries/options.d.ts +11 -0
  85. package/build/queries/options.js +2 -0
  86. package/build/queries/options.js.map +1 -0
  87. package/build/queries/placeholderText.d.ts +11 -9
  88. package/build/queries/placeholderText.js +2 -12
  89. package/build/queries/placeholderText.js.map +1 -1
  90. package/build/queries/role.d.ts +7 -3
  91. package/build/queries/role.js +32 -13
  92. package/build/queries/role.js.map +1 -1
  93. package/build/queries/testId.d.ts +11 -9
  94. package/build/queries/testId.js +3 -11
  95. package/build/queries/testId.js.map +1 -1
  96. package/build/queries/text.d.ts +11 -13
  97. package/build/queries/text.js +6 -71
  98. package/build/queries/text.js.map +1 -1
  99. package/build/queries/unsafeProps.d.ts +1 -1
  100. package/build/queries/unsafeProps.js +2 -11
  101. package/build/queries/unsafeProps.js.map +1 -1
  102. package/build/queries/unsafeType.d.ts +1 -1
  103. package/build/queries/unsafeType.js +2 -9
  104. package/build/queries/unsafeType.js.map +1 -1
  105. package/build/react-versions.js +0 -4
  106. package/build/react-versions.js.map +1 -1
  107. package/build/render.d.ts +88 -141
  108. package/build/render.js +21 -31
  109. package/build/render.js.map +1 -1
  110. package/build/renderHook.d.ts +2 -2
  111. package/build/renderHook.js +2 -12
  112. package/build/renderHook.js.map +1 -1
  113. package/build/screen.js +0 -6
  114. package/build/screen.js.map +1 -1
  115. package/build/shallow.js +0 -6
  116. package/build/shallow.js.map +1 -1
  117. package/build/waitFor.d.ts +1 -1
  118. package/build/waitFor.js +29 -52
  119. package/build/waitFor.js.map +1 -1
  120. package/build/waitForElementToBeRemoved.js +2 -11
  121. package/build/waitForElementToBeRemoved.js.map +1 -1
  122. package/build/within.d.ts +84 -138
  123. package/build/within.js +2 -14
  124. package/build/within.js.map +1 -1
  125. package/package.json +12 -11
  126. package/typings/index.flow.js +169 -56
@@ -8,6 +8,10 @@ type QueryAllReturn = Array<ReactTestInstance> | [];
8
8
  type FindReturn = Promise<ReactTestInstance>;
9
9
  type FindAllReturn = Promise<ReactTestInstance[]>;
10
10
 
11
+ type CommonQueryOptions = {
12
+ includeHiddenElements?: boolean,
13
+ hidden?: boolean,
14
+ };
11
15
  type TextMatch = string | RegExp;
12
16
 
13
17
  declare type NormalizerFn = (textToNormalize: string) => string;
@@ -60,7 +64,7 @@ declare type A11yValue = {
60
64
  min?: number,
61
65
  max?: number,
62
66
  now?: number,
63
- text?: string,
67
+ text?: TextMatch,
64
68
  };
65
69
 
66
70
  type WaitForOptions = {
@@ -74,109 +78,123 @@ type WaitForFunction = <T = any>(
74
78
  options?: WaitForOptions
75
79
  ) => Promise<T>;
76
80
 
81
+ type ByTextOptions = CommonQueryOptions & TextMatchOptions;
82
+
77
83
  interface ByTextQueries {
78
- getByText: (text: TextMatch, options?: TextMatchOptions) => ReactTestInstance;
84
+ getByText: (text: TextMatch, options?: ByTextOptions) => ReactTestInstance;
79
85
  getAllByText: (
80
86
  text: TextMatch,
81
- options?: TextMatchOptions
87
+ options?: ByTextOptions
82
88
  ) => Array<ReactTestInstance>;
83
89
  queryByText: (
84
90
  name: TextMatch,
85
- options?: TextMatchOptions
91
+ options?: ByTextOptions
86
92
  ) => ReactTestInstance | null;
87
93
  queryAllByText: (
88
94
  text: TextMatch,
89
- options?: TextMatchOptions
95
+ options?: ByTextOptions
90
96
  ) => Array<ReactTestInstance> | [];
91
97
  findByText: (
92
98
  text: TextMatch,
93
- queryOptions?: TextMatchOptions,
99
+ queryOptions?: ByTextOptions,
94
100
  waitForOptions?: WaitForOptions
95
101
  ) => FindReturn;
96
102
  findAllByText: (
97
103
  text: TextMatch,
98
- queryOptions?: TextMatchOptions,
104
+ queryOptions?: ByTextOptions,
99
105
  waitForOptions?: WaitForOptions
100
106
  ) => FindAllReturn;
101
107
  }
102
108
 
109
+ type ByTestIdOptions = CommonQueryOptions & TextMatchOptions;
110
+
103
111
  interface ByTestIdQueries {
104
112
  getByTestId: (
105
113
  testID: TextMatch,
106
- options?: TextMatchOptions
114
+ options?: ByTestIdOptions
107
115
  ) => ReactTestInstance;
108
116
  getAllByTestId: (
109
117
  testID: TextMatch,
110
- options?: TextMatchOptions
118
+ options?: ByTestIdOptions
111
119
  ) => Array<ReactTestInstance>;
112
- queryByTestId: (testID: TextMatch) => ReactTestInstance | null;
113
- queryAllByTestId: (testID: TextMatch) => Array<ReactTestInstance> | [];
120
+ queryByTestId: (
121
+ testID: TextMatch,
122
+ options?: ByTestIdOptions
123
+ ) => ReactTestInstance | null;
124
+ queryAllByTestId: (
125
+ testID: TextMatch,
126
+ options?: ByTestIdOptions
127
+ ) => Array<ReactTestInstance> | [];
114
128
  findByTestId: (
115
129
  testID: TextMatch,
116
- queryOptions?: TextMatchOptions,
130
+ queryOptions?: ByTestIdOptions,
117
131
  waitForOptions?: WaitForOptions
118
132
  ) => FindReturn;
119
133
  findAllByTestId: (
120
134
  testID: TextMatch,
121
- queryOptions?: TextMatchOptions,
135
+ queryOptions?: ByTestIdOptions,
122
136
  waitForOptions?: WaitForOptions
123
137
  ) => FindAllReturn;
124
138
  }
125
139
 
140
+ type ByDisplayValueOptions = CommonQueryOptions & TextMatchOptions;
141
+
126
142
  interface ByDisplayValueQueries {
127
143
  getByDisplayValue: (
128
144
  value: TextMatch,
129
- options?: TextMatchOptions
145
+ options?: ByDisplayValueOptions
130
146
  ) => ReactTestInstance;
131
147
  getAllByDisplayValue: (
132
148
  value: TextMatch,
133
- options?: TextMatchOptions
149
+ options?: ByDisplayValueOptions
134
150
  ) => Array<ReactTestInstance>;
135
151
  queryByDisplayValue: (
136
152
  value: TextMatch,
137
- options?: TextMatchOptions
153
+ options?: ByDisplayValueOptions
138
154
  ) => ReactTestInstance | null;
139
155
  queryAllByDisplayValue: (
140
156
  value: TextMatch,
141
- options?: TextMatchOptions
157
+ options?: ByDisplayValueOptions
142
158
  ) => Array<ReactTestInstance> | [];
143
159
  findByDisplayValue: (
144
160
  value: TextMatch,
145
- queryOptions?: TextMatchOptions,
161
+ queryOptions?: ByDisplayValueOptions,
146
162
  waitForOptions?: WaitForOptions
147
163
  ) => FindReturn;
148
164
  findAllByDisplayValue: (
149
165
  value: TextMatch,
150
- queryOptions?: TextMatchOptions,
166
+ queryOptions?: ByDisplayValueOptions,
151
167
  waitForOptions?: WaitForOptions
152
168
  ) => FindAllReturn;
153
169
  }
154
170
 
171
+ type ByPlaceholderTextOptions = CommonQueryOptions & TextMatchOptions;
172
+
155
173
  interface ByPlaceholderTextQueries {
156
174
  getByPlaceholderText: (
157
175
  placeholder: TextMatch,
158
- options?: TextMatchOptions
176
+ options?: ByPlaceholderTextOptions
159
177
  ) => ReactTestInstance;
160
178
  getAllByPlaceholderText: (
161
179
  placeholder: TextMatch,
162
- options?: TextMatchOptions
180
+ options?: ByPlaceholderTextOptions
163
181
  ) => Array<ReactTestInstance>;
164
182
  queryByPlaceholderText: (
165
183
  placeholder: TextMatch,
166
- options?: TextMatchOptions
184
+ options?: ByPlaceholderTextOptions
167
185
  ) => ReactTestInstance | null;
168
186
  queryAllByPlaceholderText: (
169
187
  placeholder: TextMatch,
170
- options?: TextMatchOptions
188
+ options?: ByPlaceholderTextOptions
171
189
  ) => Array<ReactTestInstance> | [];
172
190
  findByPlaceholderText: (
173
191
  placeholder: TextMatch,
174
- queryOptions?: TextMatchOptions,
192
+ queryOptions?: ByPlaceholderTextOptions,
175
193
  waitForOptions?: WaitForOptions
176
194
  ) => FindReturn;
177
195
  findAllByPlaceholderText: (
178
196
  placeholder: TextMatch,
179
- queryOptions?: TextMatchOptions,
197
+ queryOptions?: ByPlaceholderTextOptions,
180
198
  waitForOptions?: WaitForOptions
181
199
  ) => FindAllReturn;
182
200
  }
@@ -203,48 +221,89 @@ interface UnsafeByPropsQueries {
203
221
  | [];
204
222
  }
205
223
 
206
- interface ByRoleOptions {
207
- name?: string;
208
- }
224
+ type ByRoleOptions = CommonQueryOptions & {
225
+ ...A11yState,
226
+ name?: string,
227
+ value?: A11yValue,
228
+ };
229
+
230
+ type ByLabelTextOptions = CommonQueryOptions & TextMatchOptions;
231
+ type ByHintTextOptions = CommonQueryOptions & TextMatchOptions;
209
232
 
210
233
  interface A11yAPI {
211
234
  // Label
212
- getByLabelText: (matcher: TextMatch) => GetReturn;
213
- getAllByLabelText: (matcher: TextMatch) => GetAllReturn;
214
- queryByLabelText: (matcher: TextMatch) => QueryReturn;
215
- queryAllByLabelText: (matcher: TextMatch) => QueryAllReturn;
235
+ getByLabelText: (
236
+ matcher: TextMatch,
237
+ options?: ByLabelTextOptions
238
+ ) => GetReturn;
239
+ getAllByLabelText: (
240
+ matcher: TextMatch,
241
+ options?: ByLabelTextOptions
242
+ ) => GetAllReturn;
243
+ queryByLabelText: (
244
+ matcher: TextMatch,
245
+ options?: ByLabelTextOptions
246
+ ) => QueryReturn;
247
+ queryAllByLabelText: (
248
+ matcher: TextMatch,
249
+ options?: ByLabelTextOptions
250
+ ) => QueryAllReturn;
216
251
  findByLabelText: (
217
252
  matcher: TextMatch,
253
+ queryOptions?: ByLabelTextOptions,
218
254
  waitForOptions?: WaitForOptions
219
255
  ) => FindReturn;
220
256
  findAllByLabelText: (
221
257
  matcher: TextMatch,
258
+ queryOptions?: ByLabelTextOptions,
222
259
  waitForOptions?: WaitForOptions
223
260
  ) => FindAllReturn;
224
261
 
225
262
  // Hint
226
- getByA11yHint: (matcher: TextMatch) => GetReturn;
227
- getByHintText: (matcher: TextMatch) => GetReturn;
228
- getAllByA11yHint: (matcher: TextMatch) => GetAllReturn;
229
- getAllByHintText: (matcher: TextMatch) => GetAllReturn;
230
- queryByA11yHint: (matcher: TextMatch) => QueryReturn;
231
- queryByHintText: (matcher: TextMatch) => QueryReturn;
232
- queryAllByA11yHint: (matcher: TextMatch) => QueryAllReturn;
233
- queryAllByHintText: (matcher: TextMatch) => QueryAllReturn;
263
+ getByA11yHint: (matcher: TextMatch, options?: ByHintTextOptions) => GetReturn;
264
+ getByHintText: (matcher: TextMatch, options?: ByHintTextOptions) => GetReturn;
265
+ getAllByA11yHint: (
266
+ matcher: TextMatch,
267
+ options?: ByHintTextOptions
268
+ ) => GetAllReturn;
269
+ getAllByHintText: (
270
+ matcher: TextMatch,
271
+ options?: ByHintTextOptions
272
+ ) => GetAllReturn;
273
+ queryByA11yHint: (
274
+ matcher: TextMatch,
275
+ options?: ByHintTextOptions
276
+ ) => QueryReturn;
277
+ queryByHintText: (
278
+ matcher: TextMatch,
279
+ options?: ByHintTextOptions
280
+ ) => QueryReturn;
281
+ queryAllByA11yHint: (
282
+ matcher: TextMatch,
283
+ options?: ByHintTextOptions
284
+ ) => QueryAllReturn;
285
+ queryAllByHintText: (
286
+ matcher: TextMatch,
287
+ options?: ByHintTextOptions
288
+ ) => QueryAllReturn;
234
289
  findByA11yHint: (
235
290
  matcher: TextMatch,
291
+ queryOptions?: ByHintTextOptions,
236
292
  waitForOptions?: WaitForOptions
237
293
  ) => FindReturn;
238
294
  findByHintText: (
239
295
  matcher: TextMatch,
296
+ queryOptions?: ByHintTextOptions,
240
297
  waitForOptions?: WaitForOptions
241
298
  ) => FindReturn;
242
299
  findAllByA11yHint: (
243
300
  matcher: TextMatch,
301
+ queryOptions?: ByHintTextOptions,
244
302
  waitForOptions?: WaitForOptions
245
303
  ) => FindAllReturn;
246
304
  findAllByHintText: (
247
305
  matcher: TextMatch,
306
+ queryOptions?: ByHintTextOptions,
248
307
  waitForOptions?: WaitForOptions
249
308
  ) => FindAllReturn;
250
309
 
@@ -252,52 +311,80 @@ interface A11yAPI {
252
311
  getByRole: (matcher: A11yRole | RegExp, role?: ByRoleOptions) => GetReturn;
253
312
  getAllByRole: (
254
313
  matcher: A11yRole | RegExp,
255
- role?: ByRoleOptions
314
+ options?: ByRoleOptions
256
315
  ) => GetAllReturn;
257
316
  queryByRole: (
258
317
  matcher: A11yRole | RegExp,
259
- role?: ByRoleOptions
318
+ options?: ByRoleOptions
260
319
  ) => QueryReturn;
261
320
  queryAllByRole: (
262
321
  matcher: A11yRole | RegExp,
263
- role?: ByRoleOptions
322
+ options?: ByRoleOptions
264
323
  ) => QueryAllReturn;
265
324
  findByRole: (
266
325
  matcher: A11yRole | RegExp,
267
- role?: ByRoleOptions,
326
+ queryOptions?: ByRoleOptions,
268
327
  waitForOptions?: WaitForOptions
269
328
  ) => FindReturn;
270
329
  findAllByRole: (
271
330
  matcher: A11yRole | RegExp,
272
- role?: ByRoleOptions,
331
+ queryOptions?: ByRoleOptions,
273
332
  waitForOptions?: WaitForOptions
274
333
  ) => FindAllReturn;
275
334
 
276
335
  // State
277
- getByA11yState: (matcher: A11yState) => GetReturn;
278
- getAllByA11yState: (matcher: A11yState) => GetAllReturn;
279
- queryByA11yState: (matcher: A11yState) => QueryReturn;
280
- queryAllByA11yState: (matcher: A11yState) => QueryAllReturn;
336
+ getByA11yState: (
337
+ matcher: A11yState,
338
+ options?: CommonQueryOptions
339
+ ) => GetReturn;
340
+ getAllByA11yState: (
341
+ matcher: A11yState,
342
+ options?: CommonQueryOptions
343
+ ) => GetAllReturn;
344
+ queryByA11yState: (
345
+ matcher: A11yState,
346
+ options?: CommonQueryOptions
347
+ ) => QueryReturn;
348
+ queryAllByA11yState: (
349
+ matcher: A11yState,
350
+ options?: CommonQueryOptions
351
+ ) => QueryAllReturn;
281
352
  findByA11yState: (
282
353
  matcher: A11yState,
354
+ queryOptions?: CommonQueryOptions,
283
355
  waitForOptions?: WaitForOptions
284
356
  ) => FindReturn;
285
357
  findAllByA11yState: (
286
358
  matcher: A11yState,
359
+ queryOptions?: CommonQueryOptions,
287
360
  waitForOptions?: WaitForOptions
288
361
  ) => FindAllReturn;
289
362
 
290
363
  // Value
291
- getByA11yValue: (matcher: A11yValue) => GetReturn;
292
- getAllByA11yValue: (matcher: A11yValue) => GetAllReturn;
293
- queryByA11yValue: (matcher: A11yValue) => QueryReturn;
294
- queryAllByA11yValue: (matcher: A11yValue) => QueryAllReturn;
364
+ getByA11yValue: (
365
+ matcher: A11yValue,
366
+ options?: CommonQueryOptions
367
+ ) => GetReturn;
368
+ getAllByA11yValue: (
369
+ matcher: A11yValue,
370
+ options?: CommonQueryOptions
371
+ ) => GetAllReturn;
372
+ queryByA11yValue: (
373
+ matcher: A11yValue,
374
+ options?: CommonQueryOptions
375
+ ) => QueryReturn;
376
+ queryAllByA11yValue: (
377
+ matcher: A11yValue,
378
+ options?: CommonQueryOptions
379
+ ) => QueryAllReturn;
295
380
  findByA11yValue: (
296
381
  matcher: A11yValue,
382
+ queryOptions?: CommonQueryOptions,
297
383
  waitForOptions?: WaitForOptions
298
384
  ) => FindReturn;
299
385
  findAllByA11yValue: (
300
386
  matcher: A11yValue,
387
+ queryOptions?: CommonQueryOptions,
301
388
  waitForOptions?: WaitForOptions
302
389
  ) => FindAllReturn;
303
390
  }
@@ -306,8 +393,18 @@ interface Thenable {
306
393
  then: (resolve: () => any, reject?: () => any) => any;
307
394
  }
308
395
 
396
+ type MapPropsFunction = (
397
+ props: { [string]: mixed },
398
+ node: ReactTestRendererJSON
399
+ ) => { [string]: mixed };
400
+
401
+ type DebugOptions = {
402
+ message?: string,
403
+ mapProps?: MapPropsFunction,
404
+ };
405
+
309
406
  type Debug = {
310
- (message?: string): void,
407
+ (options?: DebugOptions | string): void,
311
408
  shallow: (message?: string) => void,
312
409
  };
313
410
 
@@ -370,21 +467,37 @@ declare module '@testing-library/react-native' {
370
467
 
371
468
  declare interface Config {
372
469
  asyncUtilTimeout: number;
470
+ defaultIncludeHiddenElements: boolean;
471
+ defaultDebugOptions?: $Shape<DebugOptions>;
373
472
  }
374
473
 
375
- declare export var configure: (options: $Shape<Config>) => void;
474
+ declare interface ConfigAliasOptions {
475
+ /** Alias to `defaultIncludeHiddenElements` for RTL compatibility */
476
+ defaultHidden: boolean;
477
+ }
478
+
479
+ declare export var configure: (
480
+ options: $Shape<Config & ConfigAliasOptions>
481
+ ) => void;
376
482
  declare export var resetToDefaults: () => void;
377
483
 
378
484
  declare export var act: (callback: () => void) => Thenable;
379
485
  declare export var within: (instance: ReactTestInstance) => Queries;
380
486
  declare export var getQueriesForElement: (
381
- instance: ReactTestInstance
487
+ element: ReactTestInstance
382
488
  ) => Queries;
383
489
 
384
490
  declare export var getDefaultNormalizer: (
385
491
  normalizerConfig?: NormalizerConfig
386
492
  ) => NormalizerFn;
387
493
 
494
+ declare export var isHiddenFromAccessibility: (
495
+ element: ReactTestInstance | null
496
+ ) => boolean;
497
+ declare export var isInaccessible: (
498
+ element: ReactTestInstance | null
499
+ ) => boolean;
500
+
388
501
  declare type RenderHookResult<Result, Props> = {
389
502
  rerender: (props: Props) => void,
390
503
  result: { current: Result },
package/build/index.js CHANGED
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  var _pure = require("./pure");
8
-
9
7
  Object.keys(_pure).forEach(function (key) {
10
8
  if (key === "default" || key === "__esModule") return;
11
9
  if (key in exports && exports[key] === _pure[key]) return;
@@ -16,11 +14,8 @@ Object.keys(_pure).forEach(function (key) {
16
14
  }
17
15
  });
18
16
  });
19
-
20
17
  var _flushMicroTasks = require("./flushMicroTasks");
21
-
22
18
  var _act = require("./act");
23
-
24
19
  if (typeof process === 'undefined' || !process.env?.RNTL_SKIP_AUTO_CLEANUP) {
25
20
  // If we're running in a test runner that supports afterEach
26
21
  // then we'll automatically run cleanup afterEach test
@@ -34,7 +29,6 @@ if (typeof process === 'undefined' || !process.env?.RNTL_SKIP_AUTO_CLEANUP) {
34
29
  (0, _pure.cleanup)();
35
30
  });
36
31
  }
37
-
38
32
  if (typeof beforeAll === 'function' && typeof afterAll === 'function') {
39
33
  // This matches the behavior of React < 18.
40
34
  let previousIsReactActEnvironment = (0, _act.getIsReactActEnvironment)();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["process","env","RNTL_SKIP_AUTO_CLEANUP","afterEach","flushMicroTasks","cleanup","beforeAll","afterAll","previousIsReactActEnvironment","getIsReactActEnvironment","setReactActEnvironment"],"sources":["../src/index.ts"],"sourcesContent":["import { cleanup } from './pure';\nimport { flushMicroTasks } from './flushMicroTasks';\nimport { getIsReactActEnvironment, setReactActEnvironment } from './act';\n\nif (typeof process === 'undefined' || !process.env?.RNTL_SKIP_AUTO_CLEANUP) {\n // If we're running in a test runner that supports afterEach\n // then we'll automatically run cleanup afterEach test\n // this ensures that tests run in isolation from each other\n // if you don't like this then either import the `pure` module\n // or set the RNTL_SKIP_AUTO_CLEANUP env variable to 'true'.\n if (typeof afterEach === 'function') {\n // eslint-disable-next-line no-undef\n afterEach(async () => {\n await flushMicroTasks();\n cleanup();\n });\n }\n\n if (typeof beforeAll === 'function' && typeof afterAll === 'function') {\n // This matches the behavior of React < 18.\n let previousIsReactActEnvironment = getIsReactActEnvironment();\n beforeAll(() => {\n previousIsReactActEnvironment = getIsReactActEnvironment();\n setReactActEnvironment(true);\n });\n\n afterAll(() => {\n setReactActEnvironment(previousIsReactActEnvironment);\n });\n }\n}\n\nexport * from './pure';\n"],"mappings":";;;;;;AAAA;;AAgCA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AA/BA;;AACA;;AAEA,IAAI,OAAOA,OAAP,KAAmB,WAAnB,IAAkC,CAACA,OAAO,CAACC,GAAR,EAAaC,sBAApD,EAA4E;EAC1E;EACA;EACA;EACA;EACA;EACA,IAAI,OAAOC,SAAP,KAAqB,UAAzB,EAAqC;IACnC;IACAA,SAAS,CAAC,YAAY;MACpB,MAAM,IAAAC,gCAAA,GAAN;MACA,IAAAC,aAAA;IACD,CAHQ,CAAT;EAID;;EAED,IAAI,OAAOC,SAAP,KAAqB,UAArB,IAAmC,OAAOC,QAAP,KAAoB,UAA3D,EAAuE;IACrE;IACA,IAAIC,6BAA6B,GAAG,IAAAC,6BAAA,GAApC;IACAH,SAAS,CAAC,MAAM;MACdE,6BAA6B,GAAG,IAAAC,6BAAA,GAAhC;MACA,IAAAC,2BAAA,EAAuB,IAAvB;IACD,CAHQ,CAAT;IAKAH,QAAQ,CAAC,MAAM;MACb,IAAAG,2BAAA,EAAuBF,6BAAvB;IACD,CAFO,CAAR;EAGD;AACF"}
1
+ {"version":3,"file":"index.js","names":["process","env","RNTL_SKIP_AUTO_CLEANUP","afterEach","flushMicroTasks","cleanup","beforeAll","afterAll","previousIsReactActEnvironment","getIsReactActEnvironment","setReactActEnvironment"],"sources":["../src/index.ts"],"sourcesContent":["import { cleanup } from './pure';\nimport { flushMicroTasks } from './flushMicroTasks';\nimport { getIsReactActEnvironment, setReactActEnvironment } from './act';\n\nif (typeof process === 'undefined' || !process.env?.RNTL_SKIP_AUTO_CLEANUP) {\n // If we're running in a test runner that supports afterEach\n // then we'll automatically run cleanup afterEach test\n // this ensures that tests run in isolation from each other\n // if you don't like this then either import the `pure` module\n // or set the RNTL_SKIP_AUTO_CLEANUP env variable to 'true'.\n if (typeof afterEach === 'function') {\n // eslint-disable-next-line no-undef\n afterEach(async () => {\n await flushMicroTasks();\n cleanup();\n });\n }\n\n if (typeof beforeAll === 'function' && typeof afterAll === 'function') {\n // This matches the behavior of React < 18.\n let previousIsReactActEnvironment = getIsReactActEnvironment();\n beforeAll(() => {\n previousIsReactActEnvironment = getIsReactActEnvironment();\n setReactActEnvironment(true);\n });\n\n afterAll(() => {\n setReactActEnvironment(previousIsReactActEnvironment);\n });\n }\n}\n\nexport * from './pure';\n"],"mappings":";;;;;AAAA;AAgCA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AA/BA;AACA;AAEA,IAAI,OAAOA,OAAO,KAAK,WAAW,IAAI,CAACA,OAAO,CAACC,GAAG,EAAEC,sBAAsB,EAAE;EAC1E;EACA;EACA;EACA;EACA;EACA,IAAI,OAAOC,SAAS,KAAK,UAAU,EAAE;IACnC;IACAA,SAAS,CAAC,YAAY;MACpB,MAAM,IAAAC,gCAAe,GAAE;MACvB,IAAAC,aAAO,GAAE;IACX,CAAC,CAAC;EACJ;EAEA,IAAI,OAAOC,SAAS,KAAK,UAAU,IAAI,OAAOC,QAAQ,KAAK,UAAU,EAAE;IACrE;IACA,IAAIC,6BAA6B,GAAG,IAAAC,6BAAwB,GAAE;IAC9DH,SAAS,CAAC,MAAM;MACdE,6BAA6B,GAAG,IAAAC,6BAAwB,GAAE;MAC1D,IAAAC,2BAAsB,EAAC,IAAI,CAAC;IAC9B,CAAC,CAAC;IAEFH,QAAQ,CAAC,MAAM;MACb,IAAAG,2BAAsB,EAACF,6BAA6B,CAAC;IACvD,CAAC,CAAC;EACJ;AACF"}
@@ -1,7 +1,11 @@
1
- export declare type NormalizerFn = (textToNormalize: string) => string;
2
- export declare type TextMatch = string | RegExp;
1
+ export type NormalizerFn = (textToNormalize: string) => string;
2
+ export type TextMatch = string | RegExp;
3
+ export type TextMatchOptions = {
4
+ exact?: boolean;
5
+ normalizer?: NormalizerFn;
6
+ };
3
7
  export declare function matches(matcher: TextMatch, text: string, normalizer?: NormalizerFn, exact?: boolean): boolean;
4
- declare type NormalizerConfig = {
8
+ type NormalizerConfig = {
5
9
  trim?: boolean;
6
10
  collapseWhitespace?: boolean;
7
11
  };
package/build/matches.js CHANGED
@@ -5,22 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getDefaultNormalizer = getDefaultNormalizer;
7
7
  exports.matches = matches;
8
-
9
8
  function matches(matcher, text, normalizer = getDefaultNormalizer(), exact = true) {
10
9
  if (typeof text !== 'string') {
11
10
  return false;
12
11
  }
13
-
14
12
  const normalizedText = normalizer(text);
15
-
16
13
  if (typeof matcher === 'string') {
17
14
  const normalizedMatcher = normalizer(matcher);
18
15
  return exact ? normalizedText === normalizedMatcher : normalizedText.toLowerCase().includes(normalizedMatcher.toLowerCase());
19
16
  } else {
17
+ // Reset state for global regexes: https://stackoverflow.com/a/1520839/484499
18
+ matcher.lastIndex = 0;
20
19
  return matcher.test(normalizedText);
21
20
  }
22
21
  }
23
-
24
22
  function getDefaultNormalizer({
25
23
  trim = true,
26
24
  collapseWhitespace = true
@@ -1 +1 @@
1
- {"version":3,"file":"matches.js","names":["matches","matcher","text","normalizer","getDefaultNormalizer","exact","normalizedText","normalizedMatcher","toLowerCase","includes","test","trim","collapseWhitespace","replace"],"sources":["../src/matches.ts"],"sourcesContent":["export type NormalizerFn = (textToNormalize: string) => string;\nexport type TextMatch = string | RegExp;\n\nexport function matches(\n matcher: TextMatch,\n text: string,\n normalizer: NormalizerFn = getDefaultNormalizer(),\n exact: boolean = true\n): boolean {\n if (typeof text !== 'string') {\n return false;\n }\n\n const normalizedText = normalizer(text);\n if (typeof matcher === 'string') {\n const normalizedMatcher = normalizer(matcher);\n return exact\n ? normalizedText === normalizedMatcher\n : normalizedText.toLowerCase().includes(normalizedMatcher.toLowerCase());\n } else {\n return matcher.test(normalizedText);\n }\n}\n\ntype NormalizerConfig = {\n trim?: boolean;\n collapseWhitespace?: boolean;\n};\n\nexport function getDefaultNormalizer({\n trim = true,\n collapseWhitespace = true,\n}: NormalizerConfig = {}): NormalizerFn {\n return (text: string) => {\n let normalizedText = text;\n normalizedText = trim ? normalizedText.trim() : normalizedText;\n normalizedText = collapseWhitespace\n ? normalizedText.replace(/\\s+/g, ' ')\n : normalizedText;\n return normalizedText;\n };\n}\n"],"mappings":";;;;;;;;AAGO,SAASA,OAAT,CACLC,OADK,EAELC,IAFK,EAGLC,UAAwB,GAAGC,oBAAoB,EAH1C,EAILC,KAAc,GAAG,IAJZ,EAKI;EACT,IAAI,OAAOH,IAAP,KAAgB,QAApB,EAA8B;IAC5B,OAAO,KAAP;EACD;;EAED,MAAMI,cAAc,GAAGH,UAAU,CAACD,IAAD,CAAjC;;EACA,IAAI,OAAOD,OAAP,KAAmB,QAAvB,EAAiC;IAC/B,MAAMM,iBAAiB,GAAGJ,UAAU,CAACF,OAAD,CAApC;IACA,OAAOI,KAAK,GACRC,cAAc,KAAKC,iBADX,GAERD,cAAc,CAACE,WAAf,GAA6BC,QAA7B,CAAsCF,iBAAiB,CAACC,WAAlB,EAAtC,CAFJ;EAGD,CALD,MAKO;IACL,OAAOP,OAAO,CAACS,IAAR,CAAaJ,cAAb,CAAP;EACD;AACF;;AAOM,SAASF,oBAAT,CAA8B;EACnCO,IAAI,GAAG,IAD4B;EAEnCC,kBAAkB,GAAG;AAFc,IAGf,EAHf,EAGiC;EACtC,OAAQV,IAAD,IAAkB;IACvB,IAAII,cAAc,GAAGJ,IAArB;IACAI,cAAc,GAAGK,IAAI,GAAGL,cAAc,CAACK,IAAf,EAAH,GAA2BL,cAAhD;IACAA,cAAc,GAAGM,kBAAkB,GAC/BN,cAAc,CAACO,OAAf,CAAuB,MAAvB,EAA+B,GAA/B,CAD+B,GAE/BP,cAFJ;IAGA,OAAOA,cAAP;EACD,CAPD;AAQD"}
1
+ {"version":3,"file":"matches.js","names":["matches","matcher","text","normalizer","getDefaultNormalizer","exact","normalizedText","normalizedMatcher","toLowerCase","includes","lastIndex","test","trim","collapseWhitespace","replace"],"sources":["../src/matches.ts"],"sourcesContent":["export type NormalizerFn = (textToNormalize: string) => string;\n\nexport type TextMatch = string | RegExp;\nexport type TextMatchOptions = {\n exact?: boolean;\n normalizer?: NormalizerFn;\n};\n\nexport function matches(\n matcher: TextMatch,\n text: string,\n normalizer: NormalizerFn = getDefaultNormalizer(),\n exact: boolean = true\n): boolean {\n if (typeof text !== 'string') {\n return false;\n }\n\n const normalizedText = normalizer(text);\n if (typeof matcher === 'string') {\n const normalizedMatcher = normalizer(matcher);\n return exact\n ? normalizedText === normalizedMatcher\n : normalizedText.toLowerCase().includes(normalizedMatcher.toLowerCase());\n } else {\n // Reset state for global regexes: https://stackoverflow.com/a/1520839/484499\n matcher.lastIndex = 0;\n return matcher.test(normalizedText);\n }\n}\n\ntype NormalizerConfig = {\n trim?: boolean;\n collapseWhitespace?: boolean;\n};\n\nexport function getDefaultNormalizer({\n trim = true,\n collapseWhitespace = true,\n}: NormalizerConfig = {}): NormalizerFn {\n return (text: string) => {\n let normalizedText = text;\n normalizedText = trim ? normalizedText.trim() : normalizedText;\n normalizedText = collapseWhitespace\n ? normalizedText.replace(/\\s+/g, ' ')\n : normalizedText;\n return normalizedText;\n };\n}\n"],"mappings":";;;;;;;AAQO,SAASA,OAAO,CACrBC,OAAkB,EAClBC,IAAY,EACZC,UAAwB,GAAGC,oBAAoB,EAAE,EACjDC,KAAc,GAAG,IAAI,EACZ;EACT,IAAI,OAAOH,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,KAAK;EACd;EAEA,MAAMI,cAAc,GAAGH,UAAU,CAACD,IAAI,CAAC;EACvC,IAAI,OAAOD,OAAO,KAAK,QAAQ,EAAE;IAC/B,MAAMM,iBAAiB,GAAGJ,UAAU,CAACF,OAAO,CAAC;IAC7C,OAAOI,KAAK,GACRC,cAAc,KAAKC,iBAAiB,GACpCD,cAAc,CAACE,WAAW,EAAE,CAACC,QAAQ,CAACF,iBAAiB,CAACC,WAAW,EAAE,CAAC;EAC5E,CAAC,MAAM;IACL;IACAP,OAAO,CAACS,SAAS,GAAG,CAAC;IACrB,OAAOT,OAAO,CAACU,IAAI,CAACL,cAAc,CAAC;EACrC;AACF;AAOO,SAASF,oBAAoB,CAAC;EACnCQ,IAAI,GAAG,IAAI;EACXC,kBAAkB,GAAG;AACL,CAAC,GAAG,CAAC,CAAC,EAAgB;EACtC,OAAQX,IAAY,IAAK;IACvB,IAAII,cAAc,GAAGJ,IAAI;IACzBI,cAAc,GAAGM,IAAI,GAAGN,cAAc,CAACM,IAAI,EAAE,GAAGN,cAAc;IAC9DA,cAAc,GAAGO,kBAAkB,GAC/BP,cAAc,CAACQ,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,GACnCR,cAAc;IAClB,OAAOA,cAAc;EACvB,CAAC;AACH"}
package/build/pure.d.ts CHANGED
@@ -1,26 +1,15 @@
1
- import act from './act';
2
- import cleanup from './cleanup';
3
- import fireEvent from './fireEvent';
4
- import render from './render';
5
- import waitFor from './waitFor';
6
- import waitForElementToBeRemoved from './waitForElementToBeRemoved';
7
- import { within, getQueriesForElement } from './within';
8
- import { getDefaultNormalizer } from './matches';
9
- import { renderHook } from './renderHook';
10
- import { screen } from './screen';
11
- import { isInaccessible } from './helpers/accessiblity';
1
+ export { default as act } from './act';
2
+ export { default as cleanup } from './cleanup';
3
+ export { default as fireEvent } from './fireEvent';
4
+ export { default as render } from './render';
5
+ export { default as waitFor } from './waitFor';
6
+ export { default as waitForElementToBeRemoved } from './waitForElementToBeRemoved';
7
+ export { within, getQueriesForElement } from './within';
8
+ export { configure, resetToDefaults } from './config';
9
+ export { isHiddenFromAccessibility, isInaccessible, } from './helpers/accessiblity';
10
+ export { getDefaultNormalizer } from './matches';
11
+ export { renderHook } from './renderHook';
12
+ export { screen } from './screen';
12
13
  export type { RenderOptions, RenderResult, RenderResult as RenderAPI, } from './render';
13
14
  export type { RenderHookOptions, RenderHookResult } from './renderHook';
14
15
  export type { Config } from './config';
15
- export { act };
16
- export { cleanup };
17
- export { configure, resetToDefaults } from './config';
18
- export { fireEvent };
19
- export { render };
20
- export { waitFor };
21
- export { waitForElementToBeRemoved };
22
- export { within, getQueriesForElement };
23
- export { getDefaultNormalizer };
24
- export { renderHook };
25
- export { screen };
26
- export { isInaccessible };
package/build/pure.js CHANGED
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "getQueriesForElement", {
39
39
  return _within.getQueriesForElement;
40
40
  }
41
41
  });
42
+ Object.defineProperty(exports, "isHiddenFromAccessibility", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _accessiblity.isHiddenFromAccessibility;
46
+ }
47
+ });
42
48
  Object.defineProperty(exports, "isInaccessible", {
43
49
  enumerable: true,
44
50
  get: function () {
@@ -87,30 +93,17 @@ Object.defineProperty(exports, "within", {
87
93
  return _within.within;
88
94
  }
89
95
  });
90
-
91
96
  var _act = _interopRequireDefault(require("./act"));
92
-
93
97
  var _cleanup = _interopRequireDefault(require("./cleanup"));
94
-
95
98
  var _fireEvent = _interopRequireDefault(require("./fireEvent"));
96
-
97
99
  var _render = _interopRequireDefault(require("./render"));
98
-
99
100
  var _waitFor = _interopRequireDefault(require("./waitFor"));
100
-
101
101
  var _waitForElementToBeRemoved = _interopRequireDefault(require("./waitForElementToBeRemoved"));
102
-
103
102
  var _within = require("./within");
104
-
103
+ var _config = require("./config");
104
+ var _accessiblity = require("./helpers/accessiblity");
105
105
  var _matches = require("./matches");
106
-
107
106
  var _renderHook = require("./renderHook");
108
-
109
107
  var _screen = require("./screen");
110
-
111
- var _accessiblity = require("./helpers/accessiblity");
112
-
113
- var _config = require("./config");
114
-
115
108
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
116
109
  //# sourceMappingURL=pure.js.map
package/build/pure.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pure.js","names":[],"sources":["../src/pure.ts"],"sourcesContent":["import act from './act';\nimport cleanup from './cleanup';\nimport fireEvent from './fireEvent';\nimport render from './render';\nimport waitFor from './waitFor';\nimport waitForElementToBeRemoved from './waitForElementToBeRemoved';\nimport { within, getQueriesForElement } from './within';\nimport { getDefaultNormalizer } from './matches';\nimport { renderHook } from './renderHook';\nimport { screen } from './screen';\nimport { isInaccessible } from './helpers/accessiblity';\n\nexport type {\n RenderOptions,\n RenderResult,\n RenderResult as RenderAPI,\n} from './render';\nexport type { RenderHookOptions, RenderHookResult } from './renderHook';\nexport type { Config } from './config';\n\nexport { act };\nexport { cleanup };\nexport { configure, resetToDefaults } from './config';\nexport { fireEvent };\nexport { render };\nexport { waitFor };\nexport { waitForElementToBeRemoved };\nexport { within, getQueriesForElement };\nexport { getDefaultNormalizer };\nexport { renderHook };\nexport { screen };\nexport { isInaccessible };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAYA"}
1
+ {"version":3,"file":"pure.js","names":[],"sources":["../src/pure.ts"],"sourcesContent":["export { default as act } from './act';\nexport { default as cleanup } from './cleanup';\nexport { default as fireEvent } from './fireEvent';\nexport { default as render } from './render';\nexport { default as waitFor } from './waitFor';\nexport { default as waitForElementToBeRemoved } from './waitForElementToBeRemoved';\nexport { within, getQueriesForElement } from './within';\n\nexport { configure, resetToDefaults } from './config';\nexport {\n isHiddenFromAccessibility,\n isInaccessible,\n} from './helpers/accessiblity';\nexport { getDefaultNormalizer } from './matches';\nexport { renderHook } from './renderHook';\nexport { screen } from './screen';\n\nexport type {\n RenderOptions,\n RenderResult,\n RenderResult as RenderAPI,\n} from './render';\nexport type { RenderHookOptions, RenderHookResult } from './renderHook';\nexport type { Config } from './config';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AACA;AAAkC"}
@@ -1,18 +1,19 @@
1
1
  import type { ReactTestInstance } from 'react-test-renderer';
2
- import type { AccessibilityState } from 'react-native';
2
+ import { AccessibilityState } from 'react-native';
3
3
  import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './makeQueries';
4
- export declare type ByA11yStateQueries = {
5
- getByA11yState: GetByQuery<AccessibilityState>;
6
- getAllByA11yState: GetAllByQuery<AccessibilityState>;
7
- queryByA11yState: QueryByQuery<AccessibilityState>;
8
- queryAllByA11yState: QueryAllByQuery<AccessibilityState>;
9
- findByA11yState: FindByQuery<AccessibilityState>;
10
- findAllByA11yState: FindAllByQuery<AccessibilityState>;
11
- getByAccessibilityState: GetByQuery<AccessibilityState>;
12
- getAllByAccessibilityState: GetAllByQuery<AccessibilityState>;
13
- queryByAccessibilityState: QueryByQuery<AccessibilityState>;
14
- queryAllByAccessibilityState: QueryAllByQuery<AccessibilityState>;
15
- findByAccessibilityState: FindByQuery<AccessibilityState>;
16
- findAllByAccessibilityState: FindAllByQuery<AccessibilityState>;
4
+ import { CommonQueryOptions } from './options';
5
+ export type ByA11yStateQueries = {
6
+ getByA11yState: GetByQuery<AccessibilityState, CommonQueryOptions>;
7
+ getAllByA11yState: GetAllByQuery<AccessibilityState, CommonQueryOptions>;
8
+ queryByA11yState: QueryByQuery<AccessibilityState, CommonQueryOptions>;
9
+ queryAllByA11yState: QueryAllByQuery<AccessibilityState, CommonQueryOptions>;
10
+ findByA11yState: FindByQuery<AccessibilityState, CommonQueryOptions>;
11
+ findAllByA11yState: FindAllByQuery<AccessibilityState, CommonQueryOptions>;
12
+ getByAccessibilityState: GetByQuery<AccessibilityState, CommonQueryOptions>;
13
+ getAllByAccessibilityState: GetAllByQuery<AccessibilityState, CommonQueryOptions>;
14
+ queryByAccessibilityState: QueryByQuery<AccessibilityState, CommonQueryOptions>;
15
+ queryAllByAccessibilityState: QueryAllByQuery<AccessibilityState, CommonQueryOptions>;
16
+ findByAccessibilityState: FindByQuery<AccessibilityState, CommonQueryOptions>;
17
+ findAllByAccessibilityState: FindAllByQuery<AccessibilityState, CommonQueryOptions>;
17
18
  };
18
19
  export declare const bindByA11yStateQueries: (instance: ReactTestInstance) => ByA11yStateQueries;