@browsermation/browser-engine 0.0.12 → 0.0.16
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/node_modules/playwright/LICENSE +202 -0
- package/dist/node_modules/playwright/NOTICE +5 -0
- package/dist/node_modules/playwright/README.md +168 -0
- package/dist/node_modules/playwright/ThirdPartyNotices.txt +6197 -0
- package/dist/node_modules/playwright/cli.js +19 -0
- package/dist/node_modules/playwright/index.d.ts +17 -0
- package/dist/node_modules/playwright/index.js +17 -0
- package/dist/node_modules/playwright/index.mjs +18 -0
- package/dist/node_modules/playwright/jsx-runtime.js +42 -0
- package/dist/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/dist/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/dist/node_modules/playwright/lib/agents/generateAgents.js +395 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +55 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +72 -0
- package/dist/node_modules/playwright/lib/common/config.js +280 -0
- package/dist/node_modules/playwright/lib/common/configLoader.js +344 -0
- package/dist/node_modules/playwright/lib/common/esmLoaderHost.js +102 -0
- package/dist/node_modules/playwright/lib/common/expectBundle.js +43 -0
- package/dist/node_modules/playwright/lib/common/expectBundleImpl.js +407 -0
- package/dist/node_modules/playwright/lib/common/fixtures.js +302 -0
- package/dist/node_modules/playwright/lib/common/globals.js +58 -0
- package/dist/node_modules/playwright/lib/common/ipc.js +60 -0
- package/dist/node_modules/playwright/lib/common/poolBuilder.js +85 -0
- package/dist/node_modules/playwright/lib/common/process.js +104 -0
- package/dist/node_modules/playwright/lib/common/suiteUtils.js +140 -0
- package/dist/node_modules/playwright/lib/common/test.js +321 -0
- package/dist/node_modules/playwright/lib/common/testLoader.js +101 -0
- package/dist/node_modules/playwright/lib/common/testType.js +298 -0
- package/dist/node_modules/playwright/lib/common/validators.js +68 -0
- package/dist/node_modules/playwright/lib/fsWatcher.js +67 -0
- package/dist/node_modules/playwright/lib/index.js +682 -0
- package/dist/node_modules/playwright/lib/internalsForTest.js +42 -0
- package/dist/node_modules/playwright/lib/isomorphic/events.js +77 -0
- package/dist/node_modules/playwright/lib/isomorphic/folders.js +30 -0
- package/dist/node_modules/playwright/lib/isomorphic/stringInternPool.js +69 -0
- package/dist/node_modules/playwright/lib/isomorphic/teleReceiver.js +508 -0
- package/dist/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +137 -0
- package/dist/node_modules/playwright/lib/isomorphic/testServerConnection.js +225 -0
- package/dist/node_modules/playwright/lib/isomorphic/testServerInterface.js +16 -0
- package/dist/node_modules/playwright/lib/isomorphic/testTree.js +334 -0
- package/dist/node_modules/playwright/lib/isomorphic/types.d.js +16 -0
- package/dist/node_modules/playwright/lib/loader/loaderMain.js +59 -0
- package/dist/node_modules/playwright/lib/matchers/expect.js +324 -0
- package/dist/node_modules/playwright/lib/matchers/matcherHint.js +87 -0
- package/dist/node_modules/playwright/lib/matchers/matchers.js +382 -0
- package/dist/node_modules/playwright/lib/matchers/toBeTruthy.js +73 -0
- package/dist/node_modules/playwright/lib/matchers/toEqual.js +99 -0
- package/dist/node_modules/playwright/lib/matchers/toHaveURL.js +102 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchSnapshot.js +341 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchText.js +99 -0
- package/dist/node_modules/playwright/lib/mcp/browser/actions.d.js +16 -0
- package/dist/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +296 -0
- package/dist/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +76 -0
- package/dist/node_modules/playwright/lib/mcp/browser/codegen.js +66 -0
- package/dist/node_modules/playwright/lib/mcp/browser/config.js +368 -0
- package/dist/node_modules/playwright/lib/mcp/browser/context.js +267 -0
- package/dist/node_modules/playwright/lib/mcp/browser/response.js +237 -0
- package/dist/node_modules/playwright/lib/mcp/browser/sessionLog.js +160 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tab.js +292 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/common.js +63 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/console.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +60 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +69 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/files.js +58 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/form.js +73 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/install.js +69 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +84 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/mouse.js +107 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/navigate.js +62 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/network.js +54 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/pdf.js +59 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/runCode.js +75 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +106 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +181 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tabs.js +67 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tool.js +49 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tracing.js +74 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/utils.js +89 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/verify.js +153 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/wait.js +63 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools.js +82 -0
- package/dist/node_modules/playwright/lib/mcp/browser/watchdog.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/config.d.js +16 -0
- package/dist/node_modules/playwright/lib/mcp/extension/cdpRelay.js +351 -0
- package/dist/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +75 -0
- package/dist/node_modules/playwright/lib/mcp/extension/protocol.js +28 -0
- package/dist/node_modules/playwright/lib/mcp/index.js +61 -0
- package/dist/node_modules/playwright/lib/mcp/log.js +35 -0
- package/dist/node_modules/playwright/lib/mcp/program.js +116 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/bundle.js +81 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/exports.js +30 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/http.js +187 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/proxyBackend.js +128 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/server.js +198 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/tool.js +47 -0
- package/dist/node_modules/playwright/lib/mcp/test/browserBackend.js +108 -0
- package/dist/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/dist/node_modules/playwright/lib/mcp/test/plannerTools.js +144 -0
- package/dist/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/dist/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/dist/node_modules/playwright/lib/mcp/test/testContext.js +279 -0
- package/dist/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/dist/node_modules/playwright/lib/mcp/test/testTools.js +106 -0
- package/dist/node_modules/playwright/lib/mcpBundleImpl.js +41 -0
- package/dist/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/dist/node_modules/playwright/lib/plugins/index.js +28 -0
- package/dist/node_modules/playwright/lib/plugins/webServerPlugin.js +237 -0
- package/dist/node_modules/playwright/lib/program.js +403 -0
- package/dist/node_modules/playwright/lib/reporters/base.js +609 -0
- package/dist/node_modules/playwright/lib/reporters/blob.js +135 -0
- package/dist/node_modules/playwright/lib/reporters/dot.js +82 -0
- package/dist/node_modules/playwright/lib/reporters/empty.js +32 -0
- package/dist/node_modules/playwright/lib/reporters/github.js +128 -0
- package/dist/node_modules/playwright/lib/reporters/html.js +623 -0
- package/dist/node_modules/playwright/lib/reporters/internalReporter.js +132 -0
- package/dist/node_modules/playwright/lib/reporters/json.js +254 -0
- package/dist/node_modules/playwright/lib/reporters/junit.js +232 -0
- package/dist/node_modules/playwright/lib/reporters/line.js +113 -0
- package/dist/node_modules/playwright/lib/reporters/list.js +231 -0
- package/dist/node_modules/playwright/lib/reporters/listModeReporter.js +69 -0
- package/dist/node_modules/playwright/lib/reporters/markdown.js +144 -0
- package/dist/node_modules/playwright/lib/reporters/merge.js +541 -0
- package/dist/node_modules/playwright/lib/reporters/multiplexer.js +104 -0
- package/dist/node_modules/playwright/lib/reporters/reporterV2.js +102 -0
- package/dist/node_modules/playwright/lib/reporters/teleEmitter.js +299 -0
- package/dist/node_modules/playwright/lib/reporters/versions/blobV1.js +16 -0
- package/dist/node_modules/playwright/lib/runner/dispatcher.js +515 -0
- package/dist/node_modules/playwright/lib/runner/failureTracker.js +72 -0
- package/dist/node_modules/playwright/lib/runner/lastRun.js +77 -0
- package/dist/node_modules/playwright/lib/runner/loadUtils.js +334 -0
- package/dist/node_modules/playwright/lib/runner/loaderHost.js +89 -0
- package/dist/node_modules/playwright/lib/runner/processHost.js +161 -0
- package/dist/node_modules/playwright/lib/runner/projectUtils.js +241 -0
- package/dist/node_modules/playwright/lib/runner/rebase.js +189 -0
- package/dist/node_modules/playwright/lib/runner/reporters.js +138 -0
- package/dist/node_modules/playwright/lib/runner/sigIntWatcher.js +96 -0
- package/dist/node_modules/playwright/lib/runner/taskRunner.js +127 -0
- package/dist/node_modules/playwright/lib/runner/tasks.js +410 -0
- package/dist/node_modules/playwright/lib/runner/testGroups.js +117 -0
- package/dist/node_modules/playwright/lib/runner/testRunner.js +389 -0
- package/dist/node_modules/playwright/lib/runner/testServer.js +269 -0
- package/dist/node_modules/playwright/lib/runner/uiModeReporter.js +30 -0
- package/dist/node_modules/playwright/lib/runner/vcs.js +72 -0
- package/dist/node_modules/playwright/lib/runner/watchMode.js +395 -0
- package/dist/node_modules/playwright/lib/runner/workerHost.js +98 -0
- package/dist/node_modules/playwright/lib/third_party/pirates.js +62 -0
- package/dist/node_modules/playwright/lib/third_party/tsconfig-loader.js +103 -0
- package/dist/node_modules/playwright/lib/transform/babelBundle.js +43 -0
- package/dist/node_modules/playwright/lib/transform/babelBundleImpl.js +461 -0
- package/dist/node_modules/playwright/lib/transform/compilationCache.js +272 -0
- package/dist/node_modules/playwright/lib/transform/esmLoader.js +104 -0
- package/dist/node_modules/playwright/lib/transform/portTransport.js +67 -0
- package/dist/node_modules/playwright/lib/transform/transform.js +293 -0
- package/dist/node_modules/playwright/lib/util.js +403 -0
- package/dist/node_modules/playwright/lib/utilsBundle.js +43 -0
- package/dist/node_modules/playwright/lib/utilsBundleImpl.js +100 -0
- package/dist/node_modules/playwright/lib/worker/fixtureRunner.js +258 -0
- package/dist/node_modules/playwright/lib/worker/testInfo.js +516 -0
- package/dist/node_modules/playwright/lib/worker/testTracing.js +345 -0
- package/dist/node_modules/playwright/lib/worker/timeoutManager.js +174 -0
- package/dist/node_modules/playwright/lib/worker/util.js +31 -0
- package/dist/node_modules/playwright/lib/worker/workerMain.js +529 -0
- package/dist/node_modules/playwright/package.json +72 -0
- package/dist/node_modules/playwright/test.d.ts +18 -0
- package/dist/node_modules/playwright/test.js +24 -0
- package/dist/node_modules/playwright/test.mjs +33 -0
- package/dist/node_modules/playwright/types/test.d.ts +10253 -0
- package/dist/node_modules/playwright/types/testReporter.d.ts +821 -0
- package/dist/node_modules/playwright-core/LICENSE +202 -0
- package/dist/node_modules/playwright-core/NOTICE +5 -0
- package/dist/node_modules/playwright-core/README.md +3 -0
- package/dist/node_modules/playwright-core/ThirdPartyNotices.txt +1161 -0
- package/dist/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/dist/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/browsers.json +80 -0
- package/dist/node_modules/playwright-core/cli.js +18 -0
- package/dist/node_modules/playwright-core/index.d.ts +17 -0
- package/dist/node_modules/playwright-core/index.js +32 -0
- package/dist/node_modules/playwright-core/index.mjs +28 -0
- package/dist/node_modules/playwright-core/lib/androidServerImpl.js +65 -0
- package/dist/node_modules/playwright-core/lib/browserServerImpl.js +120 -0
- package/dist/node_modules/playwright-core/lib/cli/driver.js +97 -0
- package/dist/node_modules/playwright-core/lib/cli/program.js +590 -0
- package/dist/node_modules/playwright-core/lib/cli/programWithTestStub.js +74 -0
- package/dist/node_modules/playwright-core/lib/client/android.js +361 -0
- package/dist/node_modules/playwright-core/lib/client/api.js +134 -0
- package/dist/node_modules/playwright-core/lib/client/artifact.js +79 -0
- package/dist/node_modules/playwright-core/lib/client/browser.js +163 -0
- package/dist/node_modules/playwright-core/lib/client/browserContext.js +547 -0
- package/dist/node_modules/playwright-core/lib/client/browserType.js +184 -0
- package/dist/node_modules/playwright-core/lib/client/cdpSession.js +51 -0
- package/dist/node_modules/playwright-core/lib/client/channelOwner.js +194 -0
- package/dist/node_modules/playwright-core/lib/client/clientHelper.js +64 -0
- package/dist/node_modules/playwright-core/lib/client/clientInstrumentation.js +55 -0
- package/dist/node_modules/playwright-core/lib/client/clientStackTrace.js +69 -0
- package/dist/node_modules/playwright-core/lib/client/clock.js +68 -0
- package/dist/node_modules/playwright-core/lib/client/connection.js +314 -0
- package/dist/node_modules/playwright-core/lib/client/consoleMessage.js +58 -0
- package/dist/node_modules/playwright-core/lib/client/coverage.js +44 -0
- package/dist/node_modules/playwright-core/lib/client/dialog.js +56 -0
- package/dist/node_modules/playwright-core/lib/client/download.js +62 -0
- package/dist/node_modules/playwright-core/lib/client/electron.js +138 -0
- package/dist/node_modules/playwright-core/lib/client/elementHandle.js +281 -0
- package/dist/node_modules/playwright-core/lib/client/errors.js +77 -0
- package/dist/node_modules/playwright-core/lib/client/eventEmitter.js +314 -0
- package/dist/node_modules/playwright-core/lib/client/events.js +100 -0
- package/dist/node_modules/playwright-core/lib/client/fetch.js +369 -0
- package/dist/node_modules/playwright-core/lib/client/fileChooser.js +46 -0
- package/dist/node_modules/playwright-core/lib/client/fileUtils.js +34 -0
- package/dist/node_modules/playwright-core/lib/client/frame.js +408 -0
- package/dist/node_modules/playwright-core/lib/client/harRouter.js +87 -0
- package/dist/node_modules/playwright-core/lib/client/input.js +84 -0
- package/dist/node_modules/playwright-core/lib/client/jsHandle.js +109 -0
- package/dist/node_modules/playwright-core/lib/client/jsonPipe.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/localUtils.js +60 -0
- package/dist/node_modules/playwright-core/lib/client/locator.js +369 -0
- package/dist/node_modules/playwright-core/lib/client/network.js +747 -0
- package/dist/node_modules/playwright-core/lib/client/page.js +718 -0
- package/dist/node_modules/playwright-core/lib/client/platform.js +74 -0
- package/dist/node_modules/playwright-core/lib/client/playwright.js +71 -0
- package/dist/node_modules/playwright-core/lib/client/selectors.js +55 -0
- package/dist/node_modules/playwright-core/lib/client/stream.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/timeoutSettings.js +79 -0
- package/dist/node_modules/playwright-core/lib/client/tracing.js +119 -0
- package/dist/node_modules/playwright-core/lib/client/types.js +28 -0
- package/dist/node_modules/playwright-core/lib/client/video.js +59 -0
- package/dist/node_modules/playwright-core/lib/client/waiter.js +142 -0
- package/dist/node_modules/playwright-core/lib/client/webError.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/webSocket.js +93 -0
- package/dist/node_modules/playwright-core/lib/client/worker.js +85 -0
- package/dist/node_modules/playwright-core/lib/client/writableStream.js +39 -0
- package/dist/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/clockSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/injectedScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/storageScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/utilityScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/webSocketMockSource.js +336 -0
- package/dist/node_modules/playwright-core/lib/inProcessFactory.js +60 -0
- package/dist/node_modules/playwright-core/lib/inprocess.js +3 -0
- package/dist/node_modules/playwright-core/lib/outofprocess.js +76 -0
- package/dist/node_modules/playwright-core/lib/protocol/serializers.js +192 -0
- package/dist/node_modules/playwright-core/lib/protocol/validator.js +2890 -0
- package/dist/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
- package/dist/node_modules/playwright-core/lib/remote/playwrightConnection.js +129 -0
- package/dist/node_modules/playwright-core/lib/remote/playwrightServer.js +335 -0
- package/dist/node_modules/playwright-core/lib/server/android/android.js +465 -0
- package/dist/node_modules/playwright-core/lib/server/android/backendAdb.js +177 -0
- package/dist/node_modules/playwright-core/lib/server/artifact.js +127 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +505 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +153 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +212 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +221 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +130 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiInput.js +146 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiPage.js +572 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiDeserializer.js +98 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +179 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/dist/node_modules/playwright-core/lib/server/browser.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/browserContext.js +695 -0
- package/dist/node_modules/playwright-core/lib/server/browserType.js +328 -0
- package/dist/node_modules/playwright-core/lib/server/callLog.js +82 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/chromium.js +402 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +104 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crBrowser.js +510 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crConnection.js +202 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crCoverage.js +235 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crDevTools.js +113 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crInput.js +187 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +666 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crPage.js +1069 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crPdf.js +121 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +136 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/videoRecorder.js +115 -0
- package/dist/node_modules/playwright-core/lib/server/clock.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/csharp.js +327 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/java.js +274 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/javascript.js +270 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/jsonl.js +52 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/language.js +132 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/languages.js +68 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/python.js +279 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/types.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/console.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/cookieStore.js +206 -0
- package/dist/node_modules/playwright-core/lib/server/debugController.js +191 -0
- package/dist/node_modules/playwright-core/lib/server/debugger.js +119 -0
- package/dist/node_modules/playwright-core/lib/server/deviceDescriptors.js +39 -0
- package/dist/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
- package/dist/node_modules/playwright-core/lib/server/dialog.js +116 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +381 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +371 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +389 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/dist/node_modules/playwright-core/lib/server/dom.js +806 -0
- package/dist/node_modules/playwright-core/lib/server/download.js +70 -0
- package/dist/node_modules/playwright-core/lib/server/electron/electron.js +270 -0
- package/dist/node_modules/playwright-core/lib/server/electron/loader.js +29 -0
- package/dist/node_modules/playwright-core/lib/server/errors.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/fetch.js +621 -0
- package/dist/node_modules/playwright-core/lib/server/fileChooser.js +43 -0
- package/dist/node_modules/playwright-core/lib/server/fileUploadUtils.js +84 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +428 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffConnection.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffInput.js +159 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffPage.js +500 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/firefox.js +116 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/formData.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/frameSelectors.js +154 -0
- package/dist/node_modules/playwright-core/lib/server/frames.js +1455 -0
- package/dist/node_modules/playwright-core/lib/server/har/harRecorder.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/har/harTracer.js +607 -0
- package/dist/node_modules/playwright-core/lib/server/harBackend.js +157 -0
- package/dist/node_modules/playwright-core/lib/server/helper.js +96 -0
- package/dist/node_modules/playwright-core/lib/server/index.js +58 -0
- package/dist/node_modules/playwright-core/lib/server/input.js +277 -0
- package/dist/node_modules/playwright-core/lib/server/instrumentation.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/javascript.js +291 -0
- package/dist/node_modules/playwright-core/lib/server/launchApp.js +128 -0
- package/dist/node_modules/playwright-core/lib/server/localUtils.js +214 -0
- package/dist/node_modules/playwright-core/lib/server/macEditingCommands.js +143 -0
- package/dist/node_modules/playwright-core/lib/server/network.js +629 -0
- package/dist/node_modules/playwright-core/lib/server/page.js +886 -0
- package/dist/node_modules/playwright-core/lib/server/pipeTransport.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/playwright.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/progress.js +112 -0
- package/dist/node_modules/playwright-core/lib/server/protocolError.js +52 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/chat.js +161 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderApp.js +387 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/throttledFile.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/recorder.js +499 -0
- package/dist/node_modules/playwright-core/lib/server/registry/browserFetcher.js +175 -0
- package/dist/node_modules/playwright-core/lib/server/registry/dependencies.js +371 -0
- package/dist/node_modules/playwright-core/lib/server/registry/index.js +1399 -0
- package/dist/node_modules/playwright-core/lib/server/registry/nativeDeps.js +1280 -0
- package/dist/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +124 -0
- package/dist/node_modules/playwright-core/lib/server/screenshotter.js +333 -0
- package/dist/node_modules/playwright-core/lib/server/selectors.js +112 -0
- package/dist/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/dist/node_modules/playwright-core/lib/server/socksInterceptor.js +95 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +541 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +604 -0
- package/dist/node_modules/playwright-core/lib/server/trace/test/inMemorySnapshotter.js +87 -0
- package/dist/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +241 -0
- package/dist/node_modules/playwright-core/lib/server/transport.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/types.js +28 -0
- package/dist/node_modules/playwright-core/lib/server/usKeyboardLayout.js +145 -0
- package/dist/node_modules/playwright-core/lib/server/utils/ascii.js +44 -0
- package/dist/node_modules/playwright-core/lib/server/utils/comparators.js +139 -0
- package/dist/node_modules/playwright-core/lib/server/utils/crypto.js +216 -0
- package/dist/node_modules/playwright-core/lib/server/utils/debug.js +42 -0
- package/dist/node_modules/playwright-core/lib/server/utils/debugLogger.js +122 -0
- package/dist/node_modules/playwright-core/lib/server/utils/env.js +73 -0
- package/dist/node_modules/playwright-core/lib/server/utils/eventsHelper.js +39 -0
- package/dist/node_modules/playwright-core/lib/server/utils/expectUtils.js +38 -0
- package/dist/node_modules/playwright-core/lib/server/utils/fileUtils.js +191 -0
- package/dist/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
- package/dist/node_modules/playwright-core/lib/server/utils/hostPlatform.js +123 -0
- package/dist/node_modules/playwright-core/lib/server/utils/httpServer.js +218 -0
- package/dist/node_modules/playwright-core/lib/server/utils/imageUtils.js +141 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
- package/dist/node_modules/playwright-core/lib/server/utils/linuxUtils.js +71 -0
- package/dist/node_modules/playwright-core/lib/server/utils/network.js +233 -0
- package/dist/node_modules/playwright-core/lib/server/utils/nodePlatform.js +148 -0
- package/dist/node_modules/playwright-core/lib/server/utils/pipeTransport.js +84 -0
- package/dist/node_modules/playwright-core/lib/server/utils/processLauncher.js +241 -0
- package/dist/node_modules/playwright-core/lib/server/utils/profiler.js +65 -0
- package/dist/node_modules/playwright-core/lib/server/utils/socksProxy.js +511 -0
- package/dist/node_modules/playwright-core/lib/server/utils/spawnAsync.js +41 -0
- package/dist/node_modules/playwright-core/lib/server/utils/task.js +51 -0
- package/dist/node_modules/playwright-core/lib/server/utils/userAgent.js +98 -0
- package/dist/node_modules/playwright-core/lib/server/utils/wsServer.js +121 -0
- package/dist/node_modules/playwright-core/lib/server/utils/zipFile.js +74 -0
- package/dist/node_modules/playwright-core/lib/server/utils/zones.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/webkit.js +110 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +339 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkConnection.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkInput.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +169 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkPage.js +1130 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +105 -0
- package/dist/node_modules/playwright-core/lib/third_party/pixelmatch.js +255 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +397 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/assert.js +31 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/colors.js +72 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/headers.js +53 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +322 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +155 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/time.js +49 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/types.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +190 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/dist/node_modules/playwright-core/lib/utils.js +109 -0
- package/dist/node_modules/playwright-core/lib/utilsBundle.js +112 -0
- package/dist/node_modules/playwright-core/lib/utilsBundleImpl/index.js +218 -0
- package/dist/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
- package/dist/node_modules/playwright-core/lib/vite/htmlReport/index.html +84 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-BoWUGj0J.js +25 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/index-DJqDAOZp.js +193 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/index-Ri0uHF7I.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-Bucv2d7q.js +25 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BEpdCv1S.js +266 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.ConWv5KN.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.BxQ34UMZ.js +2 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.C4Y3Aw8n.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.html +43 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +21 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +3 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.BWTwXl41.js +5 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +17 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/dist/node_modules/playwright-core/lib/zipBundle.js +34 -0
- package/dist/node_modules/playwright-core/lib/zipBundleImpl.js +5 -0
- package/dist/node_modules/playwright-core/package.json +42 -0
- package/dist/node_modules/playwright-core/types/protocol.d.ts +23245 -0
- package/dist/node_modules/playwright-core/types/structs.d.ts +45 -0
- package/dist/node_modules/playwright-core/types/types.d.ts +22856 -0
- package/dist/server.obf.js +1 -1
- package/package.json +11 -12
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var teleReceiver_exports = {};
|
|
20
|
+
__export(teleReceiver_exports, {
|
|
21
|
+
TeleReporterReceiver: () => TeleReporterReceiver,
|
|
22
|
+
TeleSuite: () => TeleSuite,
|
|
23
|
+
TeleTestCase: () => TeleTestCase,
|
|
24
|
+
TeleTestResult: () => TeleTestResult,
|
|
25
|
+
baseFullConfig: () => baseFullConfig,
|
|
26
|
+
computeTestCaseOutcome: () => computeTestCaseOutcome,
|
|
27
|
+
parseRegexPatterns: () => parseRegexPatterns,
|
|
28
|
+
serializeRegexPatterns: () => serializeRegexPatterns
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(teleReceiver_exports);
|
|
31
|
+
class TeleReporterReceiver {
|
|
32
|
+
constructor(reporter, options = {}) {
|
|
33
|
+
this.isListing = false;
|
|
34
|
+
this._tests = /* @__PURE__ */ new Map();
|
|
35
|
+
this._rootSuite = new TeleSuite("", "root");
|
|
36
|
+
this._options = options;
|
|
37
|
+
this._reporter = reporter;
|
|
38
|
+
}
|
|
39
|
+
reset() {
|
|
40
|
+
this._rootSuite._entries = [];
|
|
41
|
+
this._tests.clear();
|
|
42
|
+
}
|
|
43
|
+
dispatch(message) {
|
|
44
|
+
const { method, params } = message;
|
|
45
|
+
if (method === "onConfigure") {
|
|
46
|
+
this._onConfigure(params.config);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (method === "onProject") {
|
|
50
|
+
this._onProject(params.project);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (method === "onBegin") {
|
|
54
|
+
this._onBegin();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (method === "onTestBegin") {
|
|
58
|
+
this._onTestBegin(params.testId, params.result);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (method === "onTestEnd") {
|
|
62
|
+
this._onTestEnd(params.test, params.result);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (method === "onStepBegin") {
|
|
66
|
+
this._onStepBegin(params.testId, params.resultId, params.step);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (method === "onAttach") {
|
|
70
|
+
this._onAttach(params.testId, params.resultId, params.attachments);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (method === "onStepEnd") {
|
|
74
|
+
this._onStepEnd(params.testId, params.resultId, params.step);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (method === "onError") {
|
|
78
|
+
this._onError(params.error);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (method === "onStdIO") {
|
|
82
|
+
this._onStdIO(params.type, params.testId, params.resultId, params.data, params.isBase64);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (method === "onEnd")
|
|
86
|
+
return this._onEnd(params.result);
|
|
87
|
+
if (method === "onExit")
|
|
88
|
+
return this._onExit();
|
|
89
|
+
}
|
|
90
|
+
_onConfigure(config) {
|
|
91
|
+
this._rootDir = config.rootDir;
|
|
92
|
+
this._config = this._parseConfig(config);
|
|
93
|
+
this._reporter.onConfigure?.(this._config);
|
|
94
|
+
}
|
|
95
|
+
_onProject(project) {
|
|
96
|
+
let projectSuite = this._options.mergeProjects ? this._rootSuite.suites.find((suite) => suite.project().name === project.name) : void 0;
|
|
97
|
+
if (!projectSuite) {
|
|
98
|
+
projectSuite = new TeleSuite(project.name, "project");
|
|
99
|
+
this._rootSuite._addSuite(projectSuite);
|
|
100
|
+
}
|
|
101
|
+
projectSuite._project = this._parseProject(project);
|
|
102
|
+
for (const suite of project.suites)
|
|
103
|
+
this._mergeSuiteInto(suite, projectSuite);
|
|
104
|
+
}
|
|
105
|
+
_onBegin() {
|
|
106
|
+
this._reporter.onBegin?.(this._rootSuite);
|
|
107
|
+
}
|
|
108
|
+
_onTestBegin(testId, payload) {
|
|
109
|
+
const test = this._tests.get(testId);
|
|
110
|
+
if (this._options.clearPreviousResultsWhenTestBegins)
|
|
111
|
+
test.results = [];
|
|
112
|
+
const testResult = test._createTestResult(payload.id);
|
|
113
|
+
testResult.retry = payload.retry;
|
|
114
|
+
testResult.workerIndex = payload.workerIndex;
|
|
115
|
+
testResult.parallelIndex = payload.parallelIndex;
|
|
116
|
+
testResult.setStartTimeNumber(payload.startTime);
|
|
117
|
+
this._reporter.onTestBegin?.(test, testResult);
|
|
118
|
+
}
|
|
119
|
+
_onTestEnd(testEndPayload, payload) {
|
|
120
|
+
const test = this._tests.get(testEndPayload.testId);
|
|
121
|
+
test.timeout = testEndPayload.timeout;
|
|
122
|
+
test.expectedStatus = testEndPayload.expectedStatus;
|
|
123
|
+
const result = test.results.find((r) => r._id === payload.id);
|
|
124
|
+
result.duration = payload.duration;
|
|
125
|
+
result.status = payload.status;
|
|
126
|
+
result.errors = payload.errors;
|
|
127
|
+
result.error = result.errors?.[0];
|
|
128
|
+
if (!!payload.attachments)
|
|
129
|
+
result.attachments = this._parseAttachments(payload.attachments);
|
|
130
|
+
if (payload.annotations) {
|
|
131
|
+
this._absoluteAnnotationLocationsInplace(payload.annotations);
|
|
132
|
+
result.annotations = payload.annotations;
|
|
133
|
+
test.annotations = payload.annotations;
|
|
134
|
+
}
|
|
135
|
+
this._reporter.onTestEnd?.(test, result);
|
|
136
|
+
result._stepMap = /* @__PURE__ */ new Map();
|
|
137
|
+
}
|
|
138
|
+
_onStepBegin(testId, resultId, payload) {
|
|
139
|
+
const test = this._tests.get(testId);
|
|
140
|
+
const result = test.results.find((r) => r._id === resultId);
|
|
141
|
+
const parentStep = payload.parentStepId ? result._stepMap.get(payload.parentStepId) : void 0;
|
|
142
|
+
const location = this._absoluteLocation(payload.location);
|
|
143
|
+
const step = new TeleTestStep(payload, parentStep, location, result);
|
|
144
|
+
if (parentStep)
|
|
145
|
+
parentStep.steps.push(step);
|
|
146
|
+
else
|
|
147
|
+
result.steps.push(step);
|
|
148
|
+
result._stepMap.set(payload.id, step);
|
|
149
|
+
this._reporter.onStepBegin?.(test, result, step);
|
|
150
|
+
}
|
|
151
|
+
_onStepEnd(testId, resultId, payload) {
|
|
152
|
+
const test = this._tests.get(testId);
|
|
153
|
+
const result = test.results.find((r) => r._id === resultId);
|
|
154
|
+
const step = result._stepMap.get(payload.id);
|
|
155
|
+
step._endPayload = payload;
|
|
156
|
+
step.duration = payload.duration;
|
|
157
|
+
step.error = payload.error;
|
|
158
|
+
this._reporter.onStepEnd?.(test, result, step);
|
|
159
|
+
}
|
|
160
|
+
_onAttach(testId, resultId, attachments) {
|
|
161
|
+
const test = this._tests.get(testId);
|
|
162
|
+
const result = test.results.find((r) => r._id === resultId);
|
|
163
|
+
result.attachments.push(...attachments.map((a) => ({
|
|
164
|
+
name: a.name,
|
|
165
|
+
contentType: a.contentType,
|
|
166
|
+
path: a.path,
|
|
167
|
+
body: a.base64 && globalThis.Buffer ? Buffer.from(a.base64, "base64") : void 0
|
|
168
|
+
})));
|
|
169
|
+
}
|
|
170
|
+
_onError(error) {
|
|
171
|
+
this._reporter.onError?.(error);
|
|
172
|
+
}
|
|
173
|
+
_onStdIO(type, testId, resultId, data, isBase64) {
|
|
174
|
+
const chunk = isBase64 ? globalThis.Buffer ? Buffer.from(data, "base64") : atob(data) : data;
|
|
175
|
+
const test = testId ? this._tests.get(testId) : void 0;
|
|
176
|
+
const result = test && resultId ? test.results.find((r) => r._id === resultId) : void 0;
|
|
177
|
+
if (type === "stdout") {
|
|
178
|
+
result?.stdout.push(chunk);
|
|
179
|
+
this._reporter.onStdOut?.(chunk, test, result);
|
|
180
|
+
} else {
|
|
181
|
+
result?.stderr.push(chunk);
|
|
182
|
+
this._reporter.onStdErr?.(chunk, test, result);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
async _onEnd(result) {
|
|
186
|
+
await this._reporter.onEnd?.({
|
|
187
|
+
status: result.status,
|
|
188
|
+
startTime: new Date(result.startTime),
|
|
189
|
+
duration: result.duration
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
_onExit() {
|
|
193
|
+
return this._reporter.onExit?.();
|
|
194
|
+
}
|
|
195
|
+
_parseConfig(config) {
|
|
196
|
+
const result = { ...baseFullConfig, ...config };
|
|
197
|
+
if (this._options.configOverrides) {
|
|
198
|
+
result.configFile = this._options.configOverrides.configFile;
|
|
199
|
+
result.reportSlowTests = this._options.configOverrides.reportSlowTests;
|
|
200
|
+
result.quiet = this._options.configOverrides.quiet;
|
|
201
|
+
result.reporter = [...this._options.configOverrides.reporter];
|
|
202
|
+
}
|
|
203
|
+
return result;
|
|
204
|
+
}
|
|
205
|
+
_parseProject(project) {
|
|
206
|
+
return {
|
|
207
|
+
metadata: project.metadata,
|
|
208
|
+
name: project.name,
|
|
209
|
+
outputDir: this._absolutePath(project.outputDir),
|
|
210
|
+
repeatEach: project.repeatEach,
|
|
211
|
+
retries: project.retries,
|
|
212
|
+
testDir: this._absolutePath(project.testDir),
|
|
213
|
+
testIgnore: parseRegexPatterns(project.testIgnore),
|
|
214
|
+
testMatch: parseRegexPatterns(project.testMatch),
|
|
215
|
+
timeout: project.timeout,
|
|
216
|
+
grep: parseRegexPatterns(project.grep),
|
|
217
|
+
grepInvert: parseRegexPatterns(project.grepInvert),
|
|
218
|
+
dependencies: project.dependencies,
|
|
219
|
+
teardown: project.teardown,
|
|
220
|
+
snapshotDir: this._absolutePath(project.snapshotDir),
|
|
221
|
+
use: project.use
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
_parseAttachments(attachments) {
|
|
225
|
+
return attachments.map((a) => {
|
|
226
|
+
return {
|
|
227
|
+
...a,
|
|
228
|
+
body: a.base64 && globalThis.Buffer ? Buffer.from(a.base64, "base64") : void 0
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
_mergeSuiteInto(jsonSuite, parent) {
|
|
233
|
+
let targetSuite = parent.suites.find((s) => s.title === jsonSuite.title);
|
|
234
|
+
if (!targetSuite) {
|
|
235
|
+
targetSuite = new TeleSuite(jsonSuite.title, parent.type === "project" ? "file" : "describe");
|
|
236
|
+
parent._addSuite(targetSuite);
|
|
237
|
+
}
|
|
238
|
+
targetSuite.location = this._absoluteLocation(jsonSuite.location);
|
|
239
|
+
jsonSuite.entries.forEach((e) => {
|
|
240
|
+
if ("testId" in e)
|
|
241
|
+
this._mergeTestInto(e, targetSuite);
|
|
242
|
+
else
|
|
243
|
+
this._mergeSuiteInto(e, targetSuite);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
_mergeTestInto(jsonTest, parent) {
|
|
247
|
+
let targetTest = this._options.mergeTestCases ? parent.tests.find((s) => s.title === jsonTest.title && s.repeatEachIndex === jsonTest.repeatEachIndex) : void 0;
|
|
248
|
+
if (!targetTest) {
|
|
249
|
+
targetTest = new TeleTestCase(jsonTest.testId, jsonTest.title, this._absoluteLocation(jsonTest.location), jsonTest.repeatEachIndex);
|
|
250
|
+
parent._addTest(targetTest);
|
|
251
|
+
this._tests.set(targetTest.id, targetTest);
|
|
252
|
+
}
|
|
253
|
+
this._updateTest(jsonTest, targetTest);
|
|
254
|
+
}
|
|
255
|
+
_updateTest(payload, test) {
|
|
256
|
+
test.id = payload.testId;
|
|
257
|
+
test.location = this._absoluteLocation(payload.location);
|
|
258
|
+
test.retries = payload.retries;
|
|
259
|
+
test.tags = payload.tags ?? [];
|
|
260
|
+
test.annotations = payload.annotations ?? [];
|
|
261
|
+
this._absoluteAnnotationLocationsInplace(test.annotations);
|
|
262
|
+
return test;
|
|
263
|
+
}
|
|
264
|
+
_absoluteAnnotationLocationsInplace(annotations) {
|
|
265
|
+
for (const annotation of annotations) {
|
|
266
|
+
if (annotation.location)
|
|
267
|
+
annotation.location = this._absoluteLocation(annotation.location);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
_absoluteLocation(location) {
|
|
271
|
+
if (!location)
|
|
272
|
+
return location;
|
|
273
|
+
return {
|
|
274
|
+
...location,
|
|
275
|
+
file: this._absolutePath(location.file)
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
_absolutePath(relativePath) {
|
|
279
|
+
if (relativePath === void 0)
|
|
280
|
+
return;
|
|
281
|
+
return this._options.resolvePath ? this._options.resolvePath(this._rootDir, relativePath) : this._rootDir + "/" + relativePath;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
class TeleSuite {
|
|
285
|
+
constructor(title, type) {
|
|
286
|
+
this._entries = [];
|
|
287
|
+
this._requireFile = "";
|
|
288
|
+
this._parallelMode = "none";
|
|
289
|
+
this.title = title;
|
|
290
|
+
this._type = type;
|
|
291
|
+
}
|
|
292
|
+
get type() {
|
|
293
|
+
return this._type;
|
|
294
|
+
}
|
|
295
|
+
get suites() {
|
|
296
|
+
return this._entries.filter((e) => e.type !== "test");
|
|
297
|
+
}
|
|
298
|
+
get tests() {
|
|
299
|
+
return this._entries.filter((e) => e.type === "test");
|
|
300
|
+
}
|
|
301
|
+
entries() {
|
|
302
|
+
return this._entries;
|
|
303
|
+
}
|
|
304
|
+
allTests() {
|
|
305
|
+
const result = [];
|
|
306
|
+
const visit = (suite) => {
|
|
307
|
+
for (const entry of suite.entries()) {
|
|
308
|
+
if (entry.type === "test")
|
|
309
|
+
result.push(entry);
|
|
310
|
+
else
|
|
311
|
+
visit(entry);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
visit(this);
|
|
315
|
+
return result;
|
|
316
|
+
}
|
|
317
|
+
titlePath() {
|
|
318
|
+
const titlePath = this.parent ? this.parent.titlePath() : [];
|
|
319
|
+
if (this.title || this._type !== "describe")
|
|
320
|
+
titlePath.push(this.title);
|
|
321
|
+
return titlePath;
|
|
322
|
+
}
|
|
323
|
+
project() {
|
|
324
|
+
return this._project ?? this.parent?.project();
|
|
325
|
+
}
|
|
326
|
+
_addTest(test) {
|
|
327
|
+
test.parent = this;
|
|
328
|
+
this._entries.push(test);
|
|
329
|
+
}
|
|
330
|
+
_addSuite(suite) {
|
|
331
|
+
suite.parent = this;
|
|
332
|
+
this._entries.push(suite);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
class TeleTestCase {
|
|
336
|
+
constructor(id, title, location, repeatEachIndex) {
|
|
337
|
+
this.fn = () => {
|
|
338
|
+
};
|
|
339
|
+
this.results = [];
|
|
340
|
+
this.type = "test";
|
|
341
|
+
this.expectedStatus = "passed";
|
|
342
|
+
this.timeout = 0;
|
|
343
|
+
this.annotations = [];
|
|
344
|
+
this.retries = 0;
|
|
345
|
+
this.tags = [];
|
|
346
|
+
this.repeatEachIndex = 0;
|
|
347
|
+
this.id = id;
|
|
348
|
+
this.title = title;
|
|
349
|
+
this.location = location;
|
|
350
|
+
this.repeatEachIndex = repeatEachIndex;
|
|
351
|
+
}
|
|
352
|
+
titlePath() {
|
|
353
|
+
const titlePath = this.parent ? this.parent.titlePath() : [];
|
|
354
|
+
titlePath.push(this.title);
|
|
355
|
+
return titlePath;
|
|
356
|
+
}
|
|
357
|
+
outcome() {
|
|
358
|
+
return computeTestCaseOutcome(this);
|
|
359
|
+
}
|
|
360
|
+
ok() {
|
|
361
|
+
const status = this.outcome();
|
|
362
|
+
return status === "expected" || status === "flaky" || status === "skipped";
|
|
363
|
+
}
|
|
364
|
+
_createTestResult(id) {
|
|
365
|
+
const result = new TeleTestResult(this.results.length, id);
|
|
366
|
+
this.results.push(result);
|
|
367
|
+
return result;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
class TeleTestStep {
|
|
371
|
+
constructor(payload, parentStep, location, result) {
|
|
372
|
+
this.duration = -1;
|
|
373
|
+
this.steps = [];
|
|
374
|
+
this._startTime = 0;
|
|
375
|
+
this.title = payload.title;
|
|
376
|
+
this.category = payload.category;
|
|
377
|
+
this.location = location;
|
|
378
|
+
this.parent = parentStep;
|
|
379
|
+
this._startTime = payload.startTime;
|
|
380
|
+
this._result = result;
|
|
381
|
+
}
|
|
382
|
+
titlePath() {
|
|
383
|
+
const parentPath = this.parent?.titlePath() || [];
|
|
384
|
+
return [...parentPath, this.title];
|
|
385
|
+
}
|
|
386
|
+
get startTime() {
|
|
387
|
+
return new Date(this._startTime);
|
|
388
|
+
}
|
|
389
|
+
set startTime(value) {
|
|
390
|
+
this._startTime = +value;
|
|
391
|
+
}
|
|
392
|
+
get attachments() {
|
|
393
|
+
return this._endPayload?.attachments?.map((index) => this._result.attachments[index]) ?? [];
|
|
394
|
+
}
|
|
395
|
+
get annotations() {
|
|
396
|
+
return this._endPayload?.annotations ?? [];
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
class TeleTestResult {
|
|
400
|
+
constructor(retry, id) {
|
|
401
|
+
this.parallelIndex = -1;
|
|
402
|
+
this.workerIndex = -1;
|
|
403
|
+
this.duration = -1;
|
|
404
|
+
this.stdout = [];
|
|
405
|
+
this.stderr = [];
|
|
406
|
+
this.attachments = [];
|
|
407
|
+
this.annotations = [];
|
|
408
|
+
this.status = "skipped";
|
|
409
|
+
this.steps = [];
|
|
410
|
+
this.errors = [];
|
|
411
|
+
this._stepMap = /* @__PURE__ */ new Map();
|
|
412
|
+
this._startTime = 0;
|
|
413
|
+
this.retry = retry;
|
|
414
|
+
this._id = id;
|
|
415
|
+
}
|
|
416
|
+
setStartTimeNumber(startTime) {
|
|
417
|
+
this._startTime = startTime;
|
|
418
|
+
}
|
|
419
|
+
get startTime() {
|
|
420
|
+
return new Date(this._startTime);
|
|
421
|
+
}
|
|
422
|
+
set startTime(value) {
|
|
423
|
+
this._startTime = +value;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
const baseFullConfig = {
|
|
427
|
+
forbidOnly: false,
|
|
428
|
+
fullyParallel: false,
|
|
429
|
+
globalSetup: null,
|
|
430
|
+
globalTeardown: null,
|
|
431
|
+
globalTimeout: 0,
|
|
432
|
+
grep: /.*/,
|
|
433
|
+
grepInvert: null,
|
|
434
|
+
maxFailures: 0,
|
|
435
|
+
metadata: {},
|
|
436
|
+
preserveOutput: "always",
|
|
437
|
+
projects: [],
|
|
438
|
+
reporter: [[process.env.CI ? "dot" : "list"]],
|
|
439
|
+
reportSlowTests: {
|
|
440
|
+
max: 5,
|
|
441
|
+
threshold: 3e5
|
|
442
|
+
/* 5 minutes */
|
|
443
|
+
},
|
|
444
|
+
configFile: "",
|
|
445
|
+
rootDir: "",
|
|
446
|
+
quiet: false,
|
|
447
|
+
shard: null,
|
|
448
|
+
tags: [],
|
|
449
|
+
updateSnapshots: "missing",
|
|
450
|
+
updateSourceMethod: "patch",
|
|
451
|
+
version: "",
|
|
452
|
+
workers: 0,
|
|
453
|
+
webServer: null
|
|
454
|
+
};
|
|
455
|
+
function serializeRegexPatterns(patterns) {
|
|
456
|
+
if (!Array.isArray(patterns))
|
|
457
|
+
patterns = [patterns];
|
|
458
|
+
return patterns.map((s) => {
|
|
459
|
+
if (typeof s === "string")
|
|
460
|
+
return { s };
|
|
461
|
+
return { r: { source: s.source, flags: s.flags } };
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
function parseRegexPatterns(patterns) {
|
|
465
|
+
return patterns.map((p) => {
|
|
466
|
+
if (p.s !== void 0)
|
|
467
|
+
return p.s;
|
|
468
|
+
return new RegExp(p.r.source, p.r.flags);
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
function computeTestCaseOutcome(test) {
|
|
472
|
+
let skipped = 0;
|
|
473
|
+
let didNotRun = 0;
|
|
474
|
+
let expected = 0;
|
|
475
|
+
let interrupted = 0;
|
|
476
|
+
let unexpected = 0;
|
|
477
|
+
for (const result of test.results) {
|
|
478
|
+
if (result.status === "interrupted") {
|
|
479
|
+
++interrupted;
|
|
480
|
+
} else if (result.status === "skipped" && test.expectedStatus === "skipped") {
|
|
481
|
+
++skipped;
|
|
482
|
+
} else if (result.status === "skipped") {
|
|
483
|
+
++didNotRun;
|
|
484
|
+
} else if (result.status === test.expectedStatus) {
|
|
485
|
+
++expected;
|
|
486
|
+
} else {
|
|
487
|
+
++unexpected;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
if (expected === 0 && unexpected === 0)
|
|
491
|
+
return "skipped";
|
|
492
|
+
if (unexpected === 0)
|
|
493
|
+
return "expected";
|
|
494
|
+
if (expected === 0 && skipped === 0)
|
|
495
|
+
return "unexpected";
|
|
496
|
+
return "flaky";
|
|
497
|
+
}
|
|
498
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
499
|
+
0 && (module.exports = {
|
|
500
|
+
TeleReporterReceiver,
|
|
501
|
+
TeleSuite,
|
|
502
|
+
TeleTestCase,
|
|
503
|
+
TeleTestResult,
|
|
504
|
+
baseFullConfig,
|
|
505
|
+
computeTestCaseOutcome,
|
|
506
|
+
parseRegexPatterns,
|
|
507
|
+
serializeRegexPatterns
|
|
508
|
+
});
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var teleSuiteUpdater_exports = {};
|
|
20
|
+
__export(teleSuiteUpdater_exports, {
|
|
21
|
+
TeleSuiteUpdater: () => TeleSuiteUpdater
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(teleSuiteUpdater_exports);
|
|
24
|
+
var import_teleReceiver = require("./teleReceiver");
|
|
25
|
+
var import_testTree = require("./testTree");
|
|
26
|
+
class TeleSuiteUpdater {
|
|
27
|
+
constructor(options) {
|
|
28
|
+
this.loadErrors = [];
|
|
29
|
+
this.progress = {
|
|
30
|
+
total: 0,
|
|
31
|
+
passed: 0,
|
|
32
|
+
failed: 0,
|
|
33
|
+
skipped: 0
|
|
34
|
+
};
|
|
35
|
+
this._lastRunTestCount = 0;
|
|
36
|
+
this._receiver = new import_teleReceiver.TeleReporterReceiver(this._createReporter(), {
|
|
37
|
+
mergeProjects: true,
|
|
38
|
+
mergeTestCases: true,
|
|
39
|
+
resolvePath: (rootDir, relativePath) => rootDir + options.pathSeparator + relativePath,
|
|
40
|
+
clearPreviousResultsWhenTestBegins: true
|
|
41
|
+
});
|
|
42
|
+
this._options = options;
|
|
43
|
+
}
|
|
44
|
+
_createReporter() {
|
|
45
|
+
return {
|
|
46
|
+
version: () => "v2",
|
|
47
|
+
onConfigure: (c) => {
|
|
48
|
+
this.config = c;
|
|
49
|
+
this._lastRunReceiver = new import_teleReceiver.TeleReporterReceiver({
|
|
50
|
+
version: () => "v2",
|
|
51
|
+
onBegin: (suite) => {
|
|
52
|
+
this._lastRunTestCount = suite.allTests().length;
|
|
53
|
+
this._lastRunReceiver = void 0;
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
mergeProjects: true,
|
|
57
|
+
mergeTestCases: false,
|
|
58
|
+
resolvePath: (rootDir, relativePath) => rootDir + this._options.pathSeparator + relativePath
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
onBegin: (suite) => {
|
|
62
|
+
if (!this.rootSuite)
|
|
63
|
+
this.rootSuite = suite;
|
|
64
|
+
if (this._testResultsSnapshot) {
|
|
65
|
+
for (const test of this.rootSuite.allTests())
|
|
66
|
+
test.results = this._testResultsSnapshot?.get(test.id) || test.results;
|
|
67
|
+
this._testResultsSnapshot = void 0;
|
|
68
|
+
}
|
|
69
|
+
this.progress.total = this._lastRunTestCount;
|
|
70
|
+
this.progress.passed = 0;
|
|
71
|
+
this.progress.failed = 0;
|
|
72
|
+
this.progress.skipped = 0;
|
|
73
|
+
this._options.onUpdate(true);
|
|
74
|
+
},
|
|
75
|
+
onEnd: () => {
|
|
76
|
+
this._options.onUpdate(true);
|
|
77
|
+
},
|
|
78
|
+
onTestBegin: (test, testResult) => {
|
|
79
|
+
testResult[import_testTree.statusEx] = "running";
|
|
80
|
+
this._options.onUpdate();
|
|
81
|
+
},
|
|
82
|
+
onTestEnd: (test, testResult) => {
|
|
83
|
+
if (test.outcome() === "skipped")
|
|
84
|
+
++this.progress.skipped;
|
|
85
|
+
else if (test.outcome() === "unexpected")
|
|
86
|
+
++this.progress.failed;
|
|
87
|
+
else
|
|
88
|
+
++this.progress.passed;
|
|
89
|
+
testResult[import_testTree.statusEx] = testResult.status;
|
|
90
|
+
this._options.onUpdate();
|
|
91
|
+
},
|
|
92
|
+
onError: (error) => this._handleOnError(error),
|
|
93
|
+
printsToStdio: () => false
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
processGlobalReport(report) {
|
|
97
|
+
const receiver = new import_teleReceiver.TeleReporterReceiver({
|
|
98
|
+
version: () => "v2",
|
|
99
|
+
onConfigure: (c) => {
|
|
100
|
+
this.config = c;
|
|
101
|
+
},
|
|
102
|
+
onError: (error) => this._handleOnError(error)
|
|
103
|
+
});
|
|
104
|
+
for (const message of report)
|
|
105
|
+
void receiver.dispatch(message);
|
|
106
|
+
}
|
|
107
|
+
processListReport(report) {
|
|
108
|
+
const tests = this.rootSuite?.allTests() || [];
|
|
109
|
+
this._testResultsSnapshot = new Map(tests.map((test) => [test.id, test.results]));
|
|
110
|
+
this._receiver.reset();
|
|
111
|
+
for (const message of report)
|
|
112
|
+
void this._receiver.dispatch(message);
|
|
113
|
+
}
|
|
114
|
+
processTestReportEvent(message) {
|
|
115
|
+
this._lastRunReceiver?.dispatch(message)?.catch(() => {
|
|
116
|
+
});
|
|
117
|
+
this._receiver.dispatch(message)?.catch(() => {
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
_handleOnError(error) {
|
|
121
|
+
this.loadErrors.push(error);
|
|
122
|
+
this._options.onError?.(error);
|
|
123
|
+
this._options.onUpdate();
|
|
124
|
+
}
|
|
125
|
+
asModel() {
|
|
126
|
+
return {
|
|
127
|
+
rootSuite: this.rootSuite || new import_teleReceiver.TeleSuite("", "root"),
|
|
128
|
+
config: this.config,
|
|
129
|
+
loadErrors: this.loadErrors,
|
|
130
|
+
progress: this.progress
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
135
|
+
0 && (module.exports = {
|
|
136
|
+
TeleSuiteUpdater
|
|
137
|
+
});
|