@gtkx/testing 1.0.0-rc.4 → 1.0.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.
- package/README.md +5 -5
- package/dist/accessible-native.d.ts +16 -0
- package/dist/accessible-native.d.ts.map +1 -0
- package/dist/accessible-native.js +206 -0
- package/dist/accessible-native.js.map +1 -0
- package/dist/build-queries.d.ts +27 -10
- package/dist/build-queries.d.ts.map +1 -1
- package/dist/build-queries.js +22 -24
- package/dist/build-queries.js.map +1 -1
- package/dist/cleanup-registry.d.ts +1 -1
- package/dist/cleanup-registry.d.ts.map +1 -1
- package/dist/cleanup-registry.js.map +1 -1
- package/dist/errors.d.ts +10 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +10 -1
- package/dist/errors.js.map +1 -1
- package/dist/fire-event.d.ts +35 -6
- package/dist/fire-event.d.ts.map +1 -1
- package/dist/fire-event.js +23 -7
- package/dist/fire-event.js.map +1 -1
- package/dist/frame-sync.d.ts +2 -1
- package/dist/frame-sync.d.ts.map +1 -1
- package/dist/frame-sync.js +15 -5
- package/dist/frame-sync.js.map +1 -1
- package/dist/harness-window.d.ts +4 -0
- package/dist/harness-window.d.ts.map +1 -0
- package/dist/harness-window.js +6 -0
- package/dist/harness-window.js.map +1 -0
- package/dist/index.d.ts +14 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +4 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +4 -0
- package/dist/internal.js.map +1 -0
- package/dist/matchers.d.ts +88 -46
- package/dist/matchers.d.ts.map +1 -1
- package/dist/matchers.js +156 -18
- package/dist/matchers.js.map +1 -1
- package/dist/pretty-format.d.ts +2 -0
- package/dist/pretty-format.d.ts.map +1 -0
- package/dist/pretty-format.js +2 -0
- package/dist/pretty-format.js.map +1 -0
- package/dist/pretty-widget.d.ts +5 -2
- package/dist/pretty-widget.d.ts.map +1 -1
- package/dist/pretty-widget.js +73 -56
- package/dist/pretty-widget.js.map +1 -1
- package/dist/production.d.ts +8 -0
- package/dist/production.d.ts.map +1 -0
- package/dist/production.js +34 -0
- package/dist/production.js.map +1 -0
- package/dist/queries.d.ts +98 -56
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +123 -83
- package/dist/queries.js.map +1 -1
- package/dist/query-helpers.d.ts +44 -0
- package/dist/query-helpers.d.ts.map +1 -0
- package/dist/query-helpers.js +57 -0
- package/dist/query-helpers.js.map +1 -0
- package/dist/render-children.d.ts +9 -0
- package/dist/render-children.d.ts.map +1 -0
- package/dist/render-children.js +11 -0
- package/dist/render-children.js.map +1 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +11 -9
- package/dist/render.js.map +1 -1
- package/dist/role-helpers.d.ts +12 -3
- package/dist/role-helpers.d.ts.map +1 -1
- package/dist/role-helpers.js +13 -4
- package/dist/role-helpers.js.map +1 -1
- package/dist/role-naming.d.ts +5 -0
- package/dist/role-naming.d.ts.map +1 -0
- package/dist/role-naming.js +96 -0
- package/dist/role-naming.js.map +1 -0
- package/dist/screenshot.d.ts +12 -20
- package/dist/screenshot.d.ts.map +1 -1
- package/dist/screenshot.js +183 -91
- package/dist/screenshot.js.map +1 -1
- package/dist/traversal.d.ts +4 -1
- package/dist/traversal.d.ts.map +1 -1
- package/dist/traversal.js +25 -6
- package/dist/traversal.js.map +1 -1
- package/dist/types.d.ts +26 -14
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/user-event/adjustment.d.ts +3 -0
- package/dist/user-event/adjustment.d.ts.map +1 -1
- package/dist/user-event/adjustment.js +23 -2
- package/dist/user-event/adjustment.js.map +1 -1
- package/dist/user-event/click.d.ts +43 -8
- package/dist/user-event/click.d.ts.map +1 -1
- package/dist/user-event/click.js +175 -44
- package/dist/user-event/click.js.map +1 -1
- package/dist/user-event/column-header-click.d.ts +4 -0
- package/dist/user-event/column-header-click.d.ts.map +1 -0
- package/dist/user-event/column-header-click.js +65 -0
- package/dist/user-event/column-header-click.js.map +1 -0
- package/dist/user-event/event-wrapper.d.ts.map +1 -1
- package/dist/user-event/event-wrapper.js +2 -1
- package/dist/user-event/event-wrapper.js.map +1 -1
- package/dist/user-event/index.d.ts +51 -10
- package/dist/user-event/index.d.ts.map +1 -1
- package/dist/user-event/index.js +43 -26
- package/dist/user-event/index.js.map +1 -1
- package/dist/user-event/indexed-children.d.ts +10 -0
- package/dist/user-event/indexed-children.d.ts.map +1 -0
- package/dist/user-event/indexed-children.js +50 -0
- package/dist/user-event/indexed-children.js.map +1 -0
- package/dist/user-event/keyboard.d.ts.map +1 -1
- package/dist/user-event/keyboard.js +33 -4
- package/dist/user-event/keyboard.js.map +1 -1
- package/dist/user-event/list-row-click.d.ts +4 -0
- package/dist/user-event/list-row-click.d.ts.map +1 -0
- package/dist/user-event/list-row-click.js +39 -0
- package/dist/user-event/list-row-click.js.map +1 -0
- package/dist/user-event/native-click.d.ts +6 -0
- package/dist/user-event/native-click.d.ts.map +1 -0
- package/dist/user-event/native-click.js +32 -0
- package/dist/user-event/native-click.js.map +1 -0
- package/dist/user-event/pointer.d.ts +1 -1
- package/dist/user-event/pointer.d.ts.map +1 -1
- package/dist/user-event/pointer.js +33 -9
- package/dist/user-event/pointer.js.map +1 -1
- package/dist/user-event/selection.d.ts +11 -8
- package/dist/user-event/selection.d.ts.map +1 -1
- package/dist/user-event/selection.js +49 -38
- package/dist/user-event/selection.js.map +1 -1
- package/dist/user-event/text.d.ts +6 -2
- package/dist/user-event/text.d.ts.map +1 -1
- package/dist/user-event/text.js +68 -18
- package/dist/user-event/text.js.map +1 -1
- package/dist/widget-accessible-properties.d.ts +14 -26
- package/dist/widget-accessible-properties.d.ts.map +1 -1
- package/dist/widget-accessible-properties.js +135 -190
- package/dist/widget-accessible-properties.js.map +1 -1
- package/dist/widget-getters.d.ts +8 -0
- package/dist/widget-getters.d.ts.map +1 -0
- package/dist/widget-getters.js +19 -0
- package/dist/widget-getters.js.map +1 -0
- package/dist/within.d.ts +3 -2
- package/dist/within.d.ts.map +1 -1
- package/dist/within.js +3 -2
- package/dist/within.js.map +1 -1
- package/package.json +12 -7
- package/src/accessible-native.ts +333 -0
- package/src/build-queries.ts +47 -41
- package/src/cleanup-registry.ts +1 -1
- package/src/errors.ts +12 -1
- package/src/fire-event.ts +61 -8
- package/src/frame-sync.ts +21 -5
- package/src/harness-window.ts +9 -0
- package/src/index.ts +18 -11
- package/src/internal.ts +11 -0
- package/src/matchers.ts +428 -70
- package/src/pretty-format.ts +1 -0
- package/src/pretty-widget.ts +97 -70
- package/src/production.ts +52 -0
- package/src/queries.ts +127 -89
- package/src/query-helpers.ts +97 -0
- package/src/render-children.ts +25 -0
- package/src/render.tsx +16 -11
- package/src/role-helpers.ts +14 -4
- package/src/role-naming.ts +99 -0
- package/src/screenshot.ts +272 -103
- package/src/traversal.ts +44 -6
- package/src/types.ts +28 -16
- package/src/user-event/adjustment.ts +29 -2
- package/src/user-event/click.ts +247 -52
- package/src/user-event/column-header-click.ts +90 -0
- package/src/user-event/event-wrapper.ts +3 -1
- package/src/user-event/index.ts +100 -37
- package/src/user-event/indexed-children.ts +75 -0
- package/src/user-event/keyboard.ts +52 -4
- package/src/user-event/list-row-click.ts +57 -0
- package/src/user-event/native-click.ts +46 -0
- package/src/user-event/pointer.ts +48 -9
- package/src/user-event/selection.ts +67 -41
- package/src/user-event/text.ts +92 -21
- package/src/widget-accessible-properties.ts +183 -230
- package/src/widget-getters.ts +32 -0
- package/src/within.ts +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"production.js","sourceRoot":"","sources":["../src/production.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAa,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAW1D,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,aAAa,GAAsB,IAAI,GAAG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/gi/gtk\";\nimport type { ReactNode } from \"react\";\nimport { createRoot, type Root } from \"@gtkx/react\";\nimport { createHarnessWindow } from \"./harness-window.js\";\n\ntype ProductionRenderResult = {\n rerender: (element: ReactNode) => Promise<void>;\n};\n\ntype ActiveRender = {\n root: Root;\n window: Gtk.Window;\n};\n\nconst SETTLE_TURNS = 3;\nconst activeRenders: Set<ActiveRender> = new Set();\n\nconst turn = (): Promise<void> => new Promise((resolve) => setTimeout(resolve, 0));\n\nconst settle = async (): Promise<void> => {\n for (let index = 0; index < SETTLE_TURNS; index++) {\n await turn();\n }\n};\n\nconst render = async (element: ReactNode): Promise<ProductionRenderResult> => {\n const window = createHarnessWindow();\n const root = createRoot(window);\n activeRenders.add({ root, window });\n root.render(element);\n window.present();\n await settle();\n\n return {\n rerender: async (next: ReactNode): Promise<void> => {\n root.render(next);\n await settle();\n },\n };\n};\n\nconst cleanup = async (): Promise<void> => {\n for (const active of activeRenders) {\n active.root.unmount();\n active.window.destroy();\n }\n\n activeRenders.clear();\n await settle();\n};\n\nexport { cleanup, render };\n"]}
|
package/dist/queries.d.ts
CHANGED
|
@@ -5,125 +5,167 @@ import { type Container } from "./traversal.js";
|
|
|
5
5
|
type BuiltinQueries = QueryFamilies<[container: Container]>;
|
|
6
6
|
declare const builtinQueries: BuiltinQueries;
|
|
7
7
|
/**
|
|
8
|
-
* Returns the single widget with a matching accessible role and options, or null when none
|
|
9
|
-
* Throws when more than one matches.
|
|
8
|
+
* Returns the single mapped widget with a matching accessible role and options, or null when none
|
|
9
|
+
* match. Widgets that are not mapped are never matched. Throws when more than one matches.
|
|
10
10
|
*/
|
|
11
11
|
declare const queryByRole: BuiltinQueries["queryByRole"];
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Returns every mapped widget with a matching accessible role and options. Widgets that are not
|
|
14
|
+
* mapped are never matched. Throws when none match.
|
|
15
|
+
*/
|
|
13
16
|
declare const getAllByRole: BuiltinQueries["getAllByRole"];
|
|
14
17
|
/**
|
|
15
|
-
* Returns the single widget with a matching accessible role and options.
|
|
16
|
-
* Throws when none or more than one matches.
|
|
18
|
+
* Returns the single mapped widget with a matching accessible role and options. Widgets that are not
|
|
19
|
+
* mapped are never matched. Throws when none or more than one matches.
|
|
17
20
|
*/
|
|
18
21
|
declare const getByRole: BuiltinQueries["getByRole"];
|
|
19
22
|
/**
|
|
20
|
-
* Waits for and returns every widget with a matching accessible role and options, retrying
|
|
21
|
-
* least one appears or the timeout elapses.
|
|
23
|
+
* Waits for and returns every mapped widget with a matching accessible role and options, retrying
|
|
24
|
+
* until at least one appears or the timeout elapses. Widgets that are not mapped are never matched.
|
|
22
25
|
*/
|
|
23
26
|
declare const findAllByRole: BuiltinQueries["findAllByRole"];
|
|
24
27
|
/**
|
|
25
|
-
* Waits for and returns the single widget with a matching accessible role and options,
|
|
26
|
-
* until it appears or the timeout elapses.
|
|
28
|
+
* Waits for and returns the single mapped widget with a matching accessible role and options,
|
|
29
|
+
* retrying until it appears or the timeout elapses. Widgets that are not mapped are never matched.
|
|
30
|
+
* Rejects when none or more than one matches.
|
|
27
31
|
*/
|
|
28
32
|
declare const findByRole: BuiltinQueries["findByRole"];
|
|
29
33
|
/**
|
|
30
|
-
* Returns the single widget with matching associated label text, or null when none match.
|
|
31
|
-
* Throws when more than one matches.
|
|
34
|
+
* Returns the single mapped widget with matching associated label text, or null when none match.
|
|
35
|
+
* Widgets that are not mapped are never matched. Throws when more than one matches.
|
|
32
36
|
*/
|
|
33
37
|
declare const queryByLabelText: BuiltinQueries["queryByLabelText"];
|
|
34
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Returns every mapped widget with matching associated label text. Widgets that are not mapped are
|
|
40
|
+
* never matched. Throws when none match.
|
|
41
|
+
*/
|
|
35
42
|
declare const getAllByLabelText: BuiltinQueries["getAllByLabelText"];
|
|
36
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Returns the single mapped widget with matching associated label text. Widgets that are not mapped
|
|
45
|
+
* are never matched. Throws when none or more than one matches.
|
|
46
|
+
*/
|
|
37
47
|
declare const getByLabelText: BuiltinQueries["getByLabelText"];
|
|
38
48
|
/**
|
|
39
|
-
* Waits for and returns every widget with matching associated label text, retrying until at
|
|
40
|
-
* one appears or the timeout elapses.
|
|
49
|
+
* Waits for and returns every mapped widget with matching associated label text, retrying until at
|
|
50
|
+
* least one appears or the timeout elapses. Widgets that are not mapped are never matched.
|
|
41
51
|
*/
|
|
42
52
|
declare const findAllByLabelText: BuiltinQueries["findAllByLabelText"];
|
|
43
53
|
/**
|
|
44
|
-
* Waits for and returns the single widget with matching associated label text, retrying until
|
|
45
|
-
* appears or the timeout elapses.
|
|
54
|
+
* Waits for and returns the single mapped widget with matching associated label text, retrying until
|
|
55
|
+
* it appears or the timeout elapses. Widgets that are not mapped are never matched. Rejects when
|
|
56
|
+
* none or more than one matches.
|
|
46
57
|
*/
|
|
47
58
|
declare const findByLabelText: BuiltinQueries["findByLabelText"];
|
|
48
59
|
/**
|
|
49
|
-
* Returns the single widget with matching rendered text content, or null when none match.
|
|
50
|
-
* Throws when more than one matches.
|
|
60
|
+
* Returns the single mapped widget with matching rendered text content, or null when none match.
|
|
61
|
+
* Widgets that are not mapped are never matched. Throws when more than one matches.
|
|
51
62
|
*/
|
|
52
63
|
declare const queryByText: BuiltinQueries["queryByText"];
|
|
53
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Returns every mapped widget with matching rendered text content. Widgets that are not mapped are
|
|
66
|
+
* never matched. Throws when none match.
|
|
67
|
+
*/
|
|
54
68
|
declare const getAllByText: BuiltinQueries["getAllByText"];
|
|
55
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Returns the single mapped widget with matching rendered text content. Widgets that are not mapped
|
|
71
|
+
* are never matched. Throws when none or more than one matches.
|
|
72
|
+
*/
|
|
56
73
|
declare const getByText: BuiltinQueries["getByText"];
|
|
57
74
|
/**
|
|
58
|
-
* Waits for and returns every widget with matching rendered text content, retrying until at
|
|
59
|
-
* one appears or the timeout elapses.
|
|
75
|
+
* Waits for and returns every mapped widget with matching rendered text content, retrying until at
|
|
76
|
+
* least one appears or the timeout elapses. Widgets that are not mapped are never matched.
|
|
60
77
|
*/
|
|
61
78
|
declare const findAllByText: BuiltinQueries["findAllByText"];
|
|
62
79
|
/**
|
|
63
|
-
* Waits for and returns the single widget with matching rendered text content, retrying until
|
|
64
|
-
* appears or the timeout elapses.
|
|
80
|
+
* Waits for and returns the single mapped widget with matching rendered text content, retrying until
|
|
81
|
+
* it appears or the timeout elapses. Widgets that are not mapped are never matched. Rejects when
|
|
82
|
+
* none or more than one matches.
|
|
65
83
|
*/
|
|
66
84
|
declare const findByText: BuiltinQueries["findByText"];
|
|
67
85
|
/**
|
|
68
|
-
* Returns the single widget with a matching widget name, or null when none match.
|
|
69
|
-
* Throws when more than one matches.
|
|
86
|
+
* Returns the single mapped widget with a matching widget name, or null when none match. Widgets
|
|
87
|
+
* that are not mapped are never matched. Throws when more than one matches.
|
|
70
88
|
*/
|
|
71
89
|
declare const queryByName: BuiltinQueries["queryByName"];
|
|
72
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Returns every mapped widget with a matching widget name. Widgets that are not mapped are never
|
|
92
|
+
* matched. Throws when none match.
|
|
93
|
+
*/
|
|
73
94
|
declare const getAllByName: BuiltinQueries["getAllByName"];
|
|
74
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Returns the single mapped widget with a matching widget name. Widgets that are not mapped are
|
|
97
|
+
* never matched. Throws when none or more than one matches.
|
|
98
|
+
*/
|
|
75
99
|
declare const getByName: BuiltinQueries["getByName"];
|
|
76
100
|
/**
|
|
77
|
-
* Waits for and returns every widget with a matching widget name, retrying until at least one
|
|
78
|
-
* appears or the timeout elapses.
|
|
101
|
+
* Waits for and returns every mapped widget with a matching widget name, retrying until at least one
|
|
102
|
+
* appears or the timeout elapses. Widgets that are not mapped are never matched.
|
|
79
103
|
*/
|
|
80
104
|
declare const findAllByName: BuiltinQueries["findAllByName"];
|
|
81
105
|
/**
|
|
82
|
-
* Waits for and returns the single widget with a matching widget name, retrying until it
|
|
83
|
-
* the timeout elapses.
|
|
106
|
+
* Waits for and returns the single mapped widget with a matching widget name, retrying until it
|
|
107
|
+
* appears or the timeout elapses. Widgets that are not mapped are never matched. Rejects when none
|
|
108
|
+
* or more than one matches.
|
|
84
109
|
*/
|
|
85
110
|
declare const findByName: BuiltinQueries["findByName"];
|
|
86
111
|
/**
|
|
87
|
-
* Returns the single widget with matching placeholder text, or null when none match.
|
|
88
|
-
* Throws when more than one matches.
|
|
112
|
+
* Returns the single mapped widget with matching placeholder text, or null when none match. Widgets
|
|
113
|
+
* that are not mapped are never matched. Throws when more than one matches.
|
|
89
114
|
*/
|
|
90
115
|
declare const queryByPlaceholderText: BuiltinQueries["queryByPlaceholderText"];
|
|
91
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Returns every mapped widget with matching placeholder text. Widgets that are not mapped are never
|
|
118
|
+
* matched. Throws when none match.
|
|
119
|
+
*/
|
|
92
120
|
declare const getAllByPlaceholderText: BuiltinQueries["getAllByPlaceholderText"];
|
|
93
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Returns the single mapped widget with matching placeholder text. Widgets that are not mapped are
|
|
123
|
+
* never matched. Throws when none or more than one matches.
|
|
124
|
+
*/
|
|
94
125
|
declare const getByPlaceholderText: BuiltinQueries["getByPlaceholderText"];
|
|
95
126
|
/**
|
|
96
|
-
* Waits for and returns every widget with matching placeholder text, retrying until at least
|
|
97
|
-
* appears or the timeout elapses.
|
|
127
|
+
* Waits for and returns every mapped widget with matching placeholder text, retrying until at least
|
|
128
|
+
* one appears or the timeout elapses. Widgets that are not mapped are never matched.
|
|
98
129
|
*/
|
|
99
130
|
declare const findAllByPlaceholderText: BuiltinQueries["findAllByPlaceholderText"];
|
|
100
131
|
/**
|
|
101
|
-
* Waits for and returns the single widget with matching placeholder text, retrying until it
|
|
102
|
-
* or the timeout elapses.
|
|
132
|
+
* Waits for and returns the single mapped widget with matching placeholder text, retrying until it
|
|
133
|
+
* appears or the timeout elapses. Widgets that are not mapped are never matched. Rejects when none
|
|
134
|
+
* or more than one matches.
|
|
103
135
|
*/
|
|
104
136
|
declare const findByPlaceholderText: BuiltinQueries["findByPlaceholderText"];
|
|
105
137
|
/**
|
|
106
|
-
* Returns the single widget with a matching display value, or null when none match.
|
|
107
|
-
* Throws when more than one matches.
|
|
138
|
+
* Returns the single mapped widget with a matching display value, or null when none match. Widgets
|
|
139
|
+
* that are not mapped are never matched. Throws when more than one matches.
|
|
108
140
|
*/
|
|
109
141
|
declare const queryByDisplayValue: BuiltinQueries["queryByDisplayValue"];
|
|
110
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* Returns every mapped widget with a matching display value. Widgets that are not mapped are never
|
|
144
|
+
* matched. Throws when none match.
|
|
145
|
+
*/
|
|
111
146
|
declare const getAllByDisplayValue: BuiltinQueries["getAllByDisplayValue"];
|
|
112
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Returns the single mapped widget with a matching display value. Widgets that are not mapped are
|
|
149
|
+
* never matched. Throws when none or more than one matches.
|
|
150
|
+
*/
|
|
113
151
|
declare const getByDisplayValue: BuiltinQueries["getByDisplayValue"];
|
|
114
152
|
/**
|
|
115
|
-
* Waits for and returns every widget with a matching display value, retrying until at least
|
|
116
|
-
* appears or the timeout elapses.
|
|
153
|
+
* Waits for and returns every mapped widget with a matching display value, retrying until at least
|
|
154
|
+
* one appears or the timeout elapses. Widgets that are not mapped are never matched.
|
|
117
155
|
*/
|
|
118
156
|
declare const findAllByDisplayValue: BuiltinQueries["findAllByDisplayValue"];
|
|
119
157
|
/**
|
|
120
|
-
* Waits for and returns the single widget with a matching display value, retrying until it
|
|
121
|
-
* or the timeout elapses.
|
|
158
|
+
* Waits for and returns the single mapped widget with a matching display value, retrying until it
|
|
159
|
+
* appears or the timeout elapses. Widgets that are not mapped are never matched. Rejects when none
|
|
160
|
+
* or more than one matches.
|
|
122
161
|
*/
|
|
123
162
|
declare const findByDisplayValue: BuiltinQueries["findByDisplayValue"];
|
|
163
|
+
declare const isTextMatch: (actual: string | null, expected: Matcher, widget: Gtk.Widget, options?: MatcherOptions) => boolean;
|
|
164
|
+
declare const isMatchingWidgetType: (widget: Gtk.Widget, options?: MatcherOptions) => boolean;
|
|
124
165
|
/**
|
|
125
166
|
* Finds every widget under the container whose accessible role matches `role` and that satisfies the given options.
|
|
126
|
-
* Widgets excluded from the accessibility tree are
|
|
167
|
+
* Widgets that are not mapped are never matched, and widgets excluded from the accessibility tree are
|
|
168
|
+
* skipped unless `options.hidden` is set.
|
|
127
169
|
* @param container Widget subtree to search.
|
|
128
170
|
* @param role Accessible role to match.
|
|
129
171
|
* @param options Additional accessible name, state, and value constraints.
|
|
@@ -132,7 +174,7 @@ declare const findByDisplayValue: BuiltinQueries["findByDisplayValue"];
|
|
|
132
174
|
declare function queryAllByRole(container: Container, role: Gtk.AccessibleRole, options?: ByRoleOptions): Gtk.Widget[];
|
|
133
175
|
/**
|
|
134
176
|
* Finds every widget associated with a label whose text matches: a Gtk.Label mnemonic target, the
|
|
135
|
-
* widget's own accessible label, or its labelled-by relation.
|
|
177
|
+
* widget's own accessible label, or its labelled-by relation. Widgets that are not mapped are never matched.
|
|
136
178
|
* @param container Widget subtree to search.
|
|
137
179
|
* @param text Matcher for the label text.
|
|
138
180
|
* @param options Text matching options.
|
|
@@ -140,7 +182,7 @@ declare function queryAllByRole(container: Container, role: Gtk.AccessibleRole,
|
|
|
140
182
|
*/
|
|
141
183
|
declare function queryAllByLabelText(container: Container, text: Matcher, options?: MatcherOptions): Gtk.Widget[];
|
|
142
184
|
/**
|
|
143
|
-
* Finds every widget whose rendered text content matches.
|
|
185
|
+
* Finds every widget whose rendered text content matches. Widgets that are not mapped are never matched.
|
|
144
186
|
* @param container Widget subtree to search.
|
|
145
187
|
* @param text Matcher for the widget text.
|
|
146
188
|
* @param options Text matching options.
|
|
@@ -148,7 +190,7 @@ declare function queryAllByLabelText(container: Container, text: Matcher, option
|
|
|
148
190
|
*/
|
|
149
191
|
declare function queryAllByText(container: Container, text: Matcher, options?: MatcherOptions): Gtk.Widget[];
|
|
150
192
|
/**
|
|
151
|
-
* Finds every widget whose widget name matches.
|
|
193
|
+
* Finds every widget whose widget name matches. Widgets that are not mapped are never matched.
|
|
152
194
|
* @param container Widget subtree to search.
|
|
153
195
|
* @param name Matcher for the widget name.
|
|
154
196
|
* @param options Text matching options.
|
|
@@ -156,7 +198,7 @@ declare function queryAllByText(container: Container, text: Matcher, options?: M
|
|
|
156
198
|
*/
|
|
157
199
|
declare function queryAllByName(container: Container, name: Matcher, options?: MatcherOptions): Gtk.Widget[];
|
|
158
200
|
/**
|
|
159
|
-
* Finds every widget whose placeholder text matches.
|
|
201
|
+
* Finds every widget whose placeholder text matches. Widgets that are not mapped are never matched.
|
|
160
202
|
* @param container Widget subtree to search.
|
|
161
203
|
* @param text Matcher for the placeholder text.
|
|
162
204
|
* @param options Text matching options.
|
|
@@ -164,12 +206,12 @@ declare function queryAllByName(container: Container, name: Matcher, options?: M
|
|
|
164
206
|
*/
|
|
165
207
|
declare function queryAllByPlaceholderText(container: Container, text: Matcher, options?: MatcherOptions): Gtk.Widget[];
|
|
166
208
|
/**
|
|
167
|
-
* Finds every widget whose current display value matches.
|
|
209
|
+
* Finds every widget whose current display value matches. Widgets that are not mapped are never matched.
|
|
168
210
|
* @param container Widget subtree to search.
|
|
169
211
|
* @param value Matcher for the display value.
|
|
170
212
|
* @param options Text matching options.
|
|
171
213
|
* @returns Every matching widget, or an empty array when none match.
|
|
172
214
|
*/
|
|
173
215
|
declare function queryAllByDisplayValue(container: Container, value: Matcher, options?: MatcherOptions): Gtk.Widget[];
|
|
174
|
-
export { builtinQueries, queryByRole, getAllByRole, getByRole, findAllByRole, findByRole, queryByLabelText, getAllByLabelText, getByLabelText, findAllByLabelText, findByLabelText, queryByText, getAllByText, getByText, findAllByText, findByText, queryByName, getAllByName, getByName, findAllByName, findByName, queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText, queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue, queryAllByRole, queryAllByLabelText, queryAllByText, queryAllByName, queryAllByPlaceholderText, queryAllByDisplayValue,
|
|
216
|
+
export { builtinQueries, isMatchingWidgetType, isTextMatch, queryByRole, getAllByRole, getByRole, findAllByRole, findByRole, queryByLabelText, getAllByLabelText, getByLabelText, findAllByLabelText, findByLabelText, queryByText, getAllByText, getByText, findAllByText, findByText, queryByName, getAllByName, getByName, findAllByName, findByName, queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText, queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue, queryAllByRole, queryAllByLabelText, queryAllByText, queryAllByName, queryAllByPlaceholderText, queryAllByDisplayValue, };
|
|
175
217
|
//# sourceMappingURL=queries.d.ts.map
|
package/dist/queries.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EACR,aAAa,EAEb,OAAO,EACP,cAAc,EAEd,aAAa,EAChB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EACR,aAAa,EAEb,OAAO,EACP,cAAc,EAEd,aAAa,EAChB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AAuBnE,6GAA6G;AAC7G,KAAK,cAAc,GAA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