@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,13 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export type
|
|
7
|
-
export {
|
|
1
|
+
import type { Assertion } from "vitest";
|
|
2
|
+
|
|
3
|
+
export type * from "./puppeteer/types.js";
|
|
4
|
+
export { type NewE2EPageOptions } from "./puppeteer/page.js";
|
|
5
|
+
export { newE2EPage } from "./puppeteer/page.js";
|
|
6
|
+
export { type E2EElement } from "./puppeteer/element.js";
|
|
7
|
+
export { type EventSpy } from "./puppeteer/events.js";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
/** @public */
|
|
8
12
|
declare module "vitest" {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
type PuppeteerMatchers<R = unknown> = import("./vitest/matchers/index.js").PuppeteerMatchers<R>;
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
interface Assertion<T = any> extends PuppeteerMatchers<T> {}
|
|
16
|
+
interface AsymmetricMatchersContaining extends PuppeteerMatchers {}
|
|
13
17
|
}
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type AssertionType = Assertion;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { toSystemPathSeparators as V, isPosix as L } from "@arcgis/components-build-utils";
|
|
1
|
+
import { toSystemPathSeparators as S, isPosix as V } from "@arcgis/components-build-utils";
|
|
3
2
|
import { p as T, i as h } from "../types-C3YmWTVv.js";
|
|
4
3
|
import { l as y } from "../logger-C9XakOcA.js";
|
|
4
|
+
import { expect as p, afterEach as L } from "vitest";
|
|
5
5
|
async function D(s) {
|
|
6
6
|
await s.exposeFunction("puppeteerOnEvent", (e, t) => {
|
|
7
7
|
j(s._e2eEvents, e, t);
|
|
@@ -37,15 +37,19 @@ class C {
|
|
|
37
37
|
constructor(e) {
|
|
38
38
|
this.events = [], this._cursor = 0, this._queuedHandler = [], this.eventName = e;
|
|
39
39
|
}
|
|
40
|
+
/** @public */
|
|
40
41
|
get length() {
|
|
41
42
|
return this.events.length;
|
|
42
43
|
}
|
|
44
|
+
/** @public */
|
|
43
45
|
get firstEvent() {
|
|
44
46
|
return this.events.at(0);
|
|
45
47
|
}
|
|
48
|
+
/** @public */
|
|
46
49
|
get lastEvent() {
|
|
47
50
|
return this.events.at(-1);
|
|
48
51
|
}
|
|
52
|
+
/** @public */
|
|
49
53
|
async next() {
|
|
50
54
|
const e = this._cursor;
|
|
51
55
|
this._cursor++;
|
|
@@ -64,6 +68,10 @@ class C {
|
|
|
64
68
|
}));
|
|
65
69
|
}
|
|
66
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* @public
|
|
73
|
+
* @param event
|
|
74
|
+
*/
|
|
67
75
|
push(e) {
|
|
68
76
|
this.events.push(e);
|
|
69
77
|
const t = this._queuedHandler.shift();
|
|
@@ -131,8 +139,8 @@ function z() {
|
|
|
131
139
|
isSerializedEvent: !0
|
|
132
140
|
});
|
|
133
141
|
}
|
|
134
|
-
const M = globalThis.HTMLElement ?? function() {
|
|
135
|
-
};
|
|
142
|
+
const M = globalThis.HTMLElement ?? (function() {
|
|
143
|
+
});
|
|
136
144
|
class d extends M {
|
|
137
145
|
constructor(e = d._page, t = d._handle) {
|
|
138
146
|
super(), this._queuedActions = [], this._temporaryDisableValidation = !1, this._page = e, this.handle = t, e._e2eElements.push(this);
|
|
@@ -167,6 +175,10 @@ class d extends M {
|
|
|
167
175
|
* We can't directly call `new E22Element()` since it extends HTMLElement
|
|
168
176
|
* which is not directly constructable. Instead, we register it as a custom
|
|
169
177
|
* element.
|
|
178
|
+
*
|
|
179
|
+
* @public
|
|
180
|
+
* @param page
|
|
181
|
+
* @param handle
|
|
170
182
|
*/
|
|
171
183
|
static create(e, t) {
|
|
172
184
|
customElements.get("e2e-element") || customElements.define("e2e-element", d), d._page = e, d._handle = t;
|
|
@@ -181,6 +193,9 @@ class d extends M {
|
|
|
181
193
|
* `my-cmp`, which is a child of this element, the call would be
|
|
182
194
|
* `element.find('my-cmp >>> div')`. Returns `null` if no
|
|
183
195
|
* elements were found.
|
|
196
|
+
*
|
|
197
|
+
* @public
|
|
198
|
+
* @param selector
|
|
184
199
|
*/
|
|
185
200
|
async find(e) {
|
|
186
201
|
return await x(this._page, this.handle, e);
|
|
@@ -193,6 +208,9 @@ class d extends M {
|
|
|
193
208
|
* `my-cmp`, which is a child of this element, the call would be
|
|
194
209
|
* `element.findAll('my-cmp >>> li')`. Returns an empty array if
|
|
195
210
|
* no elements were found.
|
|
211
|
+
*
|
|
212
|
+
* @public
|
|
213
|
+
* @param selector
|
|
196
214
|
*/
|
|
197
215
|
async findAll(e) {
|
|
198
216
|
return await P(this._page, this.handle, e);
|
|
@@ -201,6 +219,10 @@ class d extends M {
|
|
|
201
219
|
* Used to call a method on a component. For example, if a component
|
|
202
220
|
* has the method `cmp.myMethod(arg1, arg2)`, calling this method
|
|
203
221
|
* from a e2e test could be `cmp.callMethod('myMethod', arg1, arg2)`.
|
|
222
|
+
*
|
|
223
|
+
* @public
|
|
224
|
+
* @param methodName
|
|
225
|
+
* @param methodArgs
|
|
204
226
|
*/
|
|
205
227
|
async callMethod(e, ...t) {
|
|
206
228
|
return this._queuedActions.push({
|
|
@@ -212,6 +234,10 @@ class d extends M {
|
|
|
212
234
|
* This is a convenience method to easily create a `CustomEvent`,
|
|
213
235
|
* and dispatch it from the element, to include any custom event
|
|
214
236
|
* `detail` data as the second argument.
|
|
237
|
+
*
|
|
238
|
+
* @public
|
|
239
|
+
* @param eventName
|
|
240
|
+
* @param eventInitDict
|
|
215
241
|
*/
|
|
216
242
|
triggerEvent(e, t) {
|
|
217
243
|
this._queuedActions.push({
|
|
@@ -225,6 +251,9 @@ class d extends M {
|
|
|
225
251
|
* can be used along with `expect(spy).toHaveReceivedEvent()`,
|
|
226
252
|
* `expect(spy).toHaveReceivedEventTimes(x)` and
|
|
227
253
|
* `expect(spy).toHaveReceivedEventDetail({...})`.
|
|
254
|
+
*
|
|
255
|
+
* @public
|
|
256
|
+
* @param eventName
|
|
228
257
|
*/
|
|
229
258
|
async spyOnEvent(e) {
|
|
230
259
|
const t = new C(e);
|
|
@@ -236,6 +265,9 @@ class d extends M {
|
|
|
236
265
|
* Calling `click()` on an element scrolls it into view if needed, and
|
|
237
266
|
* then uses `page.mouse` to click in the center of the element.
|
|
238
267
|
* Please see the puppeteer docs for more information.
|
|
268
|
+
*
|
|
269
|
+
* @public
|
|
270
|
+
* @param options
|
|
239
271
|
*/
|
|
240
272
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
241
273
|
async click(e) {
|
|
@@ -243,6 +275,8 @@ class d extends M {
|
|
|
243
275
|
}
|
|
244
276
|
/**
|
|
245
277
|
* Sets focus on the element.
|
|
278
|
+
*
|
|
279
|
+
* @public
|
|
246
280
|
*/
|
|
247
281
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
248
282
|
async focus() {
|
|
@@ -250,6 +284,8 @@ class d extends M {
|
|
|
250
284
|
}
|
|
251
285
|
/**
|
|
252
286
|
* Sets hover on the element.
|
|
287
|
+
*
|
|
288
|
+
* @public
|
|
253
289
|
*/
|
|
254
290
|
async hover() {
|
|
255
291
|
await this.handle.hover(), await this._page.waitForChanges();
|
|
@@ -257,6 +293,8 @@ class d extends M {
|
|
|
257
293
|
/**
|
|
258
294
|
* Resolves `true` when the element's style is `display !== 'none'`,
|
|
259
295
|
* `visibility !== 'hidden'` and `opacity !== '0'`.
|
|
296
|
+
*
|
|
297
|
+
* @public
|
|
260
298
|
*/
|
|
261
299
|
async isVisible() {
|
|
262
300
|
this._validate();
|
|
@@ -282,6 +320,9 @@ class d extends M {
|
|
|
282
320
|
}
|
|
283
321
|
/**
|
|
284
322
|
* Waits until the given event is listened in the element.
|
|
323
|
+
*
|
|
324
|
+
* @public
|
|
325
|
+
* @param eventName
|
|
285
326
|
*/
|
|
286
327
|
async waitForEvent(e) {
|
|
287
328
|
return await $(this._page, e, this.handle);
|
|
@@ -290,6 +331,8 @@ class d extends M {
|
|
|
290
331
|
* Waits until the element's style is `display !== 'none'`,
|
|
291
332
|
* `visibility !== 'hidden'`, `opacity !== '0'` and the element
|
|
292
333
|
* is connected to the document.
|
|
334
|
+
*
|
|
335
|
+
* @public
|
|
293
336
|
*/
|
|
294
337
|
async waitForVisible() {
|
|
295
338
|
await this.awaitVisibility();
|
|
@@ -298,10 +341,16 @@ class d extends M {
|
|
|
298
341
|
* Waits until the element's style is `display === 'none'`, or
|
|
299
342
|
* `visibility === 'hidden'`, or `opacity === '0'`, or the element
|
|
300
343
|
* is no longer connected to the document.
|
|
344
|
+
*
|
|
345
|
+
* @public
|
|
301
346
|
*/
|
|
302
347
|
async waitForNotVisible() {
|
|
303
348
|
await this.awaitVisibility(!1);
|
|
304
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* @public
|
|
352
|
+
* @param waitForVisible
|
|
353
|
+
*/
|
|
305
354
|
async awaitVisibility(e = !0) {
|
|
306
355
|
await new Promise((t, n) => {
|
|
307
356
|
const a = async () => {
|
|
@@ -316,6 +365,8 @@ class d extends M {
|
|
|
316
365
|
}
|
|
317
366
|
/**
|
|
318
367
|
* Resolves to true if the element is visible in the current viewport.
|
|
368
|
+
*
|
|
369
|
+
* @public
|
|
319
370
|
*/
|
|
320
371
|
async isIntersectingViewport() {
|
|
321
372
|
return await this.handle.isIntersectingViewport();
|
|
@@ -328,6 +379,10 @@ class d extends M {
|
|
|
328
379
|
* Note: Modifier keys DO effect `elementHandle.press`. Holding down Shift
|
|
329
380
|
* will type the text in upper case.
|
|
330
381
|
* Key names: https://github.com/puppeteer/puppeteer/blob/main/src/common/USKeyboardLayout.ts
|
|
382
|
+
*
|
|
383
|
+
* @public
|
|
384
|
+
* @param key
|
|
385
|
+
* @param options
|
|
331
386
|
*/
|
|
332
387
|
async press(e, t) {
|
|
333
388
|
await this.handle.press(e, t), await this._page.waitForChanges();
|
|
@@ -335,6 +390,8 @@ class d extends M {
|
|
|
335
390
|
/**
|
|
336
391
|
* This method scrolls the element it into view if needed,
|
|
337
392
|
* and then uses `page.touchscreen` to tap in the center of the element.
|
|
393
|
+
*
|
|
394
|
+
* @public
|
|
338
395
|
*/
|
|
339
396
|
async tap() {
|
|
340
397
|
await this.handle.tap(), await this._page.waitForChanges();
|
|
@@ -342,6 +399,10 @@ class d extends M {
|
|
|
342
399
|
/**
|
|
343
400
|
* Sends a keydown, keypress/input, and keyup event for each character in the text.
|
|
344
401
|
* To press a special key, like Control or ArrowDown, use `keyboard.press`.
|
|
402
|
+
*
|
|
403
|
+
* @public
|
|
404
|
+
* @param text
|
|
405
|
+
* @param options
|
|
345
406
|
*/
|
|
346
407
|
async type(e, t) {
|
|
347
408
|
await this.handle.type(e, t), await this._page.waitForChanges();
|
|
@@ -349,6 +410,9 @@ class d extends M {
|
|
|
349
410
|
/**
|
|
350
411
|
* Returns the value of a specified attribute on the element. If the
|
|
351
412
|
* given attribute does not exist, the value returned will be null.
|
|
413
|
+
*
|
|
414
|
+
* @public
|
|
415
|
+
* @param propertyName
|
|
352
416
|
*/
|
|
353
417
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
354
418
|
async getProperty(e) {
|
|
@@ -363,6 +427,10 @@ class d extends M {
|
|
|
363
427
|
* component has the property `elm.myProp`, then calling
|
|
364
428
|
* `elm.setProperty('myProp', 88)` would set the value `88` to
|
|
365
429
|
* the `myProp` property on the component.
|
|
430
|
+
*
|
|
431
|
+
* @public
|
|
432
|
+
* @param propertyName
|
|
433
|
+
* @param value
|
|
366
434
|
*/
|
|
367
435
|
setProperty(e, t) {
|
|
368
436
|
this._queuedActions.push({
|
|
@@ -373,6 +441,9 @@ class d extends M {
|
|
|
373
441
|
/**
|
|
374
442
|
* Returns the value of a specified attribute on the element. If the
|
|
375
443
|
* given attribute does not exist, the value returned will be null.
|
|
444
|
+
*
|
|
445
|
+
* @public
|
|
446
|
+
* @param name
|
|
376
447
|
*/
|
|
377
448
|
getAttribute(e) {
|
|
378
449
|
return this._validate(), super.getAttribute(e);
|
|
@@ -381,6 +452,10 @@ class d extends M {
|
|
|
381
452
|
* Removes the attribute on the specified element. Note that
|
|
382
453
|
* `await page.waitForChanges()` must be called before reading
|
|
383
454
|
* the value if content has changed.
|
|
455
|
+
*
|
|
456
|
+
* @public
|
|
457
|
+
* @param name
|
|
458
|
+
* @param value
|
|
384
459
|
*/
|
|
385
460
|
setAttribute(e, t) {
|
|
386
461
|
super.setAttribute(e, t), this._queuedActions.push({
|
|
@@ -392,6 +467,9 @@ class d extends M {
|
|
|
392
467
|
* Removes the attribute on the specified element. Note that
|
|
393
468
|
* `await page.waitForChanges()` must be called before reading
|
|
394
469
|
* the value if content has changed.
|
|
470
|
+
*
|
|
471
|
+
* @public
|
|
472
|
+
* @param name
|
|
395
473
|
*/
|
|
396
474
|
removeAttribute(e) {
|
|
397
475
|
super.removeAttribute(e), this._queuedActions.push({
|
|
@@ -405,6 +483,10 @@ class d extends M {
|
|
|
405
483
|
* the value if content has changed. The optional `force` argument is a
|
|
406
484
|
* `boolean` value to determine whether the attribute should be added or
|
|
407
485
|
* removed, no matter whether the attribute is present or not at the moment.
|
|
486
|
+
*
|
|
487
|
+
* @public
|
|
488
|
+
* @param name
|
|
489
|
+
* @param force
|
|
408
490
|
*/
|
|
409
491
|
toggleAttribute(e, t) {
|
|
410
492
|
const n = super.toggleAttribute(e, t);
|
|
@@ -417,6 +499,8 @@ class d extends M {
|
|
|
417
499
|
* Gets and sets `innerHTML` property of the element.
|
|
418
500
|
* Note that `await page.waitForChanges()` must be called before reading
|
|
419
501
|
* the value if content has changed.
|
|
502
|
+
*
|
|
503
|
+
* @public
|
|
420
504
|
*/
|
|
421
505
|
get innerHTML() {
|
|
422
506
|
return this._validate(), super.innerHTML;
|
|
@@ -431,6 +515,8 @@ class d extends M {
|
|
|
431
515
|
* Gets and sets `innerText` property of the element.
|
|
432
516
|
* Note that `await page.waitForChanges()` must be called before reading
|
|
433
517
|
* the value if content has changed.
|
|
518
|
+
*
|
|
519
|
+
* @public
|
|
434
520
|
*/
|
|
435
521
|
get innerText() {
|
|
436
522
|
return this._validate(), super.innerText;
|
|
@@ -441,6 +527,7 @@ class d extends M {
|
|
|
441
527
|
setPropertyValue: e
|
|
442
528
|
});
|
|
443
529
|
}
|
|
530
|
+
/** @public */
|
|
444
531
|
get nodeValue() {
|
|
445
532
|
return this._validate(), super.nodeValue;
|
|
446
533
|
}
|
|
@@ -453,6 +540,8 @@ class d extends M {
|
|
|
453
540
|
/**
|
|
454
541
|
* Gets the element's `outerHTML. This is a read-only property and will
|
|
455
542
|
* throw an error if set.
|
|
543
|
+
*
|
|
544
|
+
* @public
|
|
456
545
|
*/
|
|
457
546
|
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
458
547
|
get outerHTML() {
|
|
@@ -465,6 +554,8 @@ class d extends M {
|
|
|
465
554
|
* The `textContent` property represents the text content of a node
|
|
466
555
|
* and its descendants. Note that `await page.waitForChanges()` must
|
|
467
556
|
* be called before reading the value if content has changed.
|
|
557
|
+
*
|
|
558
|
+
* @public
|
|
468
559
|
*/
|
|
469
560
|
get textContent() {
|
|
470
561
|
return this._validate(), super.textContent;
|
|
@@ -481,6 +572,9 @@ class d extends M {
|
|
|
481
572
|
* those values may contain. Individual CSS property values are accessed by
|
|
482
573
|
* simply indexing with CSS property names. The method is shortcut and an async
|
|
483
574
|
* version of using `window.getComputedStyle(element)` directly.
|
|
575
|
+
*
|
|
576
|
+
* @public
|
|
577
|
+
* @param pseudoElement
|
|
484
578
|
*/
|
|
485
579
|
async getComputedStyle(e) {
|
|
486
580
|
e !== "::after" && e !== "::before" && e !== ":after" && e !== ":before" && (e = null);
|
|
@@ -523,6 +617,7 @@ class d extends M {
|
|
|
523
617
|
);
|
|
524
618
|
return t.getPropertyValue = (n) => t[n], t;
|
|
525
619
|
}
|
|
620
|
+
/** @public */
|
|
526
621
|
async e2eRunActions() {
|
|
527
622
|
if (this._queuedActions.length === 0)
|
|
528
623
|
return;
|
|
@@ -569,6 +664,7 @@ class d extends M {
|
|
|
569
664
|
);
|
|
570
665
|
return this._queuedActions.length = 0, t;
|
|
571
666
|
}
|
|
667
|
+
/** @public */
|
|
572
668
|
async e2eSync() {
|
|
573
669
|
const e = this.handle.frame, { outerHtml: t, shadowRootHtml: n } = await e.evaluate(
|
|
574
670
|
(r) => ({
|
|
@@ -618,6 +714,7 @@ class d extends M {
|
|
|
618
714
|
throw new Error("trying to read from a disposed element");
|
|
619
715
|
}
|
|
620
716
|
}
|
|
717
|
+
/** @public */
|
|
621
718
|
async e2eDispose() {
|
|
622
719
|
this.handle && (await this.handle.dispose(), this.handle = null);
|
|
623
720
|
const e = this._page._e2eElements.indexOf(this);
|
|
@@ -977,12 +1074,12 @@ function K(s) {
|
|
|
977
1074
|
if (s?.url) {
|
|
978
1075
|
const t = s.url.indexOf(_);
|
|
979
1076
|
e = ` ${decodeURIComponent(
|
|
980
|
-
t === -1 ? s.url :
|
|
1077
|
+
t === -1 ? s.url : S(s.url.slice(t + _.length))
|
|
981
1078
|
)}`, s.lineNumber && (e += `:${s.lineNumber}`), s.columnNumber && (e += `:${s.columnNumber}`);
|
|
982
1079
|
}
|
|
983
1080
|
return e;
|
|
984
1081
|
}
|
|
985
|
-
const _ =
|
|
1082
|
+
const _ = V ? "/@fs" : "/@fs/";
|
|
986
1083
|
function f(s, e) {
|
|
987
1084
|
if (typeof s != "object" || s === null)
|
|
988
1085
|
throw new Error(`${e} expect called with non-element value`);
|
|
@@ -1124,7 +1221,7 @@ const ne = (s, e) => {
|
|
|
1124
1221
|
toHaveNthReceivedEventDetail: oe
|
|
1125
1222
|
};
|
|
1126
1223
|
function pe() {
|
|
1127
|
-
p.extend(ce),
|
|
1224
|
+
p.extend(ce), L(() => {
|
|
1128
1225
|
document.body.childNodes.forEach(R);
|
|
1129
1226
|
});
|
|
1130
1227
|
}
|