1
1
import { Matcher , MatcherOptions } from './matches'
2
2
import { SelectorMatcherOptions } from './query-helpers'
3
+ import { WaitForElementOptions } from './wait-for-element'
3
4
4
5
export type QueryByBoundAttribute = (
5
6
container : HTMLElement ,
@@ -13,12 +14,26 @@ export type AllByBoundAttribute = (
13
14
options ?: MatcherOptions ,
14
15
) => HTMLElement [ ]
15
16
17
+ export type FindAllByBoundAttribute = (
18
+ container : HTMLElement ,
19
+ id : Matcher ,
20
+ options ?: MatcherOptions ,
21
+ waitForElementOptions ?: WaitForElementOptions
22
+ ) => Promise < HTMLElement [ ] > | Error
23
+
16
24
export type GetByBoundAttribute = (
17
25
container : HTMLElement ,
18
26
id : Matcher ,
19
27
options ?: MatcherOptions ,
20
28
) => HTMLElement
21
29
30
+ export type FindByBoundAttribute = (
31
+ container : HTMLElement ,
32
+ id : Matcher ,
33
+ options ?: MatcherOptions ,
34
+ waitForElementOptions ?: WaitForElementOptions
35
+ ) => Promise < HTMLElement > | Error
36
+
22
37
export type QueryByText = (
23
38
container : HTMLElement ,
24
39
id : Matcher ,
@@ -31,49 +46,79 @@ export type AllByText = (
31
46
options ?: SelectorMatcherOptions ,
32
47
) => HTMLElement [ ]
33
48
49
+ export type FindAllByText = (
50
+ container : HTMLElement ,
51
+ id : Matcher ,
52
+ options ?: SelectorMatcherOptions ,
53
+ waitForElementOptions ?: WaitForElementOptions
54
+ ) => Promise < HTMLElement [ ] > | Error
55
+
34
56
export type GetByText = (
35
57
container : HTMLElement ,
36
58
id : Matcher ,
37
59
options ?: SelectorMatcherOptions ,
38
60
) => HTMLElement
39
61
40
- export const queryByPlaceholderText : QueryByBoundAttribute
41
- export const queryAllByPlaceholderText : AllByBoundAttribute
62
+ export type FindByText = (
63
+ container : HTMLElement ,
64
+ id : Matcher ,
65
+ options ?: SelectorMatcherOptions ,
66
+ waitForElementOptions ?: WaitForElementOptions
67
+ ) => Promise < HTMLElement > | Error
68
+
69
+ export const getByLabelText : GetByText
70
+ export const getAllByLabelText : AllByText
71
+ export const queryByLabelText : QueryByText
72
+ export const queryAllByLabelText : AllByText
73
+ export const findByLabelText : FindByText
74
+ export const findAllByLabelText : FindAllByText
42
75
export const getByPlaceholderText : GetByBoundAttribute
43
76
export const getAllByPlaceholderText : AllByBoundAttribute
44
- export const queryBySelectText : QueryByBoundAttribute
45
- export const queryAllBySelectText : AllByBoundAttribute
46
- export const getBySelectText : GetByBoundAttribute
47
- export const getAllBySelectText : AllByBoundAttribute
48
- export const queryByText : QueryByText
49
- export const queryAllByText : AllByText
77
+ export const queryByPlaceholderText : QueryByBoundAttribute
78
+ export const queryAllByPlaceholderText : AllByBoundAttribute
79
+ export const findByPlaceholderText : FindByBoundAttribute
80
+ export const findAllByPlaceholderText : FindAllByBoundAttribute
50
81
export const getByText : GetByText
51
82
export const getAllByText : AllByText
52
- export const queryByLabelText : QueryByText
53
- export const queryAllByLabelText : AllByText
54
- export const getByLabelText : GetByText
55
- export const getAllByLabelText : AllByText
56
- export const queryByAltText : QueryByBoundAttribute
57
- export const queryAllByAltText : AllByBoundAttribute
83
+ export const queryByText : QueryByText
84
+ export const queryAllByText : AllByText
85
+ export const findByText : FindByText
86
+ export const findAllByText : FindAllByText
58
87
export const getByAltText : GetByBoundAttribute
59
88
export const getAllByAltText : AllByBoundAttribute
60
- export const queryByTestId : QueryByBoundAttribute
61
- export const queryAllByTestId : AllByBoundAttribute
62
- export const getByTestId : GetByBoundAttribute
63
- export const getAllByTestId : AllByBoundAttribute
64
- export const queryByTitle : QueryByBoundAttribute
65
- export const queryAllByTitle : AllByBoundAttribute
89
+ export const queryByAltText : QueryByBoundAttribute
90
+ export const queryAllByAltText : AllByBoundAttribute
91
+ export const findByAltText : FindByBoundAttribute
92
+ export const findAllByAltText : FindAllByBoundAttribute
66
93
export const getByTitle : GetByBoundAttribute
67
94
export const getAllByTitle : AllByBoundAttribute
68
- export const queryByValue : QueryByBoundAttribute
69
- export const queryAllByValue : AllByBoundAttribute
70
- export const getByValue : GetByBoundAttribute
71
- export const getAllByValue : AllByBoundAttribute
72
- export const queryByDisplayValue : QueryByBoundAttribute
73
- export const queryAllByDisplayValue : AllByBoundAttribute
95
+ export const queryByTitle : QueryByBoundAttribute
96
+ export const queryAllByTitle : AllByBoundAttribute
97
+ export const findByTitle : FindByBoundAttribute
98
+ export const findAllByTitle : FindAllByBoundAttribute
74
99
export const getByDisplayValue : GetByBoundAttribute
75
100
export const getAllByDisplayValue : AllByBoundAttribute
76
- export const queryByRole : QueryByBoundAttribute
77
- export const queryAllByRole : AllByBoundAttribute
101
+ export const queryByDisplayValue : QueryByBoundAttribute
102
+ export const queryAllByDisplayValue : AllByBoundAttribute
103
+ export const findByDisplayValue : FindByBoundAttribute
104
+ export const findAllByDisplayValue : FindAllByBoundAttribute
78
105
export const getByRole : GetByBoundAttribute
79
106
export const getAllByRole : AllByBoundAttribute
107
+ export const queryByRole : QueryByBoundAttribute
108
+ export const queryAllByRole : AllByBoundAttribute
109
+ export const findByRole : FindByBoundAttribute
110
+ export const findAllByRole : FindAllByBoundAttribute
111
+ export const getByTestId : GetByBoundAttribute
112
+ export const getAllByTestId : AllByBoundAttribute
113
+ export const queryByTestId : QueryByBoundAttribute
114
+ export const queryAllByTestId : AllByBoundAttribute
115
+ export const findByTestId : FindByBoundAttribute
116
+ export const findAllByTestId : FindAllByBoundAttribute
117
+ export const getBySelectText : GetByBoundAttribute
118
+ export const getAllBySelectText : AllByBoundAttribute
119
+ export const queryBySelectText : QueryByBoundAttribute
120
+ export const queryAllBySelectText : AllByBoundAttribute
121
+ export const getByValue : GetByBoundAttribute
122
+ export const getAllByValue : AllByBoundAttribute
123
+ export const queryByValue : QueryByBoundAttribute
124
+ export const queryAllByValue : AllByBoundAttribute
0 commit comments