@arcgis/lumina-compiler 5.2.0-next.2 → 5.2.0-next.21
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/dist/context/index.d.ts +158 -296
- package/dist/context/types.d.ts +18 -34
- package/dist/defaultAssetsUrl.d.ts +6 -6
- package/dist/dependencies/discover.d.ts +43 -35
- package/dist/dependencies/updateLumina.d.ts +10 -11
- package/dist/docs/vsCodeCustomData/types.d.ts +5 -42
- package/dist/docs/webTypes/types.d.ts +5 -76
- package/dist/index.d.ts +20 -20
- package/dist/index.js +12 -8
- package/dist/jsxToLitHtml/config.d.ts +93 -121
- package/dist/options.d.ts +675 -0
- package/dist/puppeteerTesting/index.d.ts +18 -11
- package/dist/puppeteerTesting/index.js +104 -7
- package/dist/puppeteerTesting/puppeteer/element.d.ts +250 -217
- package/dist/puppeteerTesting/puppeteer/events.d.ts +15 -21
- package/dist/puppeteerTesting/puppeteer/page.d.ts +8 -5
- package/dist/puppeteerTesting/puppeteer/types.d.ts +130 -132
- package/dist/puppeteerTesting/vitest/matchers/index.d.ts +33 -30
- package/dist/testing/index.d.ts +4 -11
- package/dist/testing/mount.d.ts +113 -93
- package/dist/testing/wrapController.d.ts +5 -11
- package/dist/useLumina.d.ts +5 -2
- package/package.json +15 -7
- package/dist/context/logger.d.ts +0 -8
- package/dist/context/typeScript.d.ts +0 -6
- package/dist/context/utils.d.ts +0 -4
- package/dist/dependencies/arcgisCore.d.ts +0 -30
- package/dist/dependencies/index.d.ts +0 -12
- package/dist/dependencies/loaders.d.ts +0 -5
- package/dist/dependencies/lumina.d.ts +0 -3
- package/dist/dependencies/stencil.d.ts +0 -17
- package/dist/dependencies/testSetupFiles.d.ts +0 -13
- package/dist/dependencies/utils.d.ts +0 -15
- package/dist/docs/config.d.ts +0 -9
- package/dist/docs/index.d.ts +0 -10
- package/dist/docs/stencilDocsJson.d.ts +0 -130
- package/dist/docs/types.d.ts +0 -1
- package/dist/docs/vsCodeCustomData/index.d.ts +0 -16
- package/dist/docs/vsCodeCustomData/utils.d.ts +0 -3
- package/dist/docs/webTypes/description.d.ts +0 -2
- package/dist/docs/webTypes/index.d.ts +0 -19
- package/dist/docs/webTypes/utils.d.ts +0 -6
- package/dist/entrypoints/addNonLazyImports.d.ts +0 -13
- package/dist/entrypoints/config.d.ts +0 -17
- package/dist/entrypoints/dtsUtils.d.ts +0 -19
- package/dist/entrypoints/findUtils.d.ts +0 -6
- package/dist/entrypoints/handleComponentImports.d.ts +0 -13
- package/dist/entrypoints/resolveTagName.d.ts +0 -18
- package/dist/jsxToLitHtml/autoAddNothing.d.ts +0 -8
- package/dist/jsxToLitHtml/comments.d.ts +0 -19
- package/dist/jsxToLitHtml/convertProps.d.ts +0 -10
- package/dist/jsxToLitHtml/imports.d.ts +0 -27
- package/dist/jsxToLitHtml/importsConfig.d.ts +0 -17
- package/dist/jsxToLitHtml/index.d.ts +0 -20
- package/dist/jsxToLitHtml/inferPropType.d.ts +0 -40
- package/dist/jsxToLitHtml/insertRepeatCall.d.ts +0 -51
- package/dist/jsxToLitHtml/jsxVisitor.d.ts +0 -15
- package/dist/jsxToLitHtml/templateParts.d.ts +0 -17
- package/dist/jsxToLitHtml/throwOnImportingExternalized.d.ts +0 -10
- package/dist/jsxToLitHtml/types.d.ts +0 -74
- package/dist/jsxToLitHtml/utils.d.ts +0 -14
- package/dist/loader/css.d.ts +0 -20
- package/dist/loader/extractor.d.ts +0 -2
- package/dist/loader/index.d.ts +0 -21
- package/dist/loader/lazy.d.ts +0 -21
- package/dist/loader/storybookApiJson.d.ts +0 -6
- package/dist/plugins/buildCdn.d.ts +0 -73
- package/dist/plugins/buildWebApp.d.ts +0 -3
- package/dist/plugins/buildWrappers.d.ts +0 -4
- package/dist/plugins/configureVite.d.ts +0 -20
- package/dist/plugins/externalizeDependencies.d.ts +0 -30
- package/dist/plugins/handleDynamicAssets.d.ts +0 -8
- package/dist/plugins/handleStaticAssets.d.ts +0 -9
- package/dist/plugins/loadLitCss.d.ts +0 -127
- package/dist/plugins/printTotalBuildSize.d.ts +0 -7
- package/dist/plugins/provideAssets.d.ts +0 -35
- package/dist/plugins/setAssetsPath.d.ts +0 -10
- package/dist/plugins/updatePackageJson.d.ts +0 -14
- package/dist/publicTypes.d.ts +0 -653
- package/dist/puppeteerTesting/globalSetup.d.ts +0 -73
- package/dist/puppeteerTesting/injected.d.ts +0 -8
- package/dist/puppeteerTesting/puppeteer/browser.d.ts +0 -6
- package/dist/puppeteerTesting/vitest/matchers/attributes.d.ts +0 -4
- package/dist/puppeteerTesting/vitest/matchers/classList.d.ts +0 -4
- package/dist/puppeteerTesting/vitest/matchers/events.d.ts +0 -7
- package/dist/puppeteerTesting/vitest/matchers/text.d.ts +0 -2
- package/dist/puppeteerTesting/vitest/matchers/utils.d.ts +0 -1
- package/dist/puppeteerTesting/vitest/runner.d.ts +0 -19
- package/dist/puppeteerTesting/vitest/setupFile.d.ts +0 -1
- package/dist/puppeteerTesting/vitest/types.d.ts +0 -6
- package/dist/testing/failOnConsole.d.ts +0 -6
- package/dist/testing/setupFile.d.ts +0 -1
- package/dist/testing/snapshotSerializer.d.ts +0 -12
- package/dist/tests/utils.d.ts +0 -4
- package/dist/transformers/customElementDeclaration.d.ts +0 -2
- package/dist/transformers/index.d.ts +0 -20
- package/dist/transformers/injectRuntimeOptions.d.ts +0 -18
- package/dist/transformers/liftDecorators.d.ts +0 -21
- package/dist/transformers/members.d.ts +0 -10
- package/dist/transformers/property.d.ts +0 -10
- package/dist/transformers/propertyOptions.d.ts +0 -110
- package/dist/transformers/utils.d.ts +0 -9
|
@@ -1,220 +1,253 @@
|
|
|
1
|
-
import { ClickOptions, ElementHandle, KeyInput } from
|
|
2
|
-
import { EventSpy } from
|
|
3
|
-
import { E2EPage, FindSelector, SerializedEvent } from
|
|
1
|
+
import type { ClickOptions, ElementHandle, KeyInput } from "puppeteer";
|
|
2
|
+
import type { EventSpy } from "./events.js";
|
|
3
|
+
import type { E2EPage, FindSelector, SerializedEvent } from "./types.js";
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* @internal
|
|
7
|
+
* @knipIgnore
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
9
|
+
export const Superclass: typeof HTMLElement;
|
|
10
|
+
|
|
11
|
+
export abstract class E2EElement extends Superclass {
|
|
12
|
+
/**
|
|
13
|
+
* The '2500' value that we default to is the value of `jasmine.DEFAULT_TIMEOUT_INTERVAL` (5000) divided by 2.
|
|
14
|
+
*
|
|
15
|
+
* @default 2_500
|
|
16
|
+
*/
|
|
17
|
+
static defaultTimeout: number;
|
|
18
|
+
/**
|
|
19
|
+
* We can't directly call `new E22Element()` since it extends HTMLElement
|
|
20
|
+
* which is not directly constructable. Instead, we register it as a custom
|
|
21
|
+
* element.
|
|
22
|
+
*
|
|
23
|
+
* @param page
|
|
24
|
+
* @param handle
|
|
25
|
+
*/
|
|
26
|
+
static create(page: E2EPage, handle: ElementHandle): E2EElement;
|
|
27
|
+
handle: ElementHandle;
|
|
28
|
+
/**
|
|
29
|
+
* Gets and sets `innerHTML` property of the element.
|
|
30
|
+
* Note that `await page.waitForChanges()` must be called before reading
|
|
31
|
+
* the value if content has changed.
|
|
32
|
+
*/
|
|
33
|
+
accessor innerHTML: string;
|
|
34
|
+
/**
|
|
35
|
+
* Gets and sets `innerText` property of the element.
|
|
36
|
+
* Note that `await page.waitForChanges()` must be called before reading
|
|
37
|
+
* the value if content has changed.
|
|
38
|
+
*/
|
|
39
|
+
accessor innerText: string;
|
|
40
|
+
accessor nodeValue: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Gets the element's `outerHTML. This is a read-only property and will
|
|
43
|
+
* throw an error if set.
|
|
44
|
+
*/
|
|
45
|
+
get outerHTML(): string;
|
|
46
|
+
set outerHTML(value: never);
|
|
47
|
+
/**
|
|
48
|
+
* The `textContent` property represents the text content of a node
|
|
49
|
+
* and its descendants. Note that `await page.waitForChanges()` must
|
|
50
|
+
* be called before reading the value if content has changed.
|
|
51
|
+
*/
|
|
52
|
+
accessor textContent: string;
|
|
53
|
+
/** @param waitForVisible */
|
|
54
|
+
awaitVisibility(waitForVisible?: boolean): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Used to call a method on a component. For example, if a component
|
|
57
|
+
* has the method `cmp.myMethod(arg1, arg2)`, calling this method
|
|
58
|
+
* from a e2e test could be `cmp.callMethod('myMethod', arg1, arg2)`.
|
|
59
|
+
*
|
|
60
|
+
* @param methodName
|
|
61
|
+
* @param methodArgs
|
|
62
|
+
*/
|
|
63
|
+
callMethod(methodName: string, ...methodArgs: unknown[]): Promise<unknown>;
|
|
64
|
+
/**
|
|
65
|
+
* Calling `click()` on an element scrolls it into view if needed, and
|
|
66
|
+
* then uses `page.mouse` to click in the center of the element.
|
|
67
|
+
* Please see the puppeteer docs for more information.
|
|
68
|
+
*
|
|
69
|
+
* @param options
|
|
70
|
+
*/
|
|
71
|
+
click(options?: ClickOptions): Promise<void>;
|
|
72
|
+
e2eDispose(): Promise<void>;
|
|
73
|
+
e2eRunActions(): Promise<unknown>;
|
|
74
|
+
e2eSync(): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Find a child element that matches the selector, which is the same as
|
|
77
|
+
* `element.querySelector(selector)`. Use `>>>` within the
|
|
78
|
+
* selector to find an element within a host element's shadow root.
|
|
79
|
+
* For example, to select the first `div` inside of the component
|
|
80
|
+
* `my-cmp`, which is a child of this element, the call would be
|
|
81
|
+
* `element.find('my-cmp >>> div')`. Returns `null` if no
|
|
82
|
+
* elements were found.
|
|
83
|
+
*
|
|
84
|
+
* @param selector
|
|
85
|
+
*/
|
|
86
|
+
find(selector: FindSelector): Promise<E2EElement>;
|
|
87
|
+
/**
|
|
88
|
+
* Find all child elements that match the selector, which is the same as
|
|
89
|
+
* `element.querySelectorAll(selector)`. Use `>>>` within the
|
|
90
|
+
* selector to find elements within a host element's shadow root.
|
|
91
|
+
* For example, to select all `li` elements inside of the component
|
|
92
|
+
* `my-cmp`, which is a child of this element, the call would be
|
|
93
|
+
* `element.findAll('my-cmp >>> li')`. Returns an empty array if
|
|
94
|
+
* no elements were found.
|
|
95
|
+
*
|
|
96
|
+
* @param selector
|
|
97
|
+
*/
|
|
98
|
+
findAll(selector: FindSelector): Promise<E2EElement[]>;
|
|
99
|
+
/** Sets focus on the element. */
|
|
100
|
+
focus(): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Returns the value of a specified attribute on the element. If the
|
|
103
|
+
* given attribute does not exist, the value returned will be null.
|
|
104
|
+
*
|
|
105
|
+
* @param name
|
|
106
|
+
*/
|
|
107
|
+
getAttribute(name: string): string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Returns an object that reports the values of all CSS properties of this
|
|
110
|
+
* element after applying active stylesheets and resolving any basic computation
|
|
111
|
+
* those values may contain. Individual CSS property values are accessed by
|
|
112
|
+
* simply indexing with CSS property names. The method is shortcut and an async
|
|
113
|
+
* version of using `window.getComputedStyle(element)` directly.
|
|
114
|
+
*
|
|
115
|
+
* @param pseudoElement
|
|
116
|
+
*/
|
|
117
|
+
getComputedStyle(pseudoElement?: string | null): Promise<CSSStyleDeclaration>;
|
|
118
|
+
/**
|
|
119
|
+
* Returns the value of a specified attribute on the element. If the
|
|
120
|
+
* given attribute does not exist, the value returned will be null.
|
|
121
|
+
*
|
|
122
|
+
* @param propertyName
|
|
123
|
+
*/
|
|
124
|
+
getProperty<T = any>(propertyName: string): Promise<T>;
|
|
125
|
+
/** Sets hover on the element. */
|
|
126
|
+
hover(): Promise<void>;
|
|
127
|
+
/** Resolves to true if the element is visible in the current viewport. */
|
|
128
|
+
isIntersectingViewport(): Promise<boolean>;
|
|
129
|
+
/**
|
|
130
|
+
* Resolves `true` when the element's style is `display !== 'none'`,
|
|
131
|
+
* `visibility !== 'hidden'` and `opacity !== '0'`.
|
|
132
|
+
*/
|
|
133
|
+
isVisible(): Promise<boolean>;
|
|
134
|
+
/**
|
|
135
|
+
* Focuses the element, and then uses `keyboard.down` and `keyboard.up`.
|
|
136
|
+
* If key is a single character and no modifier keys besides Shift are
|
|
137
|
+
* being held down, a keypress/input event will also be generated. The
|
|
138
|
+
* text option can be specified to force an input event to be generated.
|
|
139
|
+
* Note: Modifier keys DO effect `elementHandle.press`. Holding down Shift
|
|
140
|
+
* will type the text in upper case.
|
|
141
|
+
* Key names: https://github.com/puppeteer/puppeteer/blob/main/src/common/USKeyboardLayout.ts
|
|
142
|
+
*
|
|
143
|
+
* @param key
|
|
144
|
+
* @param options
|
|
145
|
+
*/
|
|
146
|
+
press(key: KeyInput, options?: {
|
|
147
|
+
text?: string;
|
|
148
|
+
delay?: number;
|
|
149
|
+
}): Promise<void>;
|
|
150
|
+
/**
|
|
151
|
+
* Removes the attribute on the specified element. Note that
|
|
152
|
+
* `await page.waitForChanges()` must be called before reading
|
|
153
|
+
* the value if content has changed.
|
|
154
|
+
*
|
|
155
|
+
* @param name
|
|
156
|
+
*/
|
|
157
|
+
removeAttribute(name: string): void;
|
|
158
|
+
/**
|
|
159
|
+
* Removes the attribute on the specified element. Note that
|
|
160
|
+
* `await page.waitForChanges()` must be called before reading
|
|
161
|
+
* the value if content has changed.
|
|
162
|
+
*
|
|
163
|
+
* @param name
|
|
164
|
+
* @param value
|
|
165
|
+
*/
|
|
166
|
+
setAttribute(name: string, value: string): void;
|
|
167
|
+
/**
|
|
168
|
+
* Used to set a property set on a component. For example, if a
|
|
169
|
+
* component has the property `elm.myProp`, then calling
|
|
170
|
+
* `elm.setProperty('myProp', 88)` would set the value `88` to
|
|
171
|
+
* the `myProp` property on the component.
|
|
172
|
+
*
|
|
173
|
+
* @param propertyName
|
|
174
|
+
* @param value
|
|
175
|
+
*/
|
|
176
|
+
setProperty(propertyName: string, value: unknown): void;
|
|
177
|
+
/**
|
|
178
|
+
* Used to test if an event was, or was not dispatched. This method
|
|
179
|
+
* returns a promise, that resolves with an EventSpy. The EventSpy
|
|
180
|
+
* can be used along with `expect(spy).toHaveReceivedEvent()`,
|
|
181
|
+
* `expect(spy).toHaveReceivedEventTimes(x)` and
|
|
182
|
+
* `expect(spy).toHaveReceivedEventDetail({...})`.
|
|
183
|
+
*
|
|
184
|
+
* @param eventName
|
|
185
|
+
*/
|
|
186
|
+
spyOnEvent<Detail = unknown>(eventName: string): Promise<EventSpy<Detail>>;
|
|
187
|
+
/**
|
|
188
|
+
* This method scrolls the element it into view if needed,
|
|
189
|
+
* and then uses `page.touchscreen` to tap in the center of the element.
|
|
190
|
+
*/
|
|
191
|
+
tap(): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Toggles a `boolean` attribute (removing it if it is present and adding
|
|
194
|
+
* it if it is not present) on the given element. Note that
|
|
195
|
+
* `await page.waitForChanges()` must be called before reading
|
|
196
|
+
* the value if content has changed. The optional `force` argument is a
|
|
197
|
+
* `boolean` value to determine whether the attribute should be added or
|
|
198
|
+
* removed, no matter whether the attribute is present or not at the moment.
|
|
199
|
+
*
|
|
200
|
+
* @param name
|
|
201
|
+
* @param force
|
|
202
|
+
*/
|
|
203
|
+
toggleAttribute(name: string, force?: boolean): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* This is a convenience method to easily create a `CustomEvent`,
|
|
206
|
+
* and dispatch it from the element, to include any custom event
|
|
207
|
+
* `detail` data as the second argument.
|
|
208
|
+
*
|
|
209
|
+
* @param eventName
|
|
210
|
+
* @param eventInitDict
|
|
211
|
+
*/
|
|
212
|
+
triggerEvent(eventName: string, eventInitDict?: EventInit): void;
|
|
213
|
+
/**
|
|
214
|
+
* Sends a keydown, keypress/input, and keyup event for each character in the text.
|
|
215
|
+
* To press a special key, like Control or ArrowDown, use `keyboard.press`.
|
|
216
|
+
*
|
|
217
|
+
* @param text
|
|
218
|
+
* @param options
|
|
219
|
+
*/
|
|
220
|
+
type(text: string, options?: { delay: number; }): Promise<void>;
|
|
221
|
+
/**
|
|
222
|
+
* Waits until the given event is listened in the element.
|
|
223
|
+
*
|
|
224
|
+
* @param eventName
|
|
225
|
+
*/
|
|
226
|
+
waitForEvent<Detail = unknown>(eventName: string): Promise<SerializedEvent<Detail>>;
|
|
227
|
+
/**
|
|
228
|
+
* Waits until the element's style is `display === 'none'`, or
|
|
229
|
+
* `visibility === 'hidden'`, or `opacity === '0'`, or the element
|
|
230
|
+
* is no longer connected to the document.
|
|
231
|
+
*/
|
|
232
|
+
waitForNotVisible(): Promise<void>;
|
|
233
|
+
/**
|
|
234
|
+
* Waits until the element's style is `display !== 'none'`,
|
|
235
|
+
* `visibility !== 'hidden'`, `opacity !== '0'` and the element
|
|
236
|
+
* is connected to the document.
|
|
237
|
+
*/
|
|
238
|
+
waitForVisible(): Promise<void>;
|
|
217
239
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @param page
|
|
243
|
+
* @param rootHandle
|
|
244
|
+
* @param selector
|
|
245
|
+
*/
|
|
246
|
+
export function find(page: E2EPage, rootHandle: ElementHandle, selector: FindSelector): Promise<E2EElement | null>;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @param page
|
|
250
|
+
* @param rootHandle
|
|
251
|
+
* @param selector
|
|
252
|
+
*/
|
|
253
|
+
export function findAll(page: E2EPage, rootHandle: ElementHandle, selector: FindSelector): Promise<E2EElement[]>;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
done: boolean;
|
|
17
|
-
value: SerializedEvent<Detail> | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
push(event: SerializedEvent<Detail>): void;
|
|
20
|
-
}
|
|
21
|
-
export declare function addE2EListener(page: E2EPage, elementHandle: JSHandle, eventName: string, callback: (event: SerializedEvent) => void): Promise<void>;
|
|
1
|
+
import type { SerializedEvent } from "./types.js";
|
|
2
|
+
|
|
3
|
+
export abstract class EventSpy<Detail = unknown> {
|
|
4
|
+
eventName: string;
|
|
5
|
+
events: SerializedEvent<Detail>[];
|
|
6
|
+
get firstEvent(): SerializedEvent<Detail> | undefined;
|
|
7
|
+
get lastEvent(): SerializedEvent<Detail> | undefined;
|
|
8
|
+
get length(): number;
|
|
9
|
+
next(): Promise<{
|
|
10
|
+
done: boolean;
|
|
11
|
+
value: SerializedEvent<Detail> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
/** @param event */
|
|
14
|
+
push(event: SerializedEvent<Detail>): void;
|
|
15
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { E2EPage } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { E2EPage } from "./types.js";
|
|
2
|
+
|
|
3
|
+
export interface NewE2EPageOptions {
|
|
4
|
+
html?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/** @param options */
|
|
8
|
+
export function newE2EPage(options?: NewE2EPageOptions): Promise<E2EPage>;
|