@angular/cdk 20.0.0-next.0 → 20.0.0-next.1

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 (179) hide show
  1. package/a11y/index.d.ts +330 -1234
  2. package/a11y-module.d-7d03e079.d.ts +313 -0
  3. package/accordion/index.d.ts +8 -27
  4. package/activedescendant-key-manager.d-11921e3a.d.ts +31 -0
  5. package/bidi/index.d.ts +3 -62
  6. package/bidi-module.d-f8648621.d.ts +53 -0
  7. package/clipboard/index.d.ts +61 -75
  8. package/coercion/index.d.ts +10 -33
  9. package/coercion/private/index.d.ts +2 -2
  10. package/collections/index.d.ts +13 -291
  11. package/data-source.d-7cab2c9d.d.ts +42 -0
  12. package/dialog/index.d.ts +204 -249
  13. package/drag-drop/index.d.ts +1077 -1157
  14. package/fesm2022/a11y-module-e6996d20.mjs +952 -0
  15. package/fesm2022/a11y-module-e6996d20.mjs.map +1 -0
  16. package/fesm2022/a11y.mjs +47 -2445
  17. package/fesm2022/a11y.mjs.map +1 -1
  18. package/fesm2022/accordion.mjs +12 -16
  19. package/fesm2022/accordion.mjs.map +1 -1
  20. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs +16 -0
  21. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs.map +1 -0
  22. package/fesm2022/array-ee3b4bab.mjs +6 -0
  23. package/fesm2022/array-ee3b4bab.mjs.map +1 -0
  24. package/fesm2022/backwards-compatibility-bcbe473e.mjs +25 -0
  25. package/fesm2022/backwards-compatibility-bcbe473e.mjs.map +1 -0
  26. package/fesm2022/bidi-module-0726b65c.mjs +78 -0
  27. package/fesm2022/bidi-module-0726b65c.mjs.map +1 -0
  28. package/fesm2022/bidi.mjs +4 -143
  29. package/fesm2022/bidi.mjs.map +1 -1
  30. package/fesm2022/breakpoints-observer-d4584b66.mjs +179 -0
  31. package/fesm2022/breakpoints-observer-d4584b66.mjs.map +1 -0
  32. package/fesm2022/cdk.mjs +1 -1
  33. package/fesm2022/cdk.mjs.map +1 -1
  34. package/fesm2022/clipboard.mjs +10 -14
  35. package/fesm2022/clipboard.mjs.map +1 -1
  36. package/fesm2022/coercion/private.mjs +2 -18
  37. package/fesm2022/coercion/private.mjs.map +1 -1
  38. package/fesm2022/coercion.mjs +5 -39
  39. package/fesm2022/coercion.mjs.map +1 -1
  40. package/fesm2022/collections.mjs +7 -476
  41. package/fesm2022/collections.mjs.map +1 -1
  42. package/fesm2022/css-pixel-value-286c9a60.mjs +10 -0
  43. package/fesm2022/css-pixel-value-286c9a60.mjs.map +1 -0
  44. package/fesm2022/data-source-5320b6fd.mjs +15 -0
  45. package/fesm2022/data-source-5320b6fd.mjs.map +1 -0
  46. package/fesm2022/dialog.mjs +37 -39
  47. package/fesm2022/dialog.mjs.map +1 -1
  48. package/fesm2022/directionality-7ea26429.mjs +72 -0
  49. package/fesm2022/directionality-7ea26429.mjs.map +1 -0
  50. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs +44 -0
  51. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs.map +1 -0
  52. package/fesm2022/drag-drop.mjs +48 -50
  53. package/fesm2022/drag-drop.mjs.map +1 -1
  54. package/fesm2022/element-705567fe.mjs +29 -0
  55. package/fesm2022/element-705567fe.mjs.map +1 -0
  56. package/fesm2022/fake-event-detection-7055b1bd.mjs +24 -0
  57. package/fesm2022/fake-event-detection-7055b1bd.mjs.map +1 -0
  58. package/fesm2022/focus-key-manager-58d29acd.mjs +22 -0
  59. package/fesm2022/focus-key-manager-58d29acd.mjs.map +1 -0
  60. package/fesm2022/focus-monitor-cebaa0d1.mjs +629 -0
  61. package/fesm2022/focus-monitor-cebaa0d1.mjs.map +1 -0
  62. package/fesm2022/id-generator-fba495fb.mjs +37 -0
  63. package/fesm2022/id-generator-fba495fb.mjs.map +1 -0
  64. package/fesm2022/keycodes-107cd3e4.mjs +122 -0
  65. package/fesm2022/keycodes-107cd3e4.mjs.map +1 -0
  66. package/fesm2022/keycodes.mjs +2 -136
  67. package/fesm2022/keycodes.mjs.map +1 -1
  68. package/fesm2022/layout.mjs +12 -184
  69. package/fesm2022/layout.mjs.map +1 -1
  70. package/fesm2022/list-key-manager-c7b5cefb.mjs +360 -0
  71. package/fesm2022/list-key-manager-c7b5cefb.mjs.map +1 -0
  72. package/fesm2022/listbox.mjs +21 -20
  73. package/fesm2022/listbox.mjs.map +1 -1
  74. package/fesm2022/menu.mjs +76 -60
  75. package/fesm2022/menu.mjs.map +1 -1
  76. package/fesm2022/modifiers-33a5859e.mjs +13 -0
  77. package/fesm2022/modifiers-33a5859e.mjs.map +1 -0
  78. package/fesm2022/observable-97c0792c.mjs +15 -0
  79. package/fesm2022/observable-97c0792c.mjs.map +1 -0
  80. package/fesm2022/observe-content-d2a6b5a0.mjs +210 -0
  81. package/fesm2022/observe-content-d2a6b5a0.mjs.map +1 -0
  82. package/fesm2022/observers/private.mjs +3 -7
  83. package/fesm2022/observers/private.mjs.map +1 -1
  84. package/fesm2022/observers.mjs +5 -213
  85. package/fesm2022/observers.mjs.map +1 -1
  86. package/fesm2022/overlay-module-863b82c9.mjs +3029 -0
  87. package/fesm2022/overlay-module-863b82c9.mjs.map +1 -0
  88. package/fesm2022/overlay.mjs +28 -3019
  89. package/fesm2022/overlay.mjs.map +1 -1
  90. package/fesm2022/passive-listeners-c0bdc49f.mjs +31 -0
  91. package/fesm2022/passive-listeners-c0bdc49f.mjs.map +1 -0
  92. package/fesm2022/platform-1be098b0.mjs +77 -0
  93. package/fesm2022/platform-1be098b0.mjs.map +1 -0
  94. package/fesm2022/platform.mjs +13 -293
  95. package/fesm2022/platform.mjs.map +1 -1
  96. package/fesm2022/portal-directives-c88fea11.mjs +615 -0
  97. package/fesm2022/portal-directives-c88fea11.mjs.map +1 -0
  98. package/fesm2022/portal.mjs +3 -650
  99. package/fesm2022/portal.mjs.map +1 -1
  100. package/fesm2022/private.mjs +3 -63
  101. package/fesm2022/private.mjs.map +1 -1
  102. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs +156 -0
  103. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs.map +1 -0
  104. package/fesm2022/scrolling-61955dd1.mjs +99 -0
  105. package/fesm2022/scrolling-61955dd1.mjs.map +1 -0
  106. package/fesm2022/scrolling-module-aa9eeac5.mjs +1463 -0
  107. package/fesm2022/scrolling-module-aa9eeac5.mjs.map +1 -0
  108. package/fesm2022/scrolling.mjs +12 -1463
  109. package/fesm2022/scrolling.mjs.map +1 -1
  110. package/fesm2022/selection-model-30243dba.mjs +221 -0
  111. package/fesm2022/selection-model-30243dba.mjs.map +1 -0
  112. package/fesm2022/shadow-dom-9f403d00.mjs +49 -0
  113. package/fesm2022/shadow-dom-9f403d00.mjs.map +1 -0
  114. package/fesm2022/stepper.mjs +32 -30
  115. package/fesm2022/stepper.mjs.map +1 -1
  116. package/fesm2022/style-loader-e14dc585.mjs +47 -0
  117. package/fesm2022/style-loader-e14dc585.mjs.map +1 -0
  118. package/fesm2022/table.mjs +88 -132
  119. package/fesm2022/table.mjs.map +1 -1
  120. package/fesm2022/test-environment-34eef1ee.mjs +19 -0
  121. package/fesm2022/test-environment-34eef1ee.mjs.map +1 -0
  122. package/fesm2022/testing/selenium-webdriver.mjs +2 -1
  123. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  124. package/fesm2022/testing/testbed.mjs +33 -74
  125. package/fesm2022/testing/testbed.mjs.map +1 -1
  126. package/fesm2022/testing.mjs +2 -697
  127. package/fesm2022/testing.mjs.map +1 -1
  128. package/fesm2022/text-field.mjs +20 -23
  129. package/fesm2022/text-field.mjs.map +1 -1
  130. package/fesm2022/text-filtering-b60ba8a2.mjs +698 -0
  131. package/fesm2022/text-filtering-b60ba8a2.mjs.map +1 -0
  132. package/fesm2022/tree-key-manager-2f20c79c.mjs +360 -0
  133. package/fesm2022/tree-key-manager-2f20c79c.mjs.map +1 -0
  134. package/fesm2022/tree.mjs +33 -33
  135. package/fesm2022/tree.mjs.map +1 -1
  136. package/fesm2022/typeahead-11ae39bd.mjs +88 -0
  137. package/fesm2022/typeahead-11ae39bd.mjs.map +1 -0
  138. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs +49 -0
  139. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs.map +1 -0
  140. package/fesm2022/visually-hidden-83aea4a0.mjs +18 -0
  141. package/fesm2022/visually-hidden-83aea4a0.mjs.map +1 -0
  142. package/focus-key-manager.d-415a6958.d.ts +33 -0
  143. package/focus-monitor.d-810a02e6.d.ts +209 -0
  144. package/harness-environment.d-4d615248.d.ts +619 -0
  145. package/index.d.ts +2 -2
  146. package/keycodes/index.d.ts +123 -244
  147. package/layout/index.d.ts +23 -25
  148. package/list-key-manager.d-72e9a2e7.d.ts +164 -0
  149. package/listbox/index.d.ts +91 -107
  150. package/menu/index.d.ts +596 -682
  151. package/number-property.d-ce316715.d.ts +15 -0
  152. package/observe-content.d-c08bc882.d.ts +84 -0
  153. package/observers/index.d.ts +4 -90
  154. package/observers/private/index.d.ts +3 -3
  155. package/overlay/index.d.ts +110 -951
  156. package/overlay-module.d-5d06db8a.d.ts +790 -0
  157. package/package.json +1 -1
  158. package/platform/index.d.ts +45 -86
  159. package/platform.d-0a5b4792.d.ts +33 -0
  160. package/portal/index.d.ts +5 -264
  161. package/portal-directives.d-d345bd53.d.ts +210 -0
  162. package/private/index.d.ts +3 -20
  163. package/schematics/ng-add/index.js +1 -1
  164. package/schematics/ng-add/index.mjs +1 -1
  165. package/scrolling/index.d.ts +7 -687
  166. package/scrolling-module.d-a08a462d.d.ts +551 -0
  167. package/selection-model.d-1a70542c.d.ts +111 -0
  168. package/stepper/index.d.ts +74 -124
  169. package/style-loader.d-19baab84.d.ts +21 -0
  170. package/table/index.d.ts +329 -453
  171. package/testing/index.d.ts +32 -675
  172. package/testing/selenium-webdriver/index.d.ts +30 -20
  173. package/testing/testbed/index.d.ts +9 -19
  174. package/text-field/index.d.ts +9 -30
  175. package/tree/index.d.ts +205 -271
  176. package/tree-key-manager-strategy.d-603161dd.d.ts +116 -0
  177. package/unique-selection-dispatcher.d-7993b9f5.d.ts +32 -0
  178. package/view-repeater.d-79039e1f.d.ts +88 -0
  179. package/viewport-ruler.d-f3d3e82f.d.ts +57 -0
