1
1
import {
2
+ ByRoleOptions as ByRoleOptions_ ,
2
3
Matcher ,
3
4
MatcherOptions as MatcherOptions_ ,
4
5
SelectorMatcherOptions as SelectorMatcherOptions_ ,
@@ -10,16 +11,7 @@ type Element = ElementHandle
10
11
11
12
type MatcherOptions = Omit < MatcherOptions_ , 'normalizer' >
12
13
type SelectorMatcherOptions = Omit < SelectorMatcherOptions_ , 'normalizer' >
13
-
14
- // tslint:disable-next-line
15
- interface RoleMatcherOptions extends MatcherOptions {
16
- name ?: string | RegExp
17
- }
18
-
19
- // tslint:disable-next-line
20
- interface SelectorRoleMatcherOptions extends SelectorMatcherOptions {
21
- name ?: string | RegExp
22
- }
14
+ type ByRoleOptions = Omit < ByRoleOptions_ , 'normalizer' >
23
15
24
16
interface IQueryMethods {
25
17
queryByPlaceholderText ( el : Element , m : Matcher , opts ?: MatcherOptions ) : Promise < Element | null >
@@ -124,20 +116,20 @@ interface IQueryMethods {
124
116
waitForOpts ?: waitForOptions ,
125
117
) : Promise < Element [ ] >
126
118
127
- queryByRole ( el : Element , m : Matcher , opts ?: RoleMatcherOptions ) : Promise < Element | null >
128
- queryAllByRole ( el : Element , m : Matcher , opts ?: RoleMatcherOptions ) : Promise < Element [ ] >
129
- getByRole ( el : Element , m : Matcher , opts ?: RoleMatcherOptions ) : Promise < Element >
130
- getAllByRole ( el : Element , m : Matcher , opts ?: RoleMatcherOptions ) : Promise < Element [ ] >
119
+ queryByRole ( el : Element , m : Matcher , opts ?: ByRoleOptions ) : Promise < Element | null >
120
+ queryAllByRole ( el : Element , m : Matcher , opts ?: ByRoleOptions ) : Promise < Element [ ] >
121
+ getByRole ( el : Element , m : Matcher , opts ?: ByRoleOptions ) : Promise < Element >
122
+ getAllByRole ( el : Element , m : Matcher , opts ?: ByRoleOptions ) : Promise < Element [ ] >
131
123
findByRole (
132
124
el : Element ,
133
125
m : Matcher ,
134
- opts ?: SelectorRoleMatcherOptions ,
126
+ opts ?: ByRoleOptions ,
135
127
waitForOpts ?: waitForOptions ,
136
128
) : Promise < Element >
137
129
findAllByRole (
138
130
el : Element ,
139
131
m : Matcher ,
140
- opts ?: SelectorRoleMatcherOptions ,
132
+ opts ?: ByRoleOptions ,
141
133
waitForOpts ?: waitForOptions ,
142
134
) : Promise < Element [ ] >
143
135
0 commit comments