@@ -40,29 +40,37 @@ export type QueryByText<T extends HTMLElement = HTMLElement> = (
40
40
options ?: SelectorMatcherOptions ,
41
41
) => T | null
42
42
43
+ export interface ByTextOptions extends SelectorMatcherOptions {
44
+ /**
45
+ * If true exclude elements in the query set that are usually excluded from
46
+ * the accessibility tree.
47
+ */
48
+ excludeHidden ?: boolean
49
+ }
50
+
43
51
export type AllByText < T extends HTMLElement = HTMLElement > = (
44
52
container : HTMLElement ,
45
53
id : Matcher ,
46
- options ?: SelectorMatcherOptions ,
54
+ options ?: ByTextOptions ,
47
55
) => T [ ]
48
56
49
57
export type FindAllByText < T extends HTMLElement = HTMLElement > = (
50
58
container : HTMLElement ,
51
59
id : Matcher ,
52
- options ?: SelectorMatcherOptions ,
60
+ options ?: ByTextOptions ,
53
61
waitForElementOptions ?: waitForOptions ,
54
62
) => Promise < T [ ] >
55
63
56
64
export type GetByText < T extends HTMLElement = HTMLElement > = (
57
65
container : HTMLElement ,
58
66
id : Matcher ,
59
- options ?: SelectorMatcherOptions ,
67
+ options ?: ByTextOptions ,
60
68
) => T
61
69
62
70
export type FindByText < T extends HTMLElement = HTMLElement > = (
63
71
container : HTMLElement ,
64
72
id : Matcher ,
65
- options ?: SelectorMatcherOptions ,
73
+ options ?: ByTextOptions ,
66
74
waitForElementOptions ?: waitForOptions ,
67
75
) => Promise < T >
68
76
0 commit comments