@@ -1,15 +1,20 @@
1
- /** An async function that returns a promise when called. */
2
- export declare type AsyncFactoryFn<T> = () => Promise<T>;
1
+ export { A as AsyncFactoryFn, b as AsyncOptionPredicate, a as AsyncPredicate, B as BaseHarnessFilters, C as ComponentHarness, f as ComponentHarnessConstructor, e as ContentContainerComponentHarness, k as ElementDimensions, E as EventData, h as HarnessEnvironment, c as HarnessLoader, g as HarnessPredicate, H as HarnessQuery, d as LocatorFactory, L as LocatorFnResult, M as ModifierKeys, i as TestElement, T as TestKey, j as TextOptions } from '../harness-environment.d-4d615248.js';
3
2
 
4
- /** An async function that takes an item and an option value and returns a boolean promise. */
5
- export declare type AsyncOptionPredicate<T, O> = (item: T, option: O) => Promise<boolean>;
6
-
7
- /** An async function that takes an item and returns a boolean promise */
8
- export declare type AsyncPredicate<T> = (item: T) => Promise<boolean>;
3
+ /**
4
+ * Returns an error which reports that no keys have been specified.
5
+ * @docs-private
6
+ */
7
+ declare function getNoKeysSpecifiedError(): Error;
9
8
 
9
+ /**
10
+ * Gets text of element excluding certain selectors within the element.
11
+ * @param element Element to get text from,
12
+ * @param excludeSelector Selector identifying which elements to exclude,
13
+ */
14
+ declare function _getTextWithExcludedElements(element: Element, excludeSelector: string): string;
10
15
 
11
16
  /** Represents the status of auto change detection. */
12
- export declare interface AutoChangeDetectionStatus {
17
+ interface AutoChangeDetectionStatus {
13
18
  /** Whether auto change detection is disabled. */
14
19
  isDisabled: boolean;
15
20
  /**
@@ -19,535 +24,20 @@ export declare interface AutoChangeDetectionStatus {
19
24
  */
20
25
  onDetectChangesNow?: () => void;
21
26
  }
22
-
23
- /** A set of criteria that can be used to filter a list of `ComponentHarness` instances. */
24
- export declare interface BaseHarnessFilters {
25
- /** Only find instances whose host element matches the given selector. */
26
- selector?: string;
27
- /** Only find instances that are nested under an element with the given selector. */
28
- ancestor?: string;
29
- }
30
-
31
- /**
32
- * Base class for component harnesses that all component harness authors should extend. This base
33
- * component harness provides the basic ability to locate element and sub-component harness. It
34
- * should be inherited when defining user's own harness.
35
- */
36
- export declare abstract class ComponentHarness {
37
- protected readonly locatorFactory: LocatorFactory;
38
- constructor(locatorFactory: LocatorFactory);
39
- /** Gets a `Promise` for the `TestElement` representing the host element of the component. */
40
- host(): Promise<TestElement>;
41
- /**
42
- * Gets a `LocatorFactory` for the document root element. This factory can be used to create
43
- * locators for elements that a component creates outside of its own root element. (e.g. by
44
- * appending to document.body).
45
- */
46
- protected documentRootLocatorFactory(): LocatorFactory;
47
- /**
48
- * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance
49
- * or element under the host element of this `ComponentHarness`.
50
- * @param queries A list of queries specifying which harnesses and elements to search for:
51
- * - A `string` searches for elements matching the CSS selector specified by the string.
52
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
53
- * given class.
54
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
55
- * predicate.
56
- * @return An asynchronous locator function that searches for and returns a `Promise` for the
57
- * first element or harness matching the given search criteria. Matches are ordered first by
58
- * order in the DOM, and second by order in the queries list. If no matches are found, the
59
- * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for
60
- * each query.
61
- *
62
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
63
- * `DivHarness.hostSelector === 'div'`:
64
- * - `await ch.locatorFor(DivHarness, 'div')()` gets a `DivHarness` instance for `#d1`
65
- * - `await ch.locatorFor('div', DivHarness)()` gets a `TestElement` instance for `#d1`
66
- * - `await ch.locatorFor('span')()` throws because the `Promise` rejects.
67
- */
68
- protected locatorFor<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T>>;
69
- /**
70
- * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance
71
- * or element under the host element of this `ComponentHarness`.
72
- * @param queries A list of queries specifying which harnesses and elements to search for:
73
- * - A `string` searches for elements matching the CSS selector specified by the string.
74
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
75
- * given class.
76
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
77
- * predicate.
78
- * @return An asynchronous locator function that searches for and returns a `Promise` for the
79
- * first element or harness matching the given search criteria. Matches are ordered first by
80
- * order in the DOM, and second by order in the queries list. If no matches are found, the
81
- * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all
82
- * result types for each query or null.
83
- *
84
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
85
- * `DivHarness.hostSelector === 'div'`:
86
- * - `await ch.locatorForOptional(DivHarness, 'div')()` gets a `DivHarness` instance for `#d1`
87
- * - `await ch.locatorForOptional('div', DivHarness)()` gets a `TestElement` instance for `#d1`
88
- * - `await ch.locatorForOptional('span')()` gets `null`.
89
- */
90
- protected locatorForOptional<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T> | null>;
91
- /**
92
- * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances
93
- * or elements under the host element of this `ComponentHarness`.
94
- * @param queries A list of queries specifying which harnesses and elements to search for:
95
- * - A `string` searches for elements matching the CSS selector specified by the string.
96
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
97
- * given class.
98
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
99
- * predicate.
100
- * @return An asynchronous locator function that searches for and returns a `Promise` for all
101
- * elements and harnesses matching the given search criteria. Matches are ordered first by
102
- * order in the DOM, and second by order in the queries list. If an element matches more than
103
- * one `ComponentHarness` class, the locator gets an instance of each for the same element. If
104
- * an element matches multiple `string` selectors, only one `TestElement` instance is returned
105
- * for that element. The type that the `Promise` resolves to is an array where each element is
106
- * the union of all result types for each query.
107
- *
108
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
109
- * `DivHarness.hostSelector === 'div'` and `IdIsD1Harness.hostSelector === '#d1'`:
110
- * - `await ch.locatorForAll(DivHarness, 'div')()` gets `[
111
- * DivHarness, // for #d1
112
- * TestElement, // for #d1
113
- * DivHarness, // for #d2
114
- * TestElement // for #d2
115
- * ]`
116
- * - `await ch.locatorForAll('div', '#d1')()` gets `[
117
- * TestElement, // for #d1
118
- * TestElement // for #d2
119
- * ]`
120
- * - `await ch.locatorForAll(DivHarness, IdIsD1Harness)()` gets `[
121
- * DivHarness, // for #d1
122
- * IdIsD1Harness, // for #d1
123
- * DivHarness // for #d2
124
- * ]`
125
- * - `await ch.locatorForAll('span')()` gets `[]`.
126
- */
127
- protected locatorForAll<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T>[]>;
128
- /**
129
- * Flushes change detection and async tasks in the Angular zone.
130
- * In most cases it should not be necessary to call this manually. However, there may be some edge
131
- * cases where it is needed to fully flush animation events.
132
- */
133
- protected forceStabilize(): Promise<void>;
134
- /**
135
- * Waits for all scheduled or running async tasks to complete. This allows harness
136
- * authors to wait for async tasks outside of the Angular zone.
137
- */
138
- protected waitForTasksOutsideAngular(): Promise<void>;
139
- }
140
-
141
- /** Constructor for a ComponentHarness subclass. */
142
- export declare interface ComponentHarnessConstructor<T extends ComponentHarness> {
143
- new (locatorFactory: LocatorFactory): T;
144
- /**
145
- * `ComponentHarness` subclasses must specify a static `hostSelector` property that is used to
146
- * find the host element for the corresponding component. This property should match the selector
147
- * for the Angular component.
148
- */
149
- hostSelector: string;
150
- }
151
-
152
- /**
153
- * Base class for component harnesses that authors should extend if they anticipate that consumers
154
- * of the harness may want to access other harnesses within the `<ng-content>` of the component.
155
- */
156
- export declare abstract class ContentContainerComponentHarness<S extends string = string> extends ComponentHarness implements HarnessLoader {
157
- getChildLoader(selector: S): Promise<HarnessLoader>;
158
- getAllChildLoaders(selector: S): Promise<HarnessLoader[]>;
159
- getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T>;
160
- getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
161
- getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;
162
- hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean>;
163
- /**
164
- * Gets the root harness loader from which to start
165
- * searching for content contained by this harness.
166
- */
167
- protected getRootHarnessLoader(): Promise<HarnessLoader>;
168
- }
169
-
170
-
171
- /**
172
- * Dimensions for element size and its position relative to the viewport.
173
- */
174
- export declare interface ElementDimensions {
175
- top: number;
176
- left: number;
177
- width: number;
178
- height: number;
179
- }
180
-
181
- /** Data that can be attached to a custom event dispatched from a `TestElement`. */
182
- export declare type EventData = string | number | boolean | Function | undefined | null | EventData[] | {
183
- [key: string]: EventData;
184
- };
185
-
186
-
187
- /**
188
- * Returns an error which reports that no keys have been specified.
189
- * @docs-private
190
- */
191
- export declare function getNoKeysSpecifiedError(): Error;
192
-
193
-
194
- /**
195
- * Gets text of element excluding certain selectors within the element.
196
- * @param element Element to get text from,
197
- * @param excludeSelector Selector identifying which elements to exclude,
198
- */
199
- export declare function _getTextWithExcludedElements(element: Element, excludeSelector: string): string;
200
-
201
27
  /**
202
28
  * Allows a test `HarnessEnvironment` to install its own handler for auto change detection status
203
29
  * changes.
204
30
  * @param handler The handler for the auto change detection status.
205
31
  */
206
- export declare function handleAutoChangeDetectionStatus(handler: (status: AutoChangeDetectionStatus) => void): void;
207
-
208
- /**
209
- * Base harness environment class that can be extended to allow `ComponentHarness`es to be used in
210
- * different test environments (e.g. testbed, protractor, etc.). This class implements the
211
- * functionality of both a `HarnessLoader` and `LocatorFactory`. This class is generic on the raw
212
- * element type, `E`, used by the particular test environment.
213
- */
214
- export declare abstract class HarnessEnvironment<E> implements HarnessLoader, LocatorFactory {
215
- protected rawRootElement: E;
216
- get rootElement(): TestElement;
217
- set rootElement(element: TestElement);
218
- private _rootElement;
219
- protected constructor(rawRootElement: E);
220
- documentRootLocatorFactory(): LocatorFactory;
221
- locatorFor<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T>>;
222
- locatorForOptional<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T> | null>;
223
- locatorForAll<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T>[]>;
224
- rootHarnessLoader(): Promise<HarnessLoader>;
225
- harnessLoaderFor(selector: string): Promise<HarnessLoader>;
226
- harnessLoaderForOptional(selector: string): Promise<HarnessLoader | null>;
227
- harnessLoaderForAll(selector: string): Promise<HarnessLoader[]>;
228
- getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T>;
229
- getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
230
- getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;
231
- hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean>;
232
- getChildLoader(selector: string): Promise<HarnessLoader>;
233
- getAllChildLoaders(selector: string): Promise<HarnessLoader[]>;
234
- /** Creates a `ComponentHarness` for the given harness type with the given raw host element. */
235
- protected createComponentHarness<T extends ComponentHarness>(harnessType: ComponentHarnessConstructor<T>, element: E): T;
236
- abstract forceStabilize(): Promise<void>;
237
- abstract waitForTasksOutsideAngular(): Promise<void>;
238
- /** Gets the root element for the document. */
239
- protected abstract getDocumentRoot(): E;
240
- /** Creates a `TestElement` from a raw element. */
241
- protected abstract createTestElement(element: E): TestElement;
242
- /** Creates a `HarnessLoader` rooted at the given raw element. */
243
- protected abstract createEnvironment(element: E): HarnessEnvironment<E>;
244
- /**
245
- * Gets a list of all elements matching the given selector under this environment's root element.
246
- */
247
- protected abstract getAllRawElements(selector: string): Promise<E[]>;
248
- /**
249
- * Matches the given raw elements with the given list of element and harness queries to produce a
250
- * list of matched harnesses and test elements.
251
- */
252
- private _getAllHarnessesAndTestElements;
253
- /**
254
- * Check whether the given query matches the given element, if it does return the matched
255
- * `TestElement` or `ComponentHarness`, if it does not, return null. In cases where the caller
256
- * knows for sure that the query matches the element's selector, `skipSelectorCheck` can be used
257
- * to skip verification and optimize performance.
258
- */
259
- private _getQueryResultForElement;
260
- }
261
-
262
- /**
263
- * Interface used to load ComponentHarness objects. This interface is used by test authors to
264
- * instantiate `ComponentHarness`es.
265
- */
266
- export declare interface HarnessLoader {
267
- /**
268
- * Searches for an element with the given selector under the current instances's root element,
269
- * and returns a `HarnessLoader` rooted at the matching element. If multiple elements match the
270
- * selector, the first is used. If no elements match, an error is thrown.
271
- * @param selector The selector for the root element of the new `HarnessLoader`
272
- * @return A `HarnessLoader` rooted at the element matching the given selector.
273
- * @throws If a matching element can't be found.
274
- */
275
- getChildLoader(selector: string): Promise<HarnessLoader>;
276
- /**
277
- * Searches for all elements with the given selector under the current instances's root element,
278
- * and returns an array of `HarnessLoader`s, one for each matching element, rooted at that
279
- * element.
280
- * @param selector The selector for the root element of the new `HarnessLoader`
281
- * @return A list of `HarnessLoader`s, one for each matching element, rooted at that element.
282
- */
283
- getAllChildLoaders(selector: string): Promise<HarnessLoader[]>;
284
- /**
285
- * Searches for an instance of the component corresponding to the given harness type under the
286
- * `HarnessLoader`'s root element, and returns a `ComponentHarness` for that instance. If multiple
287
- * matching components are found, a harness for the first one is returned. If no matching
288
- * component is found, an error is thrown.
289
- * @param query A query for a harness to create
290
- * @return An instance of the given harness type
291
- * @throws If a matching component instance can't be found.
292
- */
293
- getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T>;
294
- /**
295
- * Searches for an instance of the component corresponding to the given harness type under the
296
- * `HarnessLoader`'s root element, and returns a `ComponentHarness` for that instance. If multiple
297
- * matching components are found, a harness for the first one is returned. If no matching
298
- * component is found, null is returned.
299
- * @param query A query for a harness to create
300
- * @return An instance of the given harness type (or null if not found).
301
- */
302
- getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
303
- /**
304
- * Searches for all instances of the component corresponding to the given harness type under the
305
- * `HarnessLoader`'s root element, and returns a list `ComponentHarness` for each instance.
306
- * @param query A query for a harness to create
307
- * @return A list instances of the given harness type.
308
- */
309
- getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;
310
- /**
311
- * Searches for an instance of the component corresponding to the given harness type under the
312
- * `HarnessLoader`'s root element, and returns a boolean indicating if any were found.
313
- * @param query A query for a harness to create
314
- * @return A boolean indicating if an instance was found.
315
- */
316
- hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean>;
317
- }
318
-
319
- /**
320
- * A class used to associate a ComponentHarness class with predicates functions that can be used to
321
- * filter instances of the class.
322
- */
323
- export declare class HarnessPredicate<T extends ComponentHarness> {
324
- harnessType: ComponentHarnessConstructor<T>;
325
- private _predicates;
326
- private _descriptions;
327
- private _ancestor;
328
- constructor(harnessType: ComponentHarnessConstructor<T>, options: BaseHarnessFilters);
329
- /**
330
- * Checks if the specified nullable string value matches the given pattern.
331
- * @param value The nullable string value to check, or a Promise resolving to the
332
- * nullable string value.
333
- * @param pattern The pattern the value is expected to match. If `pattern` is a string,
334
- * `value` is expected to match exactly. If `pattern` is a regex, a partial match is
335
- * allowed. If `pattern` is `null`, the value is expected to be `null`.
336
- * @return Whether the value matches the pattern.
337
- */
338
- static stringMatches(value: string | null | Promise<string | null>, pattern: string | RegExp | null): Promise<boolean>;
339
- /**
340
- * Adds a predicate function to be run against candidate harnesses.
341
- * @param description A description of this predicate that may be used in error messages.
342
- * @param predicate An async predicate function.
343
- * @return this (for method chaining).
344
- */
345
- add(description: string, predicate: AsyncPredicate<T>): this;
346
- /**
347
- * Adds a predicate function that depends on an option value to be run against candidate
348
- * harnesses. If the option value is undefined, the predicate will be ignored.
349
- * @param name The name of the option (may be used in error messages).
350
- * @param option The option value.
351
- * @param predicate The predicate function to run if the option value is not undefined.
352
- * @return this (for method chaining).
353
- */
354
- addOption<O>(name: string, option: O | undefined, predicate: AsyncOptionPredicate<T, O>): this;
355
- /**
356
- * Filters a list of harnesses on this predicate.
357
- * @param harnesses The list of harnesses to filter.
358
- * @return A list of harnesses that satisfy this predicate.
359
- */
360
- filter(harnesses: T[]): Promise<T[]>;
361
- /**
362
- * Evaluates whether the given harness satisfies this predicate.
363
- * @param harness The harness to check
364
- * @return A promise that resolves to true if the harness satisfies this predicate,
365
- * and resolves to false otherwise.
366
- */
367
- evaluate(harness: T): Promise<boolean>;
368
- /** Gets a description of this predicate for use in error messages. */
369
- getDescription(): string;
370
- /** Gets the selector used to find candidate elements. */
371
- getSelector(): string;
372
- /** Adds base options common to all harness types. */
373
- private _addBaseOptions;
374
- }
375
-
376
- /**
377
- * A query for a `ComponentHarness`, which is expressed as either a `ComponentHarnessConstructor` or
378
- * a `HarnessPredicate`.
379
- */
380
- export declare type HarnessQuery<T extends ComponentHarness> = ComponentHarnessConstructor<T> | HarnessPredicate<T>;
381
-
382
- /**
383
- * Interface used to create asynchronous locator functions used find elements and component
384
- * harnesses. This interface is used by `ComponentHarness` authors to create locator functions for
385
- * their `ComponentHarness` subclass.
386
- */
387
- export declare interface LocatorFactory {
388
- /** Gets a locator factory rooted at the document root. */
389
- documentRootLocatorFactory(): LocatorFactory;
390
- /** The root element of this `LocatorFactory` as a `TestElement`. */
391
- rootElement: TestElement;
392
- /**
393
- * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance
394
- * or element under the root element of this `LocatorFactory`.
395
- * @param queries A list of queries specifying which harnesses and elements to search for:
396
- * - A `string` searches for elements matching the CSS selector specified by the string.
397
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
398
- * given class.
399
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
400
- * predicate.
401
- * @return An asynchronous locator function that searches for and returns a `Promise` for the
402
- * first element or harness matching the given search criteria. Matches are ordered first by
403
- * order in the DOM, and second by order in the queries list. If no matches are found, the
404
- * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for
405
- * each query.
406
- *
407
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
408
- * `DivHarness.hostSelector === 'div'`:
409
- * - `await lf.locatorFor(DivHarness, 'div')()` gets a `DivHarness` instance for `#d1`
410
- * - `await lf.locatorFor('div', DivHarness)()` gets a `TestElement` instance for `#d1`
411
- * - `await lf.locatorFor('span')()` throws because the `Promise` rejects.
412
- */
413
- locatorFor<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T>>;
414
- /**
415
- * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance
416
- * or element under the root element of this `LocatorFactory`.
417
- * @param queries A list of queries specifying which harnesses and elements to search for:
418
- * - A `string` searches for elements matching the CSS selector specified by the string.
419
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
420
- * given class.
421
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
422
- * predicate.
423
- * @return An asynchronous locator function that searches for and returns a `Promise` for the
424
- * first element or harness matching the given search criteria. Matches are ordered first by
425
- * order in the DOM, and second by order in the queries list. If no matches are found, the
426
- * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all
427
- * result types for each query or null.
428
- *
429
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
430
- * `DivHarness.hostSelector === 'div'`:
431
- * - `await lf.locatorForOptional(DivHarness, 'div')()` gets a `DivHarness` instance for `#d1`
432
- * - `await lf.locatorForOptional('div', DivHarness)()` gets a `TestElement` instance for `#d1`
433
- * - `await lf.locatorForOptional('span')()` gets `null`.
434
- */
435
- locatorForOptional<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T> | null>;
436
- /**
437
- * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances
438
- * or elements under the root element of this `LocatorFactory`.
439
- * @param queries A list of queries specifying which harnesses and elements to search for:
440
- * - A `string` searches for elements matching the CSS selector specified by the string.
441
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
442
- * given class.
443
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
444
- * predicate.
445
- * @return An asynchronous locator function that searches for and returns a `Promise` for all
446
- * elements and harnesses matching the given search criteria. Matches are ordered first by
447
- * order in the DOM, and second by order in the queries list. If an element matches more than
448
- * one `ComponentHarness` class, the locator gets an instance of each for the same element. If
449
- * an element matches multiple `string` selectors, only one `TestElement` instance is returned
450
- * for that element. The type that the `Promise` resolves to is an array where each element is
451
- * the union of all result types for each query.
452
- *
453
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
454
- * `DivHarness.hostSelector === 'div'` and `IdIsD1Harness.hostSelector === '#d1'`:
455
- * - `await lf.locatorForAll(DivHarness, 'div')()` gets `[
456
- * DivHarness, // for #d1
457
- * TestElement, // for #d1
458
- * DivHarness, // for #d2
459
- * TestElement // for #d2
460
- * ]`
461
- * - `await lf.locatorForAll('div', '#d1')()` gets `[
462
- * TestElement, // for #d1
463
- * TestElement // for #d2
464
- * ]`
465
- * - `await lf.locatorForAll(DivHarness, IdIsD1Harness)()` gets `[
466
- * DivHarness, // for #d1
467
- * IdIsD1Harness, // for #d1
468
- * DivHarness // for #d2
469
- * ]`
470
- * - `await lf.locatorForAll('span')()` gets `[]`.
471
- */
472
- locatorForAll<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T>[]>;
473
- /** @return A `HarnessLoader` rooted at the root element of this `LocatorFactory`. */
474
- rootHarnessLoader(): Promise<HarnessLoader>;
475
- /**
476
- * Gets a `HarnessLoader` instance for an element under the root of this `LocatorFactory`.
477
- * @param selector The selector for the root element.
478
- * @return A `HarnessLoader` rooted at the first element matching the given selector.
479
- * @throws If no matching element is found for the given selector.
480
- */
481
- harnessLoaderFor(selector: string): Promise<HarnessLoader>;
482
- /**
483
- * Gets a `HarnessLoader` instance for an element under the root of this `LocatorFactory`
484
- * @param selector The selector for the root element.
485
- * @return A `HarnessLoader` rooted at the first element matching the given selector, or null if
486
- * no matching element is found.
487
- */
488
- harnessLoaderForOptional(selector: string): Promise<HarnessLoader | null>;
489
- /**
490
- * Gets a list of `HarnessLoader` instances, one for each matching element.
491
- * @param selector The selector for the root element.
492
- * @return A list of `HarnessLoader`, one rooted at each element matching the given selector.
493
- */
494
- harnessLoaderForAll(selector: string): Promise<HarnessLoader[]>;
495
- /**
496
- * Flushes change detection and async tasks captured in the Angular zone.
497
- * In most cases it should not be necessary to call this manually. However, there may be some edge
498
- * cases where it is needed to fully flush animation events.
499
- */
500
- forceStabilize(): Promise<void>;
501
- /**
502
- * Waits for all scheduled or running async tasks to complete. This allows harness
503
- * authors to wait for async tasks outside of the Angular zone.
504
- */
505
- waitForTasksOutsideAngular(): Promise<void>;
506
- }
507
-
508
- /**
509
- * The result type obtained when searching using a particular list of queries. This type depends on
510
- * the particular items being queried.
511
- * - If one of the queries is for a `ComponentHarnessConstructor<C1>`, it means that the result
512
- * might be a harness of type `C1`
513
- * - If one of the queries is for a `HarnessPredicate<C2>`, it means that the result might be a
514
- * harness of type `C2`
515
- * - If one of the queries is for a `string`, it means that the result might be a `TestElement`.
516
- *
517
- * Since we don't know for sure which query will match, the result type if the union of the types
518
- * for all possible results.
519
- *
520
- * e.g.
521
- * The type:
522
- * `LocatorFnResult&lt;[
523
- * ComponentHarnessConstructor&lt;MyHarness&gt;,
524
- * HarnessPredicate&lt;MyOtherHarness&gt;,
525
- * string
526
- * ]&gt;`
527
- * is equivalent to:
528
- * `MyHarness | MyOtherHarness | TestElement`.
529
- */
530
- export declare type LocatorFnResult<T extends (HarnessQuery<any> | string)[]> = {
531
- [I in keyof T]: T[I] extends new (...args: any[]) => infer C ? C : T[I] extends {
532
- harnessType: new (...args: any[]) => infer C;
533
- } ? C : T[I] extends string ? TestElement : never;
534
- }[number];
535
-
32
+ declare function handleAutoChangeDetectionStatus(handler: (status: AutoChangeDetectionStatus) => void): void;
33
+ /** Allows a `HarnessEnvironment` to stop handling auto change detection status changes. */
34
+ declare function stopHandlingAutoChangeDetectionStatus(): void;
536
35
  /**
537
36
  * Disables the harness system's auto change detection for the duration of the given function.
538
37
  * @param fn The function to disable auto change detection for.
539
38
  * @return The result of the given function.
540
39
  */
541
- export declare function manualChangeDetection<T>(fn: () => Promise<T>): Promise<T>;
542
-
543
- /** Modifier keys that may be held while typing. */
544
- export declare interface ModifierKeys {
545
- control?: boolean;
546
- alt?: boolean;
547
- shift?: boolean;
548
- meta?: boolean;
549
- }
550
-
40
+ declare function manualChangeDetection<T>(fn: () => Promise<T>): Promise<T>;
551
41
  /**
552
42
  * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
553
43
  * detection over the entire operation such that change detection occurs exactly once before
@@ -555,14 +45,13 @@ export declare interface ModifierKeys {
555
45
  * @param values A getter for the async values to resolve in parallel with batched change detection.
556
46
  * @return The resolved values.
557
47
  */
558
- export declare function parallel<T1, T2, T3, T4, T5>(values: () => [
559
- T1 | PromiseLike<T1>,
560
- T2 | PromiseLike<T2>,
561
- T3 | PromiseLike<T3>,
562
- T4 | PromiseLike<T4>,
563
- T5 | PromiseLike<T5>
48
+ declare function parallel<T1, T2, T3, T4, T5>(values: () => [
49
+ T1 | PromiseLike<T1>,
50
+ T2 | PromiseLike<T2>,
51
+ T3 | PromiseLike<T3>,
52
+ T4 | PromiseLike<T4>,
53
+ T5 | PromiseLike<T5>
564
54
  ]): Promise<[T1, T2, T3, T4, T5]>;
565
-
566
55
  /**
567
56
  * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
568
57
  * detection over the entire operation such that change detection occurs exactly once before
@@ -570,13 +59,12 @@ T5 | PromiseLike<T5>
570
59
  * @param values A getter for the async values to resolve in parallel with batched change detection.
571
60
  * @return The resolved values.
572
61
  */
573
- export declare function parallel<T1, T2, T3, T4>(values: () => [
574
- T1 | PromiseLike<T1>,
575
- T2 | PromiseLike<T2>,
576
- T3 | PromiseLike<T3>,
577
- T4 | PromiseLike<T4>
62
+ declare function parallel<T1, T2, T3, T4>(values: () => [
63
+ T1 | PromiseLike<T1>,
64
+ T2 | PromiseLike<T2>,
65
+ T3 | PromiseLike<T3>,
66
+ T4 | PromiseLike<T4>
578
67
  ]): Promise<[T1, T2, T3, T4]>;
579
-
580
68
  /**
581
69
  * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
582
70
  * detection over the entire operation such that change detection occurs exactly once before
@@ -584,8 +72,7 @@ T4 | PromiseLike<T4>
584
72
  * @param values A getter for the async values to resolve in parallel with batched change detection.
585
73
  * @return The resolved values.
586
74
  */
587
- export declare function parallel<T1, T2, T3>(values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
588
-
75
+ declare function parallel<T1, T2, T3>(values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
589
76
  /**
590
77
  * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
591
78
  * detection over the entire operation such that change detection occurs exactly once before
@@ -593,8 +80,7 @@ export declare function parallel<T1, T2, T3>(values: () => [T1 | PromiseLike<T1>
593
80
  * @param values A getter for the async values to resolve in parallel with batched change detection.
594
81
  * @return The resolved values.
595
82
  */
596
- export declare function parallel<T1, T2>(values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
597
-
83
+ declare function parallel<T1, T2>(values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
598
84
  /**
599
85
  * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
600
86
  * detection over the entire operation such that change detection occurs exactly once before
@@ -602,135 +88,6 @@ export declare function parallel<T1, T2>(values: () => [T1 | PromiseLike<T1>, T2
602
88
  * @param values A getter for the async values to resolve in parallel with batched change detection.
603
89
  * @return The resolved values.
604
90
  */
605
- export declare function parallel<T>(values: () => (T | PromiseLike<T>)[]): Promise<T[]>;
606
-
607
- /** Allows a `HarnessEnvironment` to stop handling auto change detection status changes. */
608
- export declare function stopHandlingAutoChangeDetectionStatus(): void;
609
-
610
- /**
611
- * This acts as a common interface for DOM elements across both unit and e2e tests. It is the
612
- * interface through which the ComponentHarness interacts with the component's DOM.
613
- */
614
- export declare interface TestElement {
615
- /** Blur the element. */
616
- blur(): Promise<void>;
617
- /** Clear the element's input (for input and textarea elements only). */
618
- clear(): Promise<void>;
619
- /**
620
- * Click the element at the default location for the current environment. If you need to guarantee
621
- * the element is clicked at a specific location, consider using `click('center')` or
622
- * `click(x, y)` instead.
623
- */
624
- click(modifiers?: ModifierKeys): Promise<void>;
625
- /** Click the element at the element's center. */
626
- click(location: 'center', modifiers?: ModifierKeys): Promise<void>;
627
- /**
628
- * Click the element at the specified coordinates relative to the top-left of the element.
629
- * @param relativeX Coordinate within the element, along the X-axis at which to click.
630
- * @param relativeY Coordinate within the element, along the Y-axis at which to click.
631
- * @param modifiers Modifier keys held while clicking
632
- */
633
- click(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;
634
- /**
635
- * Right clicks on the element at the specified coordinates relative to the top-left of it.
636
- * @param relativeX Coordinate within the element, along the X-axis at which to click.
637
- * @param relativeY Coordinate within the element, along the Y-axis at which to click.
638
- * @param modifiers Modifier keys held while clicking
639
- */
640
- rightClick(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;
641
- /** Focus the element. */
642
- focus(): Promise<void>;
643
- /** Get the computed value of the given CSS property for the element. */
644
- getCssValue(property: string): Promise<string>;
645
- /** Hovers the mouse over the element. */
646
- hover(): Promise<void>;
647
- /** Moves the mouse away from the element. */
648
- mouseAway(): Promise<void>;
649
- /**
650
- * Sends the given string to the input as a series of key presses. Also fires input events
651
- * and attempts to add the string to the Element's value. Note that some environments cannot
652
- * reproduce native browser behavior for keyboard shortcuts such as Tab, Ctrl + A, etc.
653
- * @throws An error if no keys have been specified.
654
- */
655
- sendKeys(...keys: (string | TestKey)[]): Promise<void>;
656
- /**
657
- * Sends the given string to the input as a series of key presses. Also fires input
658
- * events and attempts to add the string to the Element's value.
659
- * @throws An error if no keys have been specified.
660
- */
661
- sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;
662
- /**
663
- * Gets the text from the element.
664
- * @param options Options that affect what text is included.
665
- */
666
- text(options?: TextOptions): Promise<string>;
667
- /**
668
- * Sets the value of a `contenteditable` element.
669
- * @param value Value to be set on the element.
670
- * @breaking-change 16.0.0 Will become a required method.
671
- */
672
- setContenteditableValue?(value: string): Promise<void>;
673
- /** Gets the value for the given attribute from the element. */
674
- getAttribute(name: string): Promise<string | null>;
675
- /** Checks whether the element has the given class. */
676
- hasClass(name: string): Promise<boolean>;
677
- /** Gets the dimensions of the element. */
678
- getDimensions(): Promise<ElementDimensions>;
679
- /** Gets the value of a property of an element. */
680
- getProperty<T = any>(name: string): Promise<T>;
681
- /** Checks whether this element matches the given selector. */
682
- matchesSelector(selector: string): Promise<boolean>;
683
- /** Checks whether the element is focused. */
684
- isFocused(): Promise<boolean>;
685
- /** Sets the value of a property of an input. */
686
- setInputValue(value: string): Promise<void>;
687
- /** Selects the options at the specified indexes inside of a native `select` element. */
688
- selectOptions(...optionIndexes: number[]): Promise<void>;
689
- /**
690
- * Dispatches an event with a particular name.
691
- * @param name Name of the event to be dispatched.
692
- */
693
- dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void>;
694
- }
695
-
696
- /** An enum of non-text keys that can be used with the `sendKeys` method. */
697
- export declare enum TestKey {
698
- BACKSPACE = 0,
699
- TAB = 1,
700
- ENTER = 2,
701
- SHIFT = 3,
702
- CONTROL = 4,
703
- ALT = 5,
704
- ESCAPE = 6,
705
- PAGE_UP = 7,
706
- PAGE_DOWN = 8,
707
- END = 9,
708
- HOME = 10,
709
- LEFT_ARROW = 11,
710
- UP_ARROW = 12,
711
- RIGHT_ARROW = 13,
712
- DOWN_ARROW = 14,
713
- INSERT = 15,
714
- DELETE = 16,
715
- F1 = 17,
716
- F2 = 18,
717
- F3 = 19,
718
- F4 = 20,
719
- F5 = 21,
720
- F6 = 22,
721
- F7 = 23,
722
- F8 = 24,
723
- F9 = 25,
724
- F10 = 26,
725
- F11 = 27,
726
- F12 = 28,
727
- META = 29,
728
- COMMA = 30
729
- }
730
-
731
- export declare interface TextOptions {
732
- /** Optional selector for elements to exclude. */
733
- exclude?: string;
734
- }
91
+ declare function parallel<T>(values: () => (T | PromiseLike<T>)[]): Promise<T[]>;
735
92
 
736
- export { }
93
+ export { type AutoChangeDetectionStatus, _getTextWithExcludedElements, getNoKeysSpecifiedError, handleAutoChangeDetectionStatus, manualChangeDetection, parallel, stopHandlingAutoChangeDetectionStatus };