@stencil/core 4.43.2 → 5.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/stencil.mjs +2 -0
- package/dist/chunk-ClPoSABd.mjs +21 -0
- package/dist/client-DR9zhmKG.mjs +4449 -0
- package/dist/compiler/index.d.mts +187 -0
- package/dist/compiler/index.mjs +9 -0
- package/dist/compiler/utils/index.d.mts +3 -0
- package/dist/compiler/utils/index.mjs +5 -0
- package/dist/declarations/stencil-public-compiler.d.ts +4401 -0
- package/dist/declarations/stencil-public-compiler.js +53 -0
- package/dist/declarations/stencil-public-runtime.d.ts +1857 -0
- package/dist/index-Bxo2jCf6.d.mts +77 -0
- package/dist/index-szczUd2l.d.mts +6851 -0
- package/{internal/stencil-core/index.d.ts → dist/index.d.mts} +7 -3
- package/dist/index.mjs +4 -0
- package/dist/mock-doc.d.mts +1 -0
- package/dist/mock-doc.mjs +3 -0
- package/dist/node-sys-BGURUNOZ.mjs +1954 -0
- package/{internal → dist/runtime}/app-data/index.d.ts +11 -7
- package/dist/runtime/app-data/index.js +100 -0
- package/dist/runtime/app-globals/index.d.ts +5 -0
- package/dist/runtime/app-globals/index.js +6 -0
- package/dist/runtime/client/index.d.ts +2286 -0
- package/dist/runtime/client/index.js +4839 -0
- package/dist/runtime/index.d.ts +221 -0
- package/dist/runtime/index.js +4819 -0
- package/dist/runtime/server/index.d.mts +1277 -0
- package/dist/runtime/server/index.mjs +5376 -0
- package/dist/runtime/server/runner.d.mts +298 -0
- package/dist/runtime/server/runner.mjs +1976 -0
- package/dist/serialize-BJvhE9aQ.mjs +775 -0
- package/dist/stencil-private-Cgcr414u.d.ts +1893 -0
- package/dist/sys/node/index.d.mts +33 -0
- package/dist/sys/node/index.mjs +7 -0
- package/dist/sys/node/worker.d.mts +1 -0
- package/dist/sys/node/worker.mjs +60 -0
- package/dist/testing/index.d.mts +207 -0
- package/dist/testing/index.mjs +1188 -0
- package/dist/transpile-CJQcQEVa.mjs +21854 -0
- package/dist/validation-BdcPruW_.mjs +1451 -0
- package/package.json +88 -232
- package/bin/stencil +0 -57
- package/cli/config-flags.d.ts +0 -132
- package/cli/index.cjs +0 -5816
- package/cli/index.d.ts +0 -19
- package/cli/index.js +0 -5809
- package/cli/package.json +0 -14
- package/compiler/lib.d.ts +0 -22
- package/compiler/lib.decorators.d.ts +0 -384
- package/compiler/lib.decorators.legacy.d.ts +0 -22
- package/compiler/lib.dom.asynciterable.d.ts +0 -41
- package/compiler/lib.dom.d.ts +0 -29610
- package/compiler/lib.dom.iterable.d.ts +0 -493
- package/compiler/lib.es2015.collection.d.ts +0 -147
- package/compiler/lib.es2015.core.d.ts +0 -597
- package/compiler/lib.es2015.d.ts +0 -28
- package/compiler/lib.es2015.generator.d.ts +0 -77
- package/compiler/lib.es2015.iterable.d.ts +0 -605
- package/compiler/lib.es2015.promise.d.ts +0 -81
- package/compiler/lib.es2015.proxy.d.ts +0 -128
- package/compiler/lib.es2015.reflect.d.ts +0 -144
- package/compiler/lib.es2015.symbol.d.ts +0 -46
- package/compiler/lib.es2015.symbol.wellknown.d.ts +0 -326
- package/compiler/lib.es2016.array.include.d.ts +0 -116
- package/compiler/lib.es2016.d.ts +0 -21
- package/compiler/lib.es2016.full.d.ts +0 -23
- package/compiler/lib.es2016.intl.d.ts +0 -31
- package/compiler/lib.es2017.arraybuffer.d.ts +0 -21
- package/compiler/lib.es2017.d.ts +0 -26
- package/compiler/lib.es2017.date.d.ts +0 -31
- package/compiler/lib.es2017.full.d.ts +0 -23
- package/compiler/lib.es2017.intl.d.ts +0 -44
- package/compiler/lib.es2017.object.d.ts +0 -49
- package/compiler/lib.es2017.sharedmemory.d.ts +0 -135
- package/compiler/lib.es2017.string.d.ts +0 -45
- package/compiler/lib.es2017.typedarrays.d.ts +0 -53
- package/compiler/lib.es2018.asyncgenerator.d.ts +0 -77
- package/compiler/lib.es2018.asynciterable.d.ts +0 -53
- package/compiler/lib.es2018.d.ts +0 -24
- package/compiler/lib.es2018.full.d.ts +0 -24
- package/compiler/lib.es2018.intl.d.ts +0 -83
- package/compiler/lib.es2018.promise.d.ts +0 -30
- package/compiler/lib.es2018.regexp.d.ts +0 -37
- package/compiler/lib.es2019.array.d.ts +0 -79
- package/compiler/lib.es2019.d.ts +0 -24
- package/compiler/lib.es2019.full.d.ts +0 -24
- package/compiler/lib.es2019.intl.d.ts +0 -23
- package/compiler/lib.es2019.object.d.ts +0 -33
- package/compiler/lib.es2019.string.d.ts +0 -37
- package/compiler/lib.es2019.symbol.d.ts +0 -24
- package/compiler/lib.es2020.bigint.d.ts +0 -765
- package/compiler/lib.es2020.d.ts +0 -27
- package/compiler/lib.es2020.date.d.ts +0 -42
- package/compiler/lib.es2020.full.d.ts +0 -24
- package/compiler/lib.es2020.intl.d.ts +0 -474
- package/compiler/lib.es2020.number.d.ts +0 -28
- package/compiler/lib.es2020.promise.d.ts +0 -47
- package/compiler/lib.es2020.sharedmemory.d.ts +0 -99
- package/compiler/lib.es2020.string.d.ts +0 -44
- package/compiler/lib.es2020.symbol.wellknown.d.ts +0 -41
- package/compiler/lib.es2021.d.ts +0 -23
- package/compiler/lib.es2021.full.d.ts +0 -24
- package/compiler/lib.es2021.intl.d.ts +0 -166
- package/compiler/lib.es2021.promise.d.ts +0 -48
- package/compiler/lib.es2021.string.d.ts +0 -33
- package/compiler/lib.es2021.weakref.d.ts +0 -78
- package/compiler/lib.es2022.array.d.ts +0 -121
- package/compiler/lib.es2022.d.ts +0 -25
- package/compiler/lib.es2022.error.d.ts +0 -75
- package/compiler/lib.es2022.full.d.ts +0 -24
- package/compiler/lib.es2022.intl.d.ts +0 -121
- package/compiler/lib.es2022.object.d.ts +0 -26
- package/compiler/lib.es2022.regexp.d.ts +0 -39
- package/compiler/lib.es2022.string.d.ts +0 -25
- package/compiler/lib.es2023.array.d.ts +0 -924
- package/compiler/lib.es2023.collection.d.ts +0 -21
- package/compiler/lib.es2023.d.ts +0 -22
- package/compiler/lib.es2023.full.d.ts +0 -24
- package/compiler/lib.es2023.intl.d.ts +0 -56
- package/compiler/lib.es2024.arraybuffer.d.ts +0 -65
- package/compiler/lib.es2024.collection.d.ts +0 -29
- package/compiler/lib.es2024.d.ts +0 -26
- package/compiler/lib.es2024.full.d.ts +0 -24
- package/compiler/lib.es2024.object.d.ts +0 -29
- package/compiler/lib.es2024.promise.d.ts +0 -35
- package/compiler/lib.es2024.regexp.d.ts +0 -25
- package/compiler/lib.es2024.sharedmemory.d.ts +0 -68
- package/compiler/lib.es2024.string.d.ts +0 -29
- package/compiler/lib.es5.d.ts +0 -4594
- package/compiler/lib.es6.d.ts +0 -23
- package/compiler/lib.esnext.array.d.ts +0 -35
- package/compiler/lib.esnext.collection.d.ts +0 -96
- package/compiler/lib.esnext.d.ts +0 -27
- package/compiler/lib.esnext.decorators.d.ts +0 -28
- package/compiler/lib.esnext.disposable.d.ts +0 -193
- package/compiler/lib.esnext.float16.d.ts +0 -443
- package/compiler/lib.esnext.full.d.ts +0 -24
- package/compiler/lib.esnext.intl.d.ts +0 -21
- package/compiler/lib.esnext.iterator.d.ts +0 -148
- package/compiler/lib.esnext.promise.d.ts +0 -34
- package/compiler/lib.scripthost.d.ts +0 -322
- package/compiler/lib.webworker.asynciterable.d.ts +0 -41
- package/compiler/lib.webworker.d.ts +0 -9894
- package/compiler/lib.webworker.importscripts.d.ts +0 -23
- package/compiler/lib.webworker.iterable.d.ts +0 -287
- package/compiler/package.json +0 -8
- package/compiler/stencil.d.ts +0 -73
- package/compiler/stencil.js +0 -287816
- package/compiler/sys/in-memory-fs.d.ts +0 -227
- package/compiler/transpile.d.ts +0 -32
- package/dev-server/client/app-error.d.ts +0 -20
- package/dev-server/client/events.d.ts +0 -6
- package/dev-server/client/hmr-components.d.ts +0 -12
- package/dev-server/client/hmr-external-styles.d.ts +0 -1
- package/dev-server/client/hmr-images.d.ts +0 -1
- package/dev-server/client/hmr-inline-styles.d.ts +0 -1
- package/dev-server/client/hmr-util.d.ts +0 -39
- package/dev-server/client/hmr-window.d.ts +0 -10
- package/dev-server/client/index.d.ts +0 -6
- package/dev-server/client/index.js +0 -793
- package/dev-server/client/logger.d.ts +0 -6
- package/dev-server/client/package.json +0 -8
- package/dev-server/client/progress.d.ts +0 -3
- package/dev-server/client/status.d.ts +0 -4
- package/dev-server/client/test/hmr-util.spec.d.ts +0 -1
- package/dev-server/client/test/status.spec.d.ts +0 -1
- package/dev-server/connector.html +0 -6
- package/dev-server/index.d.ts +0 -3
- package/dev-server/index.js +0 -247
- package/dev-server/package.json +0 -8
- package/dev-server/server-process.js +0 -12095
- package/dev-server/server-worker-thread.js +0 -39
- package/dev-server/static/favicon.ico +0 -0
- package/dev-server/templates/directory-index.html +0 -176
- package/dev-server/templates/initial-load.html +0 -168
- package/dev-server/visualstudio.vbs +0 -82
- package/dev-server/xdg-open +0 -1066
- package/internal/app-data/index.cjs +0 -119
- package/internal/app-data/index.js +0 -92
- package/internal/app-data/package.json +0 -15
- package/internal/app-globals/index.d.ts +0 -2
- package/internal/app-globals/index.js +0 -14
- package/internal/app-globals/package.json +0 -14
- package/internal/child_process.d.ts +0 -7
- package/internal/client/index.js +0 -4736
- package/internal/client/package.json +0 -10
- package/internal/client/patch-browser.js +0 -45
- package/internal/client/polyfills/core-js.js +0 -11
- package/internal/client/polyfills/dom.js +0 -79
- package/internal/client/polyfills/es5-html-element.js +0 -1
- package/internal/client/polyfills/index.js +0 -34
- package/internal/client/polyfills/system.js +0 -6
- package/internal/client/shadow-css.js +0 -414
- package/internal/hydrate/index.js +0 -6671
- package/internal/hydrate/package.json +0 -7
- package/internal/hydrate/runner.d.ts +0 -287
- package/internal/hydrate/runner.js +0 -17950
- package/internal/index.d.ts +0 -4
- package/internal/index.js +0 -2
- package/internal/package.json +0 -9
- package/internal/stencil-core/index.cjs +0 -1
- package/internal/stencil-core/index.js +0 -18
- package/internal/stencil-core/jsx-dev-runtime.cjs +0 -7
- package/internal/stencil-core/jsx-dev-runtime.d.ts +0 -41
- package/internal/stencil-core/jsx-dev-runtime.js +0 -2
- package/internal/stencil-core/jsx-runtime.cjs +0 -8
- package/internal/stencil-core/jsx-runtime.d.ts +0 -40
- package/internal/stencil-core/jsx-runtime.js +0 -2
- package/internal/stencil-private.d.ts +0 -2549
- package/internal/stencil-public-compiler.d.ts +0 -2867
- package/internal/stencil-public-runtime.d.ts +0 -1860
- package/internal/testing/index.js +0 -6528
- package/internal/testing/jsx-dev-runtime.d.ts +0 -2
- package/internal/testing/jsx-dev-runtime.js +0 -8
- package/internal/testing/jsx-runtime.d.ts +0 -2
- package/internal/testing/jsx-runtime.js +0 -9
- package/internal/testing/package.json +0 -7
- package/internal/utils/index.d.ts +0 -1
- package/internal/utils/result.d.ts +0 -112
- package/mock-doc/index.cjs +0 -10165
- package/mock-doc/index.d.ts +0 -1172
- package/mock-doc/index.js +0 -10144
- package/mock-doc/package.json +0 -15
- package/readme.md +0 -94
- package/screenshot/compare/assets/favicon.ico +0 -0
- package/screenshot/compare/assets/logo.png +0 -0
- package/screenshot/compare/build/app.css +0 -1
- package/screenshot/compare/build/app.esm.js +0 -1
- package/screenshot/compare/build/app.js +0 -33
- package/screenshot/compare/build/p-081b0641.js +0 -1
- package/screenshot/compare/build/p-227a1e18.entry.js +0 -1
- package/screenshot/compare/build/p-2c298727.entry.js +0 -1
- package/screenshot/compare/build/p-5479268c.entry.js +0 -1
- package/screenshot/compare/build/p-573ec8a4.entry.js +0 -1
- package/screenshot/compare/build/p-6ba08604.entry.js +0 -1
- package/screenshot/compare/build/p-6bc63295.entry.js +0 -1
- package/screenshot/compare/build/p-7a3759fd.entry.js +0 -1
- package/screenshot/compare/build/p-7b4e3ba7.js +0 -1
- package/screenshot/compare/build/p-988eb362.css +0 -1
- package/screenshot/compare/build/p-9b6a9315.js +0 -1
- package/screenshot/compare/build/p-b4cc611c.entry.js +0 -1
- package/screenshot/compare/build/p-d1bf53f5.entry.js +0 -1
- package/screenshot/compare/build/p-e2efe0df.js +0 -1
- package/screenshot/compare/build/p-e8ca6d97.entry.js +0 -1
- package/screenshot/compare/build/p-ec2f13e0.entry.js +0 -1
- package/screenshot/compare/build/p-f0b99977.entry.js +0 -1
- package/screenshot/compare/build/p-f4745c2f.entry.js +0 -1
- package/screenshot/compare/build/p-fbbae598.js +0 -1
- package/screenshot/compare/host.config.json +0 -15
- package/screenshot/compare/index.html +0 -1
- package/screenshot/compare/manifest.json +0 -13
- package/screenshot/connector-base.d.ts +0 -42
- package/screenshot/connector-local.d.ts +0 -7
- package/screenshot/connector.js +0 -2
- package/screenshot/index.d.ts +0 -3
- package/screenshot/index.js +0 -2433
- package/screenshot/local-connector.js +0 -2
- package/screenshot/package.json +0 -15
- package/screenshot/pixel-match.d.ts +0 -1
- package/screenshot/pixel-match.js +0 -2315
- package/screenshot/screenshot-compare.d.ts +0 -20
- package/screenshot/screenshot-fs.d.ts +0 -14
- package/sys/node/460.node-fetch.js +0 -451
- package/sys/node/autoprefixer.js +0 -9
- package/sys/node/glob.js +0 -1
- package/sys/node/graceful-fs.js +0 -1
- package/sys/node/index.d.ts +0 -39
- package/sys/node/index.js +0 -64
- package/sys/node/node-fetch.js +0 -12
- package/sys/node/package.json +0 -8
- package/sys/node/prompts.js +0 -1
- package/sys/node/worker.js +0 -4
- package/testing/index.d.ts +0 -9
- package/testing/index.js +0 -13064
- package/testing/jest/jest-27-and-under/jest-config.d.ts +0 -16
- package/testing/jest/jest-27-and-under/jest-environment.d.ts +0 -2
- package/testing/jest/jest-27-and-under/jest-facade.d.ts +0 -155
- package/testing/jest/jest-27-and-under/jest-preprocessor.d.ts +0 -59
- package/testing/jest/jest-27-and-under/jest-preset.d.ts +0 -3
- package/testing/jest/jest-27-and-under/jest-runner.d.ts +0 -11
- package/testing/jest/jest-27-and-under/jest-screenshot.d.ts +0 -2
- package/testing/jest/jest-27-and-under/jest-serializer.d.ts +0 -4
- package/testing/jest/jest-27-and-under/jest-setup-test-framework.d.ts +0 -9
- package/testing/jest/jest-27-and-under/matchers/attributes.d.ts +0 -14
- package/testing/jest/jest-27-and-under/matchers/class-list.d.ts +0 -12
- package/testing/jest/jest-27-and-under/matchers/events.d.ts +0 -25
- package/testing/jest/jest-27-and-under/matchers/html.d.ts +0 -13
- package/testing/jest/jest-27-and-under/matchers/index.d.ts +0 -24
- package/testing/jest/jest-27-and-under/matchers/screenshot.d.ts +0 -5
- package/testing/jest/jest-27-and-under/matchers/text.d.ts +0 -4
- package/testing/jest/jest-27-and-under/test/jest-config.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-preprocessor.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-runner.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-serializer.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-setup-test-framework.spec.d.ts +0 -1
- package/testing/jest/jest-28/jest-config.d.ts +0 -16
- package/testing/jest/jest-28/jest-environment.d.ts +0 -2
- package/testing/jest/jest-28/jest-facade.d.ts +0 -134
- package/testing/jest/jest-28/jest-preprocessor.d.ts +0 -35
- package/testing/jest/jest-28/jest-preset.d.ts +0 -3
- package/testing/jest/jest-28/jest-runner.d.ts +0 -11
- package/testing/jest/jest-28/jest-screenshot.d.ts +0 -2
- package/testing/jest/jest-28/jest-serializer.d.ts +0 -4
- package/testing/jest/jest-28/jest-setup-test-framework.d.ts +0 -9
- package/testing/jest/jest-28/matchers/attributes.d.ts +0 -14
- package/testing/jest/jest-28/matchers/class-list.d.ts +0 -12
- package/testing/jest/jest-28/matchers/events.d.ts +0 -25
- package/testing/jest/jest-28/matchers/html.d.ts +0 -13
- package/testing/jest/jest-28/matchers/index.d.ts +0 -24
- package/testing/jest/jest-28/matchers/screenshot.d.ts +0 -5
- package/testing/jest/jest-28/matchers/text.d.ts +0 -4
- package/testing/jest/jest-28/test/jest-config.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-preprocessor.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-runner.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-serializer.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-setup-test-framework.spec.d.ts +0 -1
- package/testing/jest/jest-29/jest-config.d.ts +0 -16
- package/testing/jest/jest-29/jest-environment.d.ts +0 -2
- package/testing/jest/jest-29/jest-facade.d.ts +0 -136
- package/testing/jest/jest-29/jest-preprocessor.d.ts +0 -35
- package/testing/jest/jest-29/jest-preset.d.ts +0 -3
- package/testing/jest/jest-29/jest-runner.d.ts +0 -11
- package/testing/jest/jest-29/jest-screenshot.d.ts +0 -2
- package/testing/jest/jest-29/jest-serializer.d.ts +0 -4
- package/testing/jest/jest-29/jest-setup-test-framework.d.ts +0 -9
- package/testing/jest/jest-29/matchers/attributes.d.ts +0 -14
- package/testing/jest/jest-29/matchers/class-list.d.ts +0 -12
- package/testing/jest/jest-29/matchers/events.d.ts +0 -25
- package/testing/jest/jest-29/matchers/html.d.ts +0 -13
- package/testing/jest/jest-29/matchers/index.d.ts +0 -24
- package/testing/jest/jest-29/matchers/screenshot.d.ts +0 -5
- package/testing/jest/jest-29/matchers/text.d.ts +0 -4
- package/testing/jest/jest-29/test/jest-config.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-preprocessor.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-runner.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-serializer.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-setup-test-framework.spec.d.ts +0 -1
- package/testing/jest/jest-apis.d.ts +0 -86
- package/testing/jest/jest-facade.d.ts +0 -74
- package/testing/jest/jest-stencil-connector.d.ts +0 -65
- package/testing/jest/test/jest-stencil-connector.spec.d.ts +0 -1
- package/testing/jest-environment.js +0 -3
- package/testing/jest-preprocessor.js +0 -3
- package/testing/jest-preset.js +0 -2
- package/testing/jest-runner.js +0 -3
- package/testing/jest-setuptestframework.js +0 -3
- package/testing/mock-fetch.d.ts +0 -11
- package/testing/mocks.d.ts +0 -56
- package/testing/package.json +0 -8
- package/testing/puppeteer/index.d.ts +0 -2
- package/testing/puppeteer/puppeteer-browser.d.ts +0 -6
- package/testing/puppeteer/puppeteer-declarations.d.ts +0 -414
- package/testing/puppeteer/puppeteer-element.d.ts +0 -67
- package/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
- package/testing/puppeteer/puppeteer-events.d.ts +0 -21
- package/testing/puppeteer/puppeteer-page.d.ts +0 -2
- package/testing/puppeteer/puppeteer-screenshot.d.ts +0 -27
- package/testing/puppeteer/test/puppeteer-screenshot.spec.d.ts +0 -1
- package/testing/reset-build-conditionals.d.ts +0 -12
- package/testing/spec-page.d.ts +0 -7
- package/testing/test/testing-utils.spec.d.ts +0 -1
- package/testing/test-transpile.d.ts +0 -2
- package/testing/testing-logger.d.ts +0 -26
- package/testing/testing-sys.d.ts +0 -6
- package/testing/testing-utils.d.ts +0 -80
- package/testing/testing.d.ts +0 -2
- /package/{internal → dist/declarations}/stencil-ext-modules.d.ts +0 -0
- /package/{internal → dist/declarations}/stencil-public-docs.d.ts +0 -0
- /package/{screenshot/compare/build/index.esm.js → dist/declarations/stencil-public-runtime.js} +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* This file acts as the connector/bridge between Stencil and Jest.
|
|
3
|
-
*
|
|
4
|
-
* It defines/caches a `JestFacade` implementation to dispatch Jest-related configuration calls to the correct section
|
|
5
|
-
* of the Stencil codebase.
|
|
6
|
-
*
|
|
7
|
-
* It contains the APIs that are designed to be used by the Jest pre-configurations supplied by Stencil.
|
|
8
|
-
*/
|
|
9
|
-
import { JestCliRunner, JestPresetConfig, JestScreenshotRunner } from './jest-apis';
|
|
10
|
-
/**
|
|
11
|
-
* Retrieve the numeric representation of the major version of Jest being used.
|
|
12
|
-
*
|
|
13
|
-
* If a user has Jest v27.1.0 installed, `27` will be returned.
|
|
14
|
-
*
|
|
15
|
-
* @returns the major version of Jest detected
|
|
16
|
-
*/
|
|
17
|
-
export declare const getVersion: () => number;
|
|
18
|
-
/**
|
|
19
|
-
* Retrieve the default Jest runner name prescribed by Stencil
|
|
20
|
-
*
|
|
21
|
-
* @returns the stringified name of the test runner, based on the currently detected version of Stencil
|
|
22
|
-
*/
|
|
23
|
-
export declare const getDefaultJestRunner: () => string;
|
|
24
|
-
/**
|
|
25
|
-
* Retrieve the Stencil-Jest test runner based on the version of Jest that's installed.
|
|
26
|
-
*
|
|
27
|
-
* @returns a test runner for Stencil tests, based on the version of Jest that's detected
|
|
28
|
-
*/
|
|
29
|
-
export declare const getRunner: () => JestCliRunner;
|
|
30
|
-
/**
|
|
31
|
-
* Retrieve the Stencil-Jest screenshot facade implementation based on the version of Jest that's installed.
|
|
32
|
-
*
|
|
33
|
-
* @returns a screenshot facade implementation for Stencil tests, based on the version of Jest that's detected
|
|
34
|
-
*/
|
|
35
|
-
export declare const getScreenshot: () => JestScreenshotRunner;
|
|
36
|
-
/**
|
|
37
|
-
* Retrieve the Jest-Puppeteer Environment, based on the version of Jest that is installed
|
|
38
|
-
*
|
|
39
|
-
* @returns a function capable of creating a Jest-Puppeteer environment
|
|
40
|
-
*/
|
|
41
|
-
export declare const getCreateJestPuppeteerEnvironment: () => () => import("./jest-apis").JestPuppeteerEnvironmentConstructor;
|
|
42
|
-
/**
|
|
43
|
-
* Retrieve the Jest preprocessor, based on the version of Jest that is installed
|
|
44
|
-
*
|
|
45
|
-
* @returns a Jest preprocessor to transform code at test time
|
|
46
|
-
*/
|
|
47
|
-
export declare const getJestPreprocessor: () => import("./jest-apis").JestPreprocessor;
|
|
48
|
-
/**
|
|
49
|
-
* Retrieve the Jest-Runner, based on the version of Jest that is installed
|
|
50
|
-
*
|
|
51
|
-
* @returns a function capable of creating a Jest test runner
|
|
52
|
-
*/
|
|
53
|
-
export declare const getCreateJestTestRunner: () => () => import("./jest-apis").JestTestRunnerConstructor;
|
|
54
|
-
/**
|
|
55
|
-
* Retrieve the Jest-setup function, based on the version of Jest that is installed
|
|
56
|
-
*
|
|
57
|
-
* @returns a function capable of setting up Jest
|
|
58
|
-
*/
|
|
59
|
-
export declare const getJestSetupTestFramework: () => () => void;
|
|
60
|
-
/**
|
|
61
|
-
* Retrieve Stencil's Jest presets for the detected version of Jest
|
|
62
|
-
*
|
|
63
|
-
* @returns an object representing a Jest preset
|
|
64
|
-
*/
|
|
65
|
-
export declare const getJestPreset: () => JestPresetConfig;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/testing/jest-preset.js
DELETED
package/testing/jest-runner.js
DELETED
package/testing/mock-fetch.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MockResponse } from '@stencil/core/mock-doc';
|
|
2
|
-
export declare function setupMockFetch(global: any): void;
|
|
3
|
-
export declare function mockFetchReset(): void;
|
|
4
|
-
export declare const mockFetch: {
|
|
5
|
-
json(data: any, url: string): void;
|
|
6
|
-
text(data: string, url: string): void;
|
|
7
|
-
response(rsp: MockResponse, url: string): void;
|
|
8
|
-
reject(rsp: MockResponse, url: string): void;
|
|
9
|
-
reset: typeof mockFetchReset;
|
|
10
|
-
};
|
|
11
|
-
export { MockHeaders, MockRequest, MockRequestInfo, MockRequestInit, MockResponse, MockResponseInit, } from '@stencil/core/mock-doc';
|
package/testing/mocks.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type * as d from '@stencil/core/internal';
|
|
2
|
-
import { TestingLogger } from './testing-logger';
|
|
3
|
-
import { TestingSystem } from './testing-sys';
|
|
4
|
-
export declare const mockComponentMeta: (overrides?: Partial<d.ComponentCompilerMeta>) => d.ComponentCompilerMeta;
|
|
5
|
-
/**
|
|
6
|
-
* Creates a mock instance of an internal, validated Stencil configuration object
|
|
7
|
-
* the caller
|
|
8
|
-
* @param overrides a partial implementation of `ValidatedConfig`. Any provided fields will override the defaults
|
|
9
|
-
* provided by this function.
|
|
10
|
-
* @returns the mock Stencil configuration
|
|
11
|
-
*/
|
|
12
|
-
export declare function mockValidatedConfig(overrides?: Partial<d.ValidatedConfig>): d.ValidatedConfig;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a mock instance of a Stencil configuration entity. The mocked configuration has no guarantees around the
|
|
15
|
-
* types/validity of its data.
|
|
16
|
-
* @param overrides a partial implementation of `UnvalidatedConfig`. Any provided fields will override the defaults
|
|
17
|
-
* provided by this function.
|
|
18
|
-
* @returns the mock Stencil configuration
|
|
19
|
-
*/
|
|
20
|
-
export declare function mockConfig(overrides?: Partial<d.UnvalidatedConfig>): d.UnvalidatedConfig;
|
|
21
|
-
/**
|
|
22
|
-
* Creates a configuration object used to bootstrap a Stencil task invocation
|
|
23
|
-
*
|
|
24
|
-
* Several fields are intentionally undefined for this entity. While it would be trivial to stub them out, this mock
|
|
25
|
-
* generation function operates under the assumption that entities like loggers and compiler system abstractions will
|
|
26
|
-
* be shared by multiple entities in a test suite, who should provide those entities to this function
|
|
27
|
-
*
|
|
28
|
-
* @param overrides the properties on the default entity to manually override
|
|
29
|
-
* @returns the default configuration initialization object, with any overrides applied
|
|
30
|
-
*/
|
|
31
|
-
export declare const mockLoadConfigInit: (overrides?: Partial<d.LoadConfigInit>) => d.LoadConfigInit;
|
|
32
|
-
export declare function mockCompilerCtx(config?: d.ValidatedConfig): d.CompilerCtx;
|
|
33
|
-
export declare function mockBuildCtx(config?: d.ValidatedConfig, compilerCtx?: d.CompilerCtx): d.BuildCtx;
|
|
34
|
-
export declare function mockLogger(): TestingLogger;
|
|
35
|
-
/**
|
|
36
|
-
* Create a {@link d.CompilerSystem} entity for testing the compiler.
|
|
37
|
-
*
|
|
38
|
-
* This function acts as a thin wrapper around a {@link TestingSystem} entity creation. It exists to provide a logical
|
|
39
|
-
* place in the codebase where we might expect Stencil engineers to reach for when attempting to mock a
|
|
40
|
-
* {@link d.CompilerSystem} base type. Should there prove to be usage of both this function and the one it wraps,
|
|
41
|
-
* reconsider if this wrapper is necessary.
|
|
42
|
-
*
|
|
43
|
-
* @returns a System instance for testing purposes.
|
|
44
|
-
*/
|
|
45
|
-
export declare function mockCompilerSystem(): TestingSystem;
|
|
46
|
-
export declare function mockDocument(html?: string | null): Document;
|
|
47
|
-
export declare function mockWindow(html?: string): Window;
|
|
48
|
-
/**
|
|
49
|
-
* This gives you a mock Module, an interface which is the internal compiler
|
|
50
|
-
* representation of a module. It includes a bunch of information necessary for
|
|
51
|
-
* compilation, this mock basically sets sane defaults for all those values.
|
|
52
|
-
*
|
|
53
|
-
* @param mod is an override module that you can supply to set particular values
|
|
54
|
-
* @returns a module object ready to use in tests!
|
|
55
|
-
*/
|
|
56
|
-
export declare const mockModule: (mod?: Partial<d.Module>) => d.Module;
|
package/testing/package.json
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ValidatedConfig } from '@stencil/core/internal';
|
|
2
|
-
import type { Browser } from 'puppeteer';
|
|
3
|
-
export declare function startPuppeteerBrowser(config: ValidatedConfig): Promise<Browser>;
|
|
4
|
-
export declare function connectBrowser(): Promise<Browser>;
|
|
5
|
-
export declare function disconnectBrowser(browser: Browser): Promise<void>;
|
|
6
|
-
export declare function newBrowserPage(browser: Browser): Promise<import("puppeteer-core").Page>;
|
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
import type { EventInitDict, EventSpy, ScreenshotDiff, ScreenshotOptions } from '@stencil/core/internal';
|
|
2
|
-
// @ts-ignore - avoid requiring puppeteer as dependency
|
|
3
|
-
import type { ClickOptions, HTTPResponse, Page, ScreenshotOptions as PuppeteerScreenshotOptions, WaitForOptions } from 'puppeteer';
|
|
4
|
-
/**
|
|
5
|
-
* This type was once exported by Puppeteer, but has since moved to an object literal in (Puppeteer’s) native types.
|
|
6
|
-
* Re-create it here as a named type to use across multiple Stencil-related testing files.
|
|
7
|
-
*/
|
|
8
|
-
export type PageCloseOptions = {
|
|
9
|
-
runBeforeUnload?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export interface NewE2EPageOptions extends WaitForOptions {
|
|
12
|
-
url?: string;
|
|
13
|
-
html?: string;
|
|
14
|
-
/**
|
|
15
|
-
* If set to `true`, Stencil will throw an error if a console error occurs
|
|
16
|
-
*/
|
|
17
|
-
failOnConsoleError?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* If set to `true`, Stencil will throw an error if a network request fails
|
|
20
|
-
*/
|
|
21
|
-
failOnNetworkError?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* If set to `true`, Stencil will log failing network requests
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
logFailingNetworkRequests?: boolean;
|
|
27
|
-
}
|
|
28
|
-
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
29
|
-
type PuppeteerPage = Omit<Page, 'bringToFront' | 'browser' | 'screenshot' | 'emulate' | 'emulateMedia' | 'frames' | 'goBack' | 'goForward' | 'isClosed' | 'mainFrame' | 'pdf' | 'reload' | 'target' | 'title' | 'viewport' | 'waitForNavigation' | 'screenshot' | 'workers' | 'addListener' | 'prependListener' | 'prependOnceListener' | 'removeAllListeners' | 'setMaxListeners' | 'getMaxListeners' | 'listeners' | 'rawListeners' | 'emit' | 'eventNames' | 'listenerCount' | '$x' | 'waitForXPath'>;
|
|
30
|
-
export interface PageDiagnostic {
|
|
31
|
-
type: 'error' | 'pageerror' | 'requestfailed';
|
|
32
|
-
message?: string;
|
|
33
|
-
location?: string;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* The E2EPage is a wrapper utility to Puppeteer in order to
|
|
37
|
-
* to create easier to write and read end-to-end tests.
|
|
38
|
-
*/
|
|
39
|
-
export interface E2EPage extends PuppeteerPage {
|
|
40
|
-
/**
|
|
41
|
-
* `Experimental`
|
|
42
|
-
* Takes a screenshot of the page, then compares the current screenshot
|
|
43
|
-
* against the master screenshot. The returned screenshot compare
|
|
44
|
-
* results can then be used to test pixel mismatches, such as
|
|
45
|
-
* `expect(results).toMatchScreenshot()`.
|
|
46
|
-
*/
|
|
47
|
-
compareScreenshot(): Promise<ScreenshotDiff>;
|
|
48
|
-
/**
|
|
49
|
-
* `Experimental`
|
|
50
|
-
* Takes a screenshot of the page, then compares the current screenshot
|
|
51
|
-
* against the master screenshot. The provided `description` will be
|
|
52
|
-
* added onto its current description, which comes from the test description.
|
|
53
|
-
*/
|
|
54
|
-
compareScreenshot(description: string): Promise<ScreenshotDiff>;
|
|
55
|
-
/**
|
|
56
|
-
* `Experimental`
|
|
57
|
-
* Takes a screenshot of the page, then compares the current screenshot
|
|
58
|
-
* against the master screenshot. The `opts` argument can be used to
|
|
59
|
-
* customize screenshot options.
|
|
60
|
-
*/
|
|
61
|
-
compareScreenshot(opts: ScreenshotOptions): Promise<ScreenshotDiff>;
|
|
62
|
-
/**
|
|
63
|
-
* `Experimental`
|
|
64
|
-
* Takes a screenshot of the page, then compares the current screenshot
|
|
65
|
-
* against the master screenshot. The `description` argument will be
|
|
66
|
-
* added onto its current description, which comes from the test description.
|
|
67
|
-
* The `opts` argument can be used to customize screenshot options.
|
|
68
|
-
*/
|
|
69
|
-
compareScreenshot(description: string, opts: ScreenshotOptions): Promise<ScreenshotDiff>;
|
|
70
|
-
/**
|
|
71
|
-
* Sets a debugger;
|
|
72
|
-
*/
|
|
73
|
-
debugger(): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Find an element that matches the selector, which is the same as
|
|
76
|
-
* `document.querySelector(selector)`. Use `>>>` within the
|
|
77
|
-
* selector to find an element within the host element's shadow root.
|
|
78
|
-
* For example, to select the first `div` inside of the component
|
|
79
|
-
* `my-cmp`, the call would be `page.find('my-cmp >>> div')`.
|
|
80
|
-
* Returns `null` if an element was not found.
|
|
81
|
-
*/
|
|
82
|
-
find(selector: FindSelector): Promise<E2EElement>;
|
|
83
|
-
/**
|
|
84
|
-
* Find all elements that match the selector, which is the same as
|
|
85
|
-
* `document.querySelectorAll(selector)`. Use `>>>` within the
|
|
86
|
-
* selector to find elements within the host element's shadow root.
|
|
87
|
-
* For example, to select all of the `li` elements inside of the component
|
|
88
|
-
* `my-cmp`, the call would be `page.findAll('my-cmp >>> li')`.
|
|
89
|
-
* Returns an empty array if no elements were found.
|
|
90
|
-
*/
|
|
91
|
-
findAll(selector: string): Promise<E2EElement[]>;
|
|
92
|
-
/**
|
|
93
|
-
* During an end-to-end test, a dev-server is started so `page.goto(url)` can be used
|
|
94
|
-
* on the app being tested. Urls are always relative since the dev server provides
|
|
95
|
-
* a localhost address. A shortcut to `page.goto(url)` is to set the `url` option
|
|
96
|
-
* when creating a new page, such as `const page = await newE2EPage({ url })`.
|
|
97
|
-
*/
|
|
98
|
-
goTo(url: string, options?: WaitForOptions): Promise<HTTPResponse | null>;
|
|
99
|
-
/**
|
|
100
|
-
* Instead of testing a url directly, html content can be mocked using
|
|
101
|
-
* `page.setContent(html)`. A shortcut to `page.setContent(html)` is to set
|
|
102
|
-
* the `html` option when creating a new page, such as
|
|
103
|
-
* `const page = await newE2EPage({ html })`.
|
|
104
|
-
*/
|
|
105
|
-
setContent(html: string, options?: WaitForOptions): Promise<void>;
|
|
106
|
-
/**
|
|
107
|
-
* Used to test if an event was, or was not dispatched. This method
|
|
108
|
-
* returns a promise, that resolves with an EventSpy. The EventSpy
|
|
109
|
-
* can be used along with `expect(spy).toHaveReceivedEvent()`,
|
|
110
|
-
* `expect(spy).toHaveReceivedEventTimes(x)` and
|
|
111
|
-
* `expect(spy).toHaveReceivedEventDetail({...})`.
|
|
112
|
-
*/
|
|
113
|
-
spyOnEvent(eventName: string, selector?: 'window' | 'document'): Promise<EventSpy>;
|
|
114
|
-
/**
|
|
115
|
-
* Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing
|
|
116
|
-
* for performance. Since all calls are async, it's required that
|
|
117
|
-
* `await page.waitForChanges()` is called when changes are made to components.
|
|
118
|
-
* An error will be thrown if changes were made to a component but `waitForChanges()`
|
|
119
|
-
* was not called.
|
|
120
|
-
*/
|
|
121
|
-
waitForChanges(): Promise<void>;
|
|
122
|
-
/**
|
|
123
|
-
* Waits for the event to be received on `window`. The optional second argument
|
|
124
|
-
* allows the listener to be set to `document` if needed.
|
|
125
|
-
*/
|
|
126
|
-
waitForEvent(eventName: string): Promise<any>;
|
|
127
|
-
getDiagnostics(): PageDiagnostic[];
|
|
128
|
-
}
|
|
129
|
-
export interface E2EPageInternal extends E2EPage {
|
|
130
|
-
isClosed(): boolean;
|
|
131
|
-
_e2eElements: E2EElementInternal[];
|
|
132
|
-
_e2eEvents: Map<number, WaitForEvent>;
|
|
133
|
-
_e2eEventIds: number;
|
|
134
|
-
_e2eGoto(url: string, options?: Partial<WaitForOptions>): Promise<HTTPResponse | null>;
|
|
135
|
-
_e2eClose(options?: PageCloseOptions): Promise<void>;
|
|
136
|
-
screenshot(options?: PuppeteerScreenshotOptions): Promise<Buffer>;
|
|
137
|
-
}
|
|
138
|
-
export interface E2EElement {
|
|
139
|
-
/**
|
|
140
|
-
* Used to call a method on a component. For example, if a component
|
|
141
|
-
* has the method `cmp.myMethod(arg1, arg2)`, calling this method
|
|
142
|
-
* from a e2e test could be `cmp.callMethod('myMethod', arg1, arg2)`.
|
|
143
|
-
*/
|
|
144
|
-
callMethod(methodName: string, ...methodArgs: any[]): Promise<any>;
|
|
145
|
-
/**
|
|
146
|
-
* Gets and sets the value of the class attribute of the e2e element.
|
|
147
|
-
* Note that `await page.waitForChanges()` must be called before reading
|
|
148
|
-
* the value if content has changed.
|
|
149
|
-
*/
|
|
150
|
-
className: string;
|
|
151
|
-
/**
|
|
152
|
-
* Using classList is a convenient alternative to accessing an element's list
|
|
153
|
-
* of classes as a space-delimited string via `element.className`.
|
|
154
|
-
*/
|
|
155
|
-
classList: {
|
|
156
|
-
/**
|
|
157
|
-
* Add specified class values. If these classes already exist in
|
|
158
|
-
* attribute of the element, then they are ignored.
|
|
159
|
-
*/
|
|
160
|
-
add: (...tokens: string[]) => void;
|
|
161
|
-
/**
|
|
162
|
-
* Remove specified class values. Note: Removing a class that does
|
|
163
|
-
* not exist does NOT throw an error.
|
|
164
|
-
*/
|
|
165
|
-
remove: (...tokens: string[]) => void;
|
|
166
|
-
/**
|
|
167
|
-
* If class exists then remove it, if not, then add it.
|
|
168
|
-
*/
|
|
169
|
-
toggle: (token: string) => void;
|
|
170
|
-
/**
|
|
171
|
-
* Checks if specified class value exists in class attribute of the element.
|
|
172
|
-
*/
|
|
173
|
-
contains: (className: string) => boolean;
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* Calling `click()` on an element scrolls it into view if needed, and
|
|
177
|
-
* then uses `page.mouse` to click in the center of the element.
|
|
178
|
-
* Please see the puppeteer docs for more information.
|
|
179
|
-
*/
|
|
180
|
-
click(options?: ClickOptions): Promise<void>;
|
|
181
|
-
/**
|
|
182
|
-
* Find a child element that matches the selector, which is the same as
|
|
183
|
-
* `element.querySelector(selector)`. Use `>>>` within the
|
|
184
|
-
* selector to find an element within a host element's shadow root.
|
|
185
|
-
* For example, to select the first `div` inside of the component
|
|
186
|
-
* `my-cmp`, which is a child of this element, the call would be
|
|
187
|
-
* `element.find('my-cmp >>> div')`. Returns `null` if no
|
|
188
|
-
* elements were found.
|
|
189
|
-
*/
|
|
190
|
-
find(selector: FindSelector): Promise<E2EElement>;
|
|
191
|
-
/**
|
|
192
|
-
* Find all child elements that match the selector, which is the same as
|
|
193
|
-
* `element.querySelectorAll(selector)`. Use `>>>` within the
|
|
194
|
-
* selector to find elements within a host element's shadow root.
|
|
195
|
-
* For example, to select all `li` elements inside of the component
|
|
196
|
-
* `my-cmp`, which is a child of this element, the call would be
|
|
197
|
-
* `element.findAll('my-cmp >>> li')`. Returns an empty array if
|
|
198
|
-
* no elements were found.
|
|
199
|
-
*/
|
|
200
|
-
findAll(selector: FindSelector): Promise<E2EElement[]>;
|
|
201
|
-
/**
|
|
202
|
-
* Sets focus on the element.
|
|
203
|
-
*/
|
|
204
|
-
focus(): Promise<void>;
|
|
205
|
-
/**
|
|
206
|
-
* Returns the value of a specified attribute on the element. If the
|
|
207
|
-
* given attribute does not exist, the value returned will be null.
|
|
208
|
-
*/
|
|
209
|
-
getAttribute(name: string): string;
|
|
210
|
-
/**
|
|
211
|
-
* Used to get a property set on a component. For example, if a
|
|
212
|
-
* component has the property `elm.myProp`, then calling
|
|
213
|
-
* `elm.getProperty('myProp')` would return the `myProp` property value.
|
|
214
|
-
*/
|
|
215
|
-
getProperty(propertyName: string): Promise<any>;
|
|
216
|
-
/**
|
|
217
|
-
* Returns an object that reports the values of all CSS properties of this
|
|
218
|
-
* element after applying active stylesheets and resolving any basic computation
|
|
219
|
-
* those values may contain. Individual CSS property values are accessed by
|
|
220
|
-
* simply indexing with CSS property names. The method is shortcut and an async
|
|
221
|
-
* version of using `window.getComputedStyle(element)` directly.
|
|
222
|
-
*/
|
|
223
|
-
getComputedStyle(pseudoElt?: string | null): Promise<CSSStyleDeclaration>;
|
|
224
|
-
/**
|
|
225
|
-
* Sets hover on the element.
|
|
226
|
-
*/
|
|
227
|
-
hover(): Promise<void>;
|
|
228
|
-
/**
|
|
229
|
-
* Gets and sets `id` property of the element.
|
|
230
|
-
* Note that `await page.waitForChanges()` must be called before reading
|
|
231
|
-
* the value if content has changed.
|
|
232
|
-
*/
|
|
233
|
-
id: string;
|
|
234
|
-
/**
|
|
235
|
-
* Gets and sets `innerHTML` property of the element.
|
|
236
|
-
* Note that `await page.waitForChanges()` must be called before reading
|
|
237
|
-
* the value if content has changed.
|
|
238
|
-
*/
|
|
239
|
-
innerHTML: string;
|
|
240
|
-
/**
|
|
241
|
-
* Gets and sets `innerText` property of the element.
|
|
242
|
-
* Note that `await page.waitForChanges()` must be called before reading
|
|
243
|
-
* the value if content has changed.
|
|
244
|
-
*/
|
|
245
|
-
innerText: string;
|
|
246
|
-
/**
|
|
247
|
-
* Resolves to true if the element is visible in the current viewport.
|
|
248
|
-
*/
|
|
249
|
-
isIntersectingViewport(): Promise<boolean>;
|
|
250
|
-
/**
|
|
251
|
-
* Resolves `true` when the element's style is `display !== 'none'`,
|
|
252
|
-
* `visibility !== 'hidden'` and `opacity !== '0'`.
|
|
253
|
-
*/
|
|
254
|
-
isVisible(): Promise<boolean>;
|
|
255
|
-
/**
|
|
256
|
-
* Node name of the node, which in an element's case is the tag name.
|
|
257
|
-
* Note, this will always be upper-cased.
|
|
258
|
-
*/
|
|
259
|
-
nodeName: string;
|
|
260
|
-
/**
|
|
261
|
-
* The type of a node represented by a number.
|
|
262
|
-
* Element = 1, TextNode = 3, Comment = 8,
|
|
263
|
-
* Document Fragment (also what a shadow root is) = 11.
|
|
264
|
-
*/
|
|
265
|
-
nodeType: number;
|
|
266
|
-
/**
|
|
267
|
-
* Gets the element's `outerHTML. This is a read-only property and will
|
|
268
|
-
* throw an error if set.
|
|
269
|
-
*/
|
|
270
|
-
outerHTML: string;
|
|
271
|
-
/**
|
|
272
|
-
* Focuses the element, and then uses `keyboard.down` and `keyboard.up`.
|
|
273
|
-
* If key is a single character and no modifier keys besides Shift are
|
|
274
|
-
* being held down, a keypress/input event will also be generated. The
|
|
275
|
-
* text option can be specified to force an input event to be generated.
|
|
276
|
-
* Note: Modifier keys DO effect `elementHandle.press`. Holding down Shift
|
|
277
|
-
* will type the text in upper case.
|
|
278
|
-
* Key names: https://github.com/puppeteer/puppeteer/blob/main/src/common/USKeyboardLayout.ts
|
|
279
|
-
*/
|
|
280
|
-
press(key: string, options?: {
|
|
281
|
-
text?: string;
|
|
282
|
-
delay?: number;
|
|
283
|
-
}): Promise<void>;
|
|
284
|
-
/**
|
|
285
|
-
* Removes the attribute on the specified element. Note that
|
|
286
|
-
* `await page.waitForChanges()` must be called before reading
|
|
287
|
-
* the value if content has changed.
|
|
288
|
-
*/
|
|
289
|
-
removeAttribute(name: string): void;
|
|
290
|
-
/**
|
|
291
|
-
* Sets the value of an attribute on the specified element. If the
|
|
292
|
-
* attribute already exists, the value is updated; otherwise a new
|
|
293
|
-
* attribute is added with the specified name and value. The value
|
|
294
|
-
* will always be converted to a string. Note that
|
|
295
|
-
* `await page.waitForChanges()` must be called before reading
|
|
296
|
-
* the value if content has changed.
|
|
297
|
-
*/
|
|
298
|
-
setAttribute(name: string, value: any): void;
|
|
299
|
-
/**
|
|
300
|
-
* Used to set a property set on a component. For example, if a
|
|
301
|
-
* component has the property `elm.myProp`, then calling
|
|
302
|
-
* `elm.setProperty('myProp', 88)` would set the value `88` to
|
|
303
|
-
* the `myProp` property on the component.
|
|
304
|
-
*/
|
|
305
|
-
setProperty(propertyName: string, value: any): void;
|
|
306
|
-
/**
|
|
307
|
-
* The ShadowRoot interface of the Shadow DOM API is the root node of a
|
|
308
|
-
* DOM subtree that is rendered separately from a document's main DOM tree.
|
|
309
|
-
* This value will be `null` if the element does not have a `shadowRoot`.
|
|
310
|
-
*/
|
|
311
|
-
shadowRoot: ShadowRoot;
|
|
312
|
-
/**
|
|
313
|
-
* Used to test if an event was, or was not dispatched. This method
|
|
314
|
-
* returns a promise, that resolves with an EventSpy. The EventSpy
|
|
315
|
-
* can be used along with `expect(spy).toHaveReceivedEvent()`,
|
|
316
|
-
* `expect(spy).toHaveReceivedEventTimes(x)` and
|
|
317
|
-
* `expect(spy).toHaveReceivedEventDetail({...})`.
|
|
318
|
-
*/
|
|
319
|
-
spyOnEvent(eventName: string): Promise<EventSpy>;
|
|
320
|
-
/**
|
|
321
|
-
* Represents the tab order of the current element. Setting the
|
|
322
|
-
* `tabIndex` property will also set the `tabindex` attribute.
|
|
323
|
-
*/
|
|
324
|
-
tabIndex: number;
|
|
325
|
-
/**
|
|
326
|
-
* Tag name of the element. Note, this will always be upper-cased.
|
|
327
|
-
*/
|
|
328
|
-
tagName: string;
|
|
329
|
-
/**
|
|
330
|
-
* This method scrolls the element it into view if needed,
|
|
331
|
-
* and then uses `page.touchscreen` to tap in the center of the element.
|
|
332
|
-
*/
|
|
333
|
-
tap(): Promise<void>;
|
|
334
|
-
/**
|
|
335
|
-
* The `textContent` property represents the text content of a node
|
|
336
|
-
* and its descendants. Note that `await page.waitForChanges()` must
|
|
337
|
-
* be called before reading the value if content has changed.
|
|
338
|
-
*/
|
|
339
|
-
textContent: string;
|
|
340
|
-
/**
|
|
341
|
-
* Represents the `title` of the element, the text usually displayed in a
|
|
342
|
-
* 'tool tip' popup when the mouse is over the displayed node.
|
|
343
|
-
*/
|
|
344
|
-
title: string;
|
|
345
|
-
/**
|
|
346
|
-
* Toggles a `boolean` attribute (removing it if it is present and adding
|
|
347
|
-
* it if it is not present) on the given element. Note that
|
|
348
|
-
* `await page.waitForChanges()` must be called before reading
|
|
349
|
-
* the value if content has changed. The optional `force` argument is a
|
|
350
|
-
* `boolean` value to determine whether the attribute should be added or
|
|
351
|
-
* removed, no matter whether the attribute is present or not at the moment.
|
|
352
|
-
*/
|
|
353
|
-
toggleAttribute(name: string, force?: boolean): void;
|
|
354
|
-
/**
|
|
355
|
-
* This is a convenience method to easily create a `CustomEvent`,
|
|
356
|
-
* and dispatch it from the element, to include any custom event
|
|
357
|
-
* `detail` data as the second argument.
|
|
358
|
-
*/
|
|
359
|
-
triggerEvent(eventName: string, eventInitDict?: EventInitDict): void;
|
|
360
|
-
/**
|
|
361
|
-
* Sends a keydown, keypress/input, and keyup event for each character in the text.
|
|
362
|
-
* To press a special key, like Control or ArrowDown, use `keyboard.press`.
|
|
363
|
-
*/
|
|
364
|
-
type(text: string, options?: {
|
|
365
|
-
delay: number;
|
|
366
|
-
}): Promise<void>;
|
|
367
|
-
/**
|
|
368
|
-
* Waits until the element's style is `display !== 'none'`,
|
|
369
|
-
* `visibility !== 'hidden'`, `opacity !== '0'` and the element
|
|
370
|
-
* is connected to the document.
|
|
371
|
-
*/
|
|
372
|
-
waitForVisible(): Promise<void>;
|
|
373
|
-
/**
|
|
374
|
-
* Waits until the element's style is `display === 'none'`, or
|
|
375
|
-
* `visibility === 'hidden'`, or `opacity === '0'`, or the element
|
|
376
|
-
* is no longer connected to the document.
|
|
377
|
-
*/
|
|
378
|
-
waitForNotVisible(): Promise<void>;
|
|
379
|
-
/**
|
|
380
|
-
* Waits until the given event is listened in the element.
|
|
381
|
-
*/
|
|
382
|
-
waitForEvent(eventName: string): Promise<any>;
|
|
383
|
-
}
|
|
384
|
-
export interface E2EElementInternal extends E2EElement {
|
|
385
|
-
e2eDispose(): Promise<void>;
|
|
386
|
-
e2eRunActions(): Promise<unknown>;
|
|
387
|
-
e2eSync(): Promise<void>;
|
|
388
|
-
}
|
|
389
|
-
export type FindSelector = string | FindSelectorOptions;
|
|
390
|
-
export interface FindSelectorOptions {
|
|
391
|
-
/**
|
|
392
|
-
* Finds an element with text content matching this
|
|
393
|
-
* exact value after the whitespace has been trimmed.
|
|
394
|
-
*/
|
|
395
|
-
text?: string;
|
|
396
|
-
/**
|
|
397
|
-
* Finds an element with text content containing this value.
|
|
398
|
-
*/
|
|
399
|
-
contains?: string;
|
|
400
|
-
}
|
|
401
|
-
export interface WaitForEventOptions {
|
|
402
|
-
timeout?: number;
|
|
403
|
-
}
|
|
404
|
-
export interface WaitForEvent {
|
|
405
|
-
eventName: string;
|
|
406
|
-
callback: (ev: any) => void;
|
|
407
|
-
}
|
|
408
|
-
export interface BrowserWindow extends Window {
|
|
409
|
-
stencilOnEvent(id: number, event: any): void;
|
|
410
|
-
stencilSerializeEvent(ev: CustomEvent): any;
|
|
411
|
-
stencilSerializeEventTarget(target: any): any;
|
|
412
|
-
stencilAppLoaded: boolean;
|
|
413
|
-
}
|
|
414
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { EventInitDict } from '@stencil/core/internal';
|
|
2
|
-
import { MockHTMLElement } from '@stencil/core/mock-doc';
|
|
3
|
-
import type * as puppeteer from 'puppeteer';
|
|
4
|
-
import type * as pd from './puppeteer-declarations';
|
|
5
|
-
import { EventSpy } from './puppeteer-events';
|
|
6
|
-
export declare class E2EElement extends MockHTMLElement implements pd.E2EElementInternal {
|
|
7
|
-
private _page;
|
|
8
|
-
private _elmHandle;
|
|
9
|
-
private _queuedActions;
|
|
10
|
-
private _queueAction;
|
|
11
|
-
constructor(_page: pd.E2EPageInternal, _elmHandle: puppeteer.ElementHandle);
|
|
12
|
-
find(selector: string): Promise<E2EElement>;
|
|
13
|
-
findAll(selector: string): Promise<E2EElement[]>;
|
|
14
|
-
callMethod(methodName: string, ...methodArgs: any[]): Promise<any>;
|
|
15
|
-
triggerEvent(eventName: string, eventInitDict?: EventInitDict): void;
|
|
16
|
-
spyOnEvent(eventName: string): Promise<EventSpy>;
|
|
17
|
-
click(options?: puppeteer.ClickOptions): Promise<void>;
|
|
18
|
-
focus(): Promise<void>;
|
|
19
|
-
hover(): Promise<void>;
|
|
20
|
-
isVisible(): Promise<boolean>;
|
|
21
|
-
waitForEvent(eventName: string): Promise<any>;
|
|
22
|
-
waitForVisible(): Promise<void>;
|
|
23
|
-
waitForNotVisible(): Promise<void>;
|
|
24
|
-
isIntersectingViewport(): Promise<boolean>;
|
|
25
|
-
press(key: puppeteer.KeyInput, options?: {
|
|
26
|
-
text?: string;
|
|
27
|
-
delay?: number;
|
|
28
|
-
}): Promise<void>;
|
|
29
|
-
tap(): Promise<void>;
|
|
30
|
-
type(text: string, options?: {
|
|
31
|
-
delay: number;
|
|
32
|
-
}): Promise<void>;
|
|
33
|
-
getProperty(propertyName: string): Promise<any>;
|
|
34
|
-
setProperty(propertyName: string, value: any): void;
|
|
35
|
-
getAttribute(name: string): any;
|
|
36
|
-
setAttribute(name: string, value: any): void;
|
|
37
|
-
removeAttribute(name: string): void;
|
|
38
|
-
toggleAttribute(name: string, force?: boolean): void;
|
|
39
|
-
get classList(): any;
|
|
40
|
-
get className(): string;
|
|
41
|
-
set className(value: string);
|
|
42
|
-
get id(): string;
|
|
43
|
-
set id(value: string);
|
|
44
|
-
get innerHTML(): string;
|
|
45
|
-
set innerHTML(value: string);
|
|
46
|
-
get innerText(): string;
|
|
47
|
-
set innerText(value: string);
|
|
48
|
-
get nodeValue(): string;
|
|
49
|
-
set nodeValue(value: string);
|
|
50
|
-
get outerHTML(): any;
|
|
51
|
-
set outerHTML(_: any);
|
|
52
|
-
get shadowRoot(): any;
|
|
53
|
-
set shadowRoot(value: any);
|
|
54
|
-
get tabIndex(): number;
|
|
55
|
-
set tabIndex(value: number);
|
|
56
|
-
get textContent(): string;
|
|
57
|
-
set textContent(value: string);
|
|
58
|
-
get title(): string;
|
|
59
|
-
set title(value: string);
|
|
60
|
-
getComputedStyle(pseudoElt?: string | null): Promise<any>;
|
|
61
|
-
e2eRunActions(): Promise<any>;
|
|
62
|
-
e2eSync(): Promise<void>;
|
|
63
|
-
private _validate;
|
|
64
|
-
e2eDispose(): Promise<void>;
|
|
65
|
-
}
|
|
66
|
-
export declare function find(page: pd.E2EPageInternal, rootHandle: puppeteer.ElementHandle, selector: pd.FindSelector): Promise<E2EElement>;
|
|
67
|
-
export declare function findAll(page: pd.E2EPageInternal, rootHandle: puppeteer.ElementHandle, selector: pd.FindSelector): Promise<E2EElement[]>;
|