@zohodesk/testinglibrary 0.0.9-exp.3 → 0.0.9-n20-experimental
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/.babelrc +7 -2
- package/.eslintrc.js +5 -1
- package/.gitlab-ci.yml +191 -0
- package/README.md +151 -1
- package/build/common/data-generator/steps/DataGenerator.spec.js +19 -0
- package/build/common/data-generator/steps/DataGeneratorStepsHelper.js +19 -0
- package/build/common/multi-actor/steps/multiActorHandling.spec.js +26 -0
- package/build/common/searchFake/helpers/rpcRequestHelper.js +41 -0
- package/build/common/searchFake/steps/searchFake.spec.js +26 -0
- package/build/core/dataGenerator/DataGenerator.js +108 -0
- package/build/core/dataGenerator/DataGeneratorError.js +50 -0
- package/build/core/dataGenerator/DataGeneratorHelper.js +49 -0
- package/build/core/jest/preprocessor/jsPreprocessor.js +3 -9
- package/build/core/jest/setup/index.js +1 -7
- package/build/core/playwright/builtInFixtures/actorContext.js +75 -0
- package/build/core/playwright/builtInFixtures/addTags.js +19 -0
- package/build/core/playwright/builtInFixtures/cacheLayer.js +13 -0
- package/build/core/playwright/builtInFixtures/context.js +32 -0
- package/build/core/playwright/builtInFixtures/executionContext.js +17 -0
- package/build/core/playwright/builtInFixtures/i18N.js +41 -0
- package/build/core/playwright/builtInFixtures/index.js +46 -0
- package/build/core/playwright/builtInFixtures/page.js +38 -0
- package/build/core/playwright/builtInFixtures/unauthenticatedPage.js +18 -0
- package/build/core/playwright/clear-caches.js +49 -0
- package/build/core/playwright/codegen.js +4 -4
- package/build/core/playwright/configuration/Configuration.js +25 -0
- package/build/core/playwright/configuration/ConfigurationHelper.js +43 -0
- package/build/core/playwright/configuration/UserArgs.js +12 -0
- package/build/core/playwright/constants/browserTypes.js +12 -0
- package/build/core/playwright/constants/fileMutexConfig.js +9 -0
- package/build/core/playwright/custom-commands.js +1 -2
- package/build/core/playwright/env-initializer.js +28 -6
- package/build/core/playwright/fixtures.js +24 -0
- package/build/core/playwright/helpers/additionalProfiles.js +25 -0
- package/build/core/playwright/helpers/auth/accountLogin.js +21 -0
- package/build/core/playwright/helpers/auth/checkAuthCookies.js +41 -0
- package/build/core/playwright/helpers/auth/getUrlOrigin.js +13 -0
- package/build/core/playwright/helpers/auth/getUsers.js +118 -0
- package/build/core/playwright/helpers/auth/index.js +76 -0
- package/build/core/playwright/helpers/auth/loginDefaultStepsHelper.js +54 -0
- package/build/core/playwright/helpers/auth/loginSteps.js +51 -0
- package/build/core/playwright/helpers/checkAuthDirectory.js +27 -0
- package/build/core/playwright/helpers/configFileNameProvider.js +31 -0
- package/build/core/playwright/helpers/customFixturesHelper.js +58 -0
- package/build/core/playwright/helpers/fileMutex.js +72 -0
- package/build/core/playwright/helpers/getUserFixtures.js +23 -0
- package/build/core/playwright/helpers/mergeObjects.js +13 -0
- package/build/core/playwright/helpers/parseUserArgs.js +10 -0
- package/build/core/playwright/index.js +10 -98
- package/build/core/playwright/readConfigFile.js +66 -24
- package/build/core/playwright/report-generator.js +9 -8
- package/build/core/playwright/runner/Runner.js +22 -0
- package/build/core/playwright/runner/RunnerHelper.js +43 -0
- package/build/core/playwright/runner/RunnerTypes.js +17 -0
- package/build/core/playwright/runner/SpawnRunner.js +113 -0
- package/build/core/playwright/setup/config-creator.js +73 -24
- package/build/core/playwright/setup/config-utils.js +92 -13
- package/build/core/playwright/setup/custom-reporter.js +136 -0
- package/build/core/playwright/setup/qc-custom-reporter.js +291 -0
- package/build/core/playwright/tagProcessor.js +69 -0
- package/build/core/playwright/test-runner.js +55 -43
- package/build/core/playwright/types.js +44 -0
- package/build/core/playwright/validateFeature.js +28 -0
- package/build/decorators.d.ts +1 -1
- package/build/decorators.js +1 -1
- package/build/index.d.ts +76 -3
- package/build/index.js +63 -17
- package/build/lib/cli.js +28 -4
- package/build/lib/post-install.js +19 -11
- package/build/parser/parser.js +0 -1
- package/build/setup-folder-structure/helper.js +37 -0
- package/build/setup-folder-structure/reportEnhancement/addonScript.html +25 -0
- package/build/setup-folder-structure/reportEnhancement/reportAlteration.js +25 -0
- package/build/setup-folder-structure/samples/accountLogin-sample.js +19 -0
- package/build/setup-folder-structure/samples/actors-index.js +2 -0
- package/build/setup-folder-structure/samples/auth-setup-sample.js +10 -67
- package/build/setup-folder-structure/samples/editions-index.js +3 -0
- package/build/setup-folder-structure/samples/free-sample.json +25 -0
- package/build/setup-folder-structure/samples/git-ignore.sample.js +8 -4
- package/build/setup-folder-structure/samples/settings.json +7 -0
- package/build/setup-folder-structure/samples/testSetup-sample.js +14 -0
- package/build/setup-folder-structure/samples/uat-config-sample.js +7 -3
- package/build/setup-folder-structure/setupProject.js +33 -10
- package/build/test/core/playwright/__tests__/tagProcessor.test.js +94 -0
- package/build/test/core/playwright/__tests__/validateFeature.test.js +69 -0
- package/build/test/core/playwright/buildInFixtures/__tests__/executionContext.test.js +27 -0
- package/build/test/core/playwright/configuration/__tests__/Configuration.test.js +53 -0
- package/build/test/core/playwright/helpers/__tests__/additionalProfiles.test.js +45 -0
- package/build/test/core/playwright/helpers/__tests__/configFileNameProvider.test.js +34 -0
- package/build/test/core/playwright/helpers/__tests__/customFixturesHelper.test.js +51 -0
- package/build/test/core/playwright/helpers/__tests__/fileMutex.test.js +79 -0
- package/build/test/core/playwright/helpers/__tests__/getUsers_ListOfActors.test.js +80 -0
- package/build/test/core/playwright/runner/__tests__/RunnerHelper.test.js +16 -0
- package/build/test/core/playwright/runner/__tests__/SpawnRunner.test.js +27 -0
- package/build/utils/cliArgsToObject.js +8 -1
- package/build/utils/commonUtils.js +17 -0
- package/build/utils/fileUtils.js +60 -4
- package/build/utils/logger.js +1 -31
- package/build/utils/rootPath.js +16 -9
- package/build/utils/stepDefinitionsFormatter.js +1 -2
- package/changelog.md +167 -0
- package/jest.config.js +29 -11
- package/npm-shrinkwrap.json +10191 -6116
- package/package.json +32 -25
- package/playwright-mcp-test/node_modules/.package-lock.json +54 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/LICENSE +202 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/README.md +907 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/cli.js +24 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/config.d.ts +174 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/index.d.ts +23 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/index.js +19 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/package.json +52 -0
- package/playwright-mcp-test/node_modules/playwright/LICENSE +202 -0
- package/playwright-mcp-test/node_modules/playwright/NOTICE +5 -0
- package/playwright-mcp-test/node_modules/playwright/README.md +168 -0
- package/playwright-mcp-test/node_modules/playwright/ThirdPartyNotices.txt +6277 -0
- package/playwright-mcp-test/node_modules/playwright/cli.js +19 -0
- package/playwright-mcp-test/node_modules/playwright/index.d.ts +17 -0
- package/playwright-mcp-test/node_modules/playwright/index.js +17 -0
- package/playwright-mcp-test/node_modules/playwright/index.mjs +18 -0
- package/playwright-mcp-test/node_modules/playwright/jsx-runtime.js +42 -0
- package/playwright-mcp-test/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/generateAgents.js +368 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/generator.agent.md +101 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/healer.agent.md +77 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/planner.agent.md +138 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-coverage.prompt.md +31 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-generate.prompt.md +8 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-heal.prompt.md +6 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-plan.prompt.md +9 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/config.js +280 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/configLoader.js +344 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/esmLoaderHost.js +102 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/expectBundle.js +52 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/expectBundleImpl.js +389 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/fixtures.js +302 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/globals.js +58 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/ipc.js +60 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/poolBuilder.js +85 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/process.js +104 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/suiteUtils.js +140 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/test.js +321 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/testLoader.js +101 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/testType.js +298 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/validators.js +68 -0
- package/playwright-mcp-test/node_modules/playwright/lib/fsWatcher.js +67 -0
- package/playwright-mcp-test/node_modules/playwright/lib/index.js +682 -0
- package/playwright-mcp-test/node_modules/playwright/lib/internalsForTest.js +42 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/events.js +77 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/folders.js +30 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/stringInternPool.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/teleReceiver.js +508 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +137 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testServerConnection.js +211 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testServerInterface.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testTree.js +334 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/types.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/loader/loaderMain.js +59 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/expect.js +325 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/matcherHint.js +87 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/matchers.js +366 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toBeTruthy.js +73 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toEqual.js +99 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toHaveURL.js +102 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchSnapshot.js +341 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchText.js +99 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/actions.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +296 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +76 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/codegen.js +66 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/config.js +385 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/context.js +287 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/response.js +228 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/sessionLog.js +160 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tab.js +280 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/common.js +63 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/console.js +44 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +60 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/files.js +58 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/form.js +73 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/install.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +84 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/mouse.js +107 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/navigate.js +62 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/network.js +54 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/pdf.js +59 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +106 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +181 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tabs.js +67 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tool.js +49 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tracing.js +74 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/utils.js +89 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/verify.js +153 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/wait.js +63 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools.js +80 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/watchdog.js +44 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/config.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/cdpRelay.js +351 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +75 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/protocol.js +28 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/index.js +61 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/log.js +35 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/program.js +96 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/bundle.js +81 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/exports.js +32 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/http.js +187 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/mdb.js +206 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/proxyBackend.js +128 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/server.js +189 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/tool.js +51 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/browserBackend.js +98 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/plannerTools.js +46 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/streams.js +39 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testBackend.js +97 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testContext.js +176 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testTools.js +115 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcpBundleImpl.js +41 -0
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/index.js +28 -0
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/webServerPlugin.js +209 -0
- package/playwright-mcp-test/node_modules/playwright/lib/program.js +411 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/base.js +609 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/blob.js +135 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/dot.js +82 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/empty.js +32 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/github.js +128 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/html.js +623 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/internalReporter.js +130 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/json.js +254 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/junit.js +232 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/line.js +113 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/list.js +235 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/listModeReporter.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/markdown.js +144 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/merge.js +541 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/multiplexer.js +104 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/reporterV2.js +102 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/teleEmitter.js +298 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/versions/blobV1.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/dispatcher.js +491 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/failureTracker.js +72 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/lastRun.js +77 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/loadUtils.js +334 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/loaderHost.js +89 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/processHost.js +161 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/projectUtils.js +241 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/rebase.js +189 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/reporters.js +139 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/sigIntWatcher.js +96 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/taskRunner.js +127 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/tasks.js +410 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testGroups.js +117 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testRunner.js +390 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testServer.js +264 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/uiModeReporter.js +30 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/vcs.js +72 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/watchMode.js +395 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/workerHost.js +95 -0
- package/playwright-mcp-test/node_modules/playwright/lib/third_party/pirates.js +62 -0
- package/playwright-mcp-test/node_modules/playwright/lib/third_party/tsconfig-loader.js +103 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/babelBundle.js +43 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/babelBundleImpl.js +461 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/compilationCache.js +272 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/esmLoader.js +104 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/portTransport.js +67 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/transform.js +293 -0
- package/playwright-mcp-test/node_modules/playwright/lib/util.js +403 -0
- package/playwright-mcp-test/node_modules/playwright/lib/utilsBundle.js +43 -0
- package/playwright-mcp-test/node_modules/playwright/lib/utilsBundleImpl.js +100 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/fixtureRunner.js +258 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/testInfo.js +514 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/testTracing.js +344 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/timeoutManager.js +174 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/util.js +31 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/workerMain.js +520 -0
- package/playwright-mcp-test/node_modules/playwright/package.json +72 -0
- package/playwright-mcp-test/node_modules/playwright/test.d.ts +18 -0
- package/playwright-mcp-test/node_modules/playwright/test.js +24 -0
- package/playwright-mcp-test/node_modules/playwright/test.mjs +33 -0
- package/playwright-mcp-test/node_modules/playwright/types/test.d.ts +10185 -0
- package/playwright-mcp-test/node_modules/playwright/types/testReporter.d.ts +821 -0
- package/playwright-mcp-test/node_modules/playwright-core/LICENSE +202 -0
- package/playwright-mcp-test/node_modules/playwright-core/NOTICE +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/README.md +3 -0
- package/playwright-mcp-test/node_modules/playwright-core/ThirdPartyNotices.txt +1161 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +35 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/browsers.json +80 -0
- package/playwright-mcp-test/node_modules/playwright-core/cli.js +18 -0
- package/playwright-mcp-test/node_modules/playwright-core/index.d.ts +17 -0
- package/playwright-mcp-test/node_modules/playwright-core/index.js +32 -0
- package/playwright-mcp-test/node_modules/playwright-core/index.mjs +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/androidServerImpl.js +65 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/browserServerImpl.js +120 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/driver.js +97 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/program.js +634 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/programWithTestStub.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/accessibility.js +49 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/android.js +361 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/api.js +137 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/artifact.js +79 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browser.js +163 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browserContext.js +529 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browserType.js +184 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/cdpSession.js +51 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/channelOwner.js +194 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientHelper.js +64 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientInstrumentation.js +55 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientStackTrace.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clock.js +68 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/connection.js +314 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/consoleMessage.js +54 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/coverage.js +44 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/dialog.js +56 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/download.js +62 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/electron.js +138 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/elementHandle.js +281 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/errors.js +77 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/eventEmitter.js +314 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/events.js +99 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fetch.js +369 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fileChooser.js +46 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fileUtils.js +34 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/frame.js +408 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/harRouter.js +87 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/input.js +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/jsHandle.js +109 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/jsonPipe.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/localUtils.js +60 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/locator.js +369 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/network.js +747 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/page.js +721 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/platform.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/playwright.js +71 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/selectors.js +55 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/stream.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/timeoutSettings.js +79 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/tracing.js +117 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/types.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/video.js +59 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/waiter.js +142 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/webError.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/webSocket.js +93 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/worker.js +63 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/writableStream.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/clockSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/injectedScriptSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/storageScriptSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/utilityScriptSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/webSocketMockSource.js +336 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/inProcessFactory.js +60 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/inprocess.js +3 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/outofprocess.js +76 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/serializers.js +192 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/validator.js +2912 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/remote/playwrightConnection.js +129 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/remote/playwrightServer.js +335 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/accessibility.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/android/android.js +465 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/android/backendAdb.js +177 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/artifact.js +127 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +490 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +153 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +212 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +221 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +130 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiInput.js +146 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiPage.js +554 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiDeserializer.js +98 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +179 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browser.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browserContext.js +695 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browserType.js +328 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/callLog.js +82 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/chromium.js +402 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +95 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crAccessibility.js +263 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crBrowser.js +502 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crConnection.js +202 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crCoverage.js +235 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crDevTools.js +113 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crInput.js +187 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +666 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crPage.js +1069 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crPdf.js +121 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +123 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/protocol.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/videoRecorder.js +113 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/clock.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/csharp.js +327 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/java.js +274 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/javascript.js +270 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/jsonl.js +52 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/language.js +132 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/languages.js +68 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/python.js +279 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/types.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/console.js +53 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/cookieStore.js +206 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/debugController.js +191 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/debugger.js +119 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/deviceDescriptors.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dialog.js +116 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +364 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +371 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +401 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dom.js +806 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/download.js +70 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/electron/electron.js +270 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/electron/loader.js +29 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/errors.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fetch.js +621 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fileChooser.js +43 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fileUploadUtils.js +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffAccessibility.js +238 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +428 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffConnection.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffInput.js +159 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffPage.js +503 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/firefox.js +116 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/protocol.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/formData.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/frameSelectors.js +154 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/frames.js +1455 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/har/harRecorder.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/har/harTracer.js +607 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/harBackend.js +157 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/helper.js +96 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/index.js +58 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/input.js +273 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/instrumentation.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/javascript.js +291 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/launchApp.js +128 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/localUtils.js +214 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/macEditingCommands.js +143 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/network.js +629 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/page.js +867 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/pipeTransport.js +89 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/playwright.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/progress.js +112 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/protocolError.js +52 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/chat.js +161 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderApp.js +387 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/throttledFile.js +57 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder.js +499 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/browserFetcher.js +175 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/dependencies.js +371 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/index.js +1361 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/nativeDeps.js +1280 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +124 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/screenshotter.js +333 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/selectors.js +112 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/socksInterceptor.js +95 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +541 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +602 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/test/inMemorySnapshotter.js +87 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +230 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/transport.js +181 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/types.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/usKeyboardLayout.js +145 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/ascii.js +44 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/comparators.js +139 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/crypto.js +216 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/debug.js +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/debugLogger.js +122 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/env.js +73 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/eventsHelper.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/expectUtils.js +38 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/fileUtils.js +191 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/hostPlatform.js +123 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/httpServer.js +218 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/imageUtils.js +146 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/linuxUtils.js +71 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/network.js +233 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/nodePlatform.js +148 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/pipeTransport.js +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/processLauncher.js +241 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/profiler.js +65 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/socksProxy.js +511 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/spawnAsync.js +41 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/task.js +51 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/userAgent.js +98 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/wsServer.js +121 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/zipFile.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/zones.js +57 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/protocol.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/webkit.js +119 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkAccessibility.js +237 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +339 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkConnection.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkInput.js +181 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +169 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkPage.js +1134 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +104 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wsl/webkit-wsl-transport-client.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wsl/webkit-wsl-transport-server.js +113 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/third_party/pixelmatch.js +255 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +392 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/assert.js +31 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/colors.js +72 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/headers.js +53 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +321 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +155 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/time.js +49 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/types.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +179 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils.js +109 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundle.js +112 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundleImpl/index.js +218 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/htmlReport/index.html +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DX585GyR.js +25 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/index-DjadjNw5.js +193 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/index-Ri0uHF7I.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-Cw-6jrKz.js +25 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BZIhX7gh.js +266 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BEjzWGz-.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.Dk_obRs3.js +2 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.I8N9v4jT.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.html +43 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +21 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +3 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Bai-qGIw.js +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +17 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/zipBundle.js +34 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/zipBundleImpl.js +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/package.json +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/types/protocol.d.ts +23130 -0
- package/playwright-mcp-test/node_modules/playwright-core/types/structs.d.ts +45 -0
- package/playwright-mcp-test/node_modules/playwright-core/types/types.d.ts +22872 -0
- package/playwright-mcp-test/package-lock.json +76 -0
- package/playwright.config.js +0 -50
- package/uat/test-results/.last-run.json +4 -0
- package/zohodesk-testinglibrary-3.2.13.tgz +0 -0
- package/Changelog.md +0 -54
- package/build/bdd-framework/cli/commands/env.js +0 -43
- package/build/bdd-framework/cli/commands/export.js +0 -48
- package/build/bdd-framework/cli/commands/test.js +0 -59
- package/build/bdd-framework/cli/index.js +0 -11
- package/build/bdd-framework/cli/options.js +0 -20
- package/build/bdd-framework/cli/worker.js +0 -13
- package/build/bdd-framework/config/dir.js +0 -27
- package/build/bdd-framework/config/env.js +0 -49
- package/build/bdd-framework/config/index.js +0 -91
- package/build/bdd-framework/cucumber/buildStepDefinition.js +0 -43
- package/build/bdd-framework/cucumber/gherkin.d.js +0 -5
- package/build/bdd-framework/cucumber/gherkin.d.ts +0 -45
- package/build/bdd-framework/cucumber/loadConfig.js +0 -17
- package/build/bdd-framework/cucumber/loadFeatures.js +0 -39
- package/build/bdd-framework/cucumber/loadSnippetBuilder.js +0 -20
- package/build/bdd-framework/cucumber/loadSources.js +0 -57
- package/build/bdd-framework/cucumber/loadSteps.js +0 -35
- package/build/bdd-framework/decorators.js +0 -22
- package/build/bdd-framework/gen/formatter.js +0 -88
- package/build/bdd-framework/gen/i18n.js +0 -35
- package/build/bdd-framework/gen/index.js +0 -160
- package/build/bdd-framework/gen/poms.js +0 -46
- package/build/bdd-framework/gen/testFile.js +0 -356
- package/build/bdd-framework/gen/testNode.js +0 -48
- package/build/bdd-framework/gen/testPoms.js +0 -123
- package/build/bdd-framework/index.js +0 -45
- package/build/bdd-framework/playwright/fixtureParameterNames.js +0 -77
- package/build/bdd-framework/playwright/getLocationInFile.js +0 -46
- package/build/bdd-framework/playwright/loadConfig.js +0 -42
- package/build/bdd-framework/playwright/testTypeImpl.js +0 -41
- package/build/bdd-framework/playwright/transform.js +0 -80
- package/build/bdd-framework/playwright/types.js +0 -5
- package/build/bdd-framework/playwright/utils.js +0 -34
- package/build/bdd-framework/run/bddFixtures.js +0 -108
- package/build/bdd-framework/run/bddWorld.js +0 -87
- package/build/bdd-framework/snippets/index.js +0 -131
- package/build/bdd-framework/snippets/snippetSyntax.js +0 -41
- package/build/bdd-framework/snippets/snippetSyntaxDecorators.js +0 -26
- package/build/bdd-framework/snippets/snippetSyntaxTs.js +0 -18
- package/build/bdd-framework/stepDefinitions/createBdd.js +0 -49
- package/build/bdd-framework/stepDefinitions/createDecorators.js +0 -109
- package/build/bdd-framework/stepDefinitions/decorators/poms.js +0 -50
- package/build/bdd-framework/stepDefinitions/decorators/steps.js +0 -94
- package/build/bdd-framework/stepDefinitions/defineStep.js +0 -61
- package/build/bdd-framework/stepDefinitions/stepConfig.js +0 -24
- package/build/bdd-framework/utils/index.js +0 -50
- package/build/bdd-framework/utils/jsStringWrap.js +0 -44
- package/build/bdd-framework/utils/logger.js +0 -29
- package/build/setup-folder-structure/samples/authUsers-sample.json +0 -9
- package/build/setup-folder-structure/samples/env-config-sample.json +0 -21
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.TestFile = void 0;
|
|
8
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
9
|
-
var _path = _interopRequireDefault(require("path"));
|
|
10
|
-
var _formatter = require("./formatter");
|
|
11
|
-
var _i18n = require("./i18n");
|
|
12
|
-
var _loadSteps = require("../cucumber/loadSteps");
|
|
13
|
-
var _createBdd = require("../stepDefinitions/createBdd");
|
|
14
|
-
var _index = require("@cucumber/cucumber/lib/formatter/helpers/index");
|
|
15
|
-
var _utils = require("../utils");
|
|
16
|
-
var _testPoms = require("./testPoms");
|
|
17
|
-
var _testNode = require("./testNode");
|
|
18
|
-
var _stepConfig = require("../stepDefinitions/stepConfig");
|
|
19
|
-
/**
|
|
20
|
-
* Generate test code.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
class TestFile {
|
|
24
|
-
options;
|
|
25
|
-
lines = [];
|
|
26
|
-
i18nKeywordsMap;
|
|
27
|
-
formatter;
|
|
28
|
-
testNodes = [];
|
|
29
|
-
hasCustomTest = false;
|
|
30
|
-
undefinedSteps = [];
|
|
31
|
-
constructor(options) {
|
|
32
|
-
this.options = options;
|
|
33
|
-
this.formatter = new _formatter.Formatter(options.config);
|
|
34
|
-
}
|
|
35
|
-
get sourceFile() {
|
|
36
|
-
const {
|
|
37
|
-
uri
|
|
38
|
-
} = this.options.doc;
|
|
39
|
-
if (!uri) throw new Error(`Document without uri`);
|
|
40
|
-
return uri;
|
|
41
|
-
}
|
|
42
|
-
get content() {
|
|
43
|
-
return this.lines.join('\n');
|
|
44
|
-
}
|
|
45
|
-
get language() {
|
|
46
|
-
var _this$options$doc$fea;
|
|
47
|
-
return ((_this$options$doc$fea = this.options.doc.feature) === null || _this$options$doc$fea === void 0 ? void 0 : _this$options$doc$fea.language) || 'en';
|
|
48
|
-
}
|
|
49
|
-
get config() {
|
|
50
|
-
return this.options.config;
|
|
51
|
-
}
|
|
52
|
-
get outputPath() {
|
|
53
|
-
return this.options.outputPath;
|
|
54
|
-
}
|
|
55
|
-
build() {
|
|
56
|
-
this.loadI18nKeywords();
|
|
57
|
-
this.lines = [...this.getFileHeader(), ...this.getRootSuite(), ...this.getFileFixtures()];
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
save() {
|
|
61
|
-
const dir = _path.default.dirname(this.outputPath);
|
|
62
|
-
if (!_fs.default.existsSync(dir)) _fs.default.mkdirSync(dir, {
|
|
63
|
-
recursive: true
|
|
64
|
-
});
|
|
65
|
-
_fs.default.writeFileSync(this.outputPath, this.content);
|
|
66
|
-
}
|
|
67
|
-
getFileHeader() {
|
|
68
|
-
const importTestFrom = this.getRelativeImportTestFrom();
|
|
69
|
-
return this.formatter.fileHeader(this.sourceFile, importTestFrom);
|
|
70
|
-
}
|
|
71
|
-
loadI18nKeywords() {
|
|
72
|
-
if (this.language !== 'en') {
|
|
73
|
-
this.i18nKeywordsMap = (0, _i18n.getKeywordsMap)(this.language);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
getRelativeImportTestFrom() {
|
|
77
|
-
const {
|
|
78
|
-
importTestFrom
|
|
79
|
-
} = this.config;
|
|
80
|
-
if (!importTestFrom) return;
|
|
81
|
-
const {
|
|
82
|
-
file,
|
|
83
|
-
varName
|
|
84
|
-
} = importTestFrom;
|
|
85
|
-
const dir = _path.default.dirname(this.outputPath);
|
|
86
|
-
return {
|
|
87
|
-
file: _path.default.relative(dir, file),
|
|
88
|
-
varName
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
getFileFixtures() {
|
|
92
|
-
return this.formatter.useFixtures([...this.formatter.testFixture(), ...this.formatter.tagsFixture(this.testNodes)]);
|
|
93
|
-
}
|
|
94
|
-
getRootSuite() {
|
|
95
|
-
const {
|
|
96
|
-
feature
|
|
97
|
-
} = this.options.doc;
|
|
98
|
-
if (!feature) throw new Error(`Document without feature.`);
|
|
99
|
-
return this.getSuite(feature);
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Generate test.describe suite for root Feature or Rule
|
|
103
|
-
*/
|
|
104
|
-
getSuite(feature, parent) {
|
|
105
|
-
const node = new _testNode.TestNode(feature, parent);
|
|
106
|
-
const lines = [];
|
|
107
|
-
// const { backgrounds, rules, scenarios } =
|
|
108
|
-
// bgFixtures, bgTags - used as fixture hints for decorator steps
|
|
109
|
-
feature.children.forEach(child => lines.push(...this.getSuiteChild(child, node)));
|
|
110
|
-
return this.formatter.suite(node, lines);
|
|
111
|
-
}
|
|
112
|
-
getSuiteChild(child, parent) {
|
|
113
|
-
if ('rule' in child && child.rule) return this.getSuite(child.rule, parent);
|
|
114
|
-
if (child.background) return this.getBeforeEach(child.background, parent);
|
|
115
|
-
if (child.scenario) return this.getScenarioLines(child.scenario, parent);
|
|
116
|
-
throw new Error(`Empty child: ${JSON.stringify(child)}`);
|
|
117
|
-
}
|
|
118
|
-
getScenarioLines(scenario, parent) {
|
|
119
|
-
return isOutline(scenario) ? this.getOutlineSuite(scenario, parent) : this.getTest(scenario, parent);
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Generate test.beforeEach for Background
|
|
123
|
-
*/
|
|
124
|
-
getBeforeEach(bg, parent) {
|
|
125
|
-
const node = new _testNode.TestNode({
|
|
126
|
-
name: 'background',
|
|
127
|
-
tags: []
|
|
128
|
-
}, parent);
|
|
129
|
-
const {
|
|
130
|
-
fixtures,
|
|
131
|
-
lines
|
|
132
|
-
} = this.getSteps(bg, node.tags);
|
|
133
|
-
return this.formatter.beforeEach(fixtures, lines);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Generate test.describe suite for Scenario Outline
|
|
137
|
-
*/
|
|
138
|
-
getOutlineSuite(scenario, parent) {
|
|
139
|
-
const node = new _testNode.TestNode(scenario, parent);
|
|
140
|
-
const lines = [];
|
|
141
|
-
let exampleIndex = 0;
|
|
142
|
-
scenario.examples.forEach(examples => {
|
|
143
|
-
const titleFormat = this.getExamplesTitleFormat(examples);
|
|
144
|
-
examples.tableBody.forEach(exampleRow => {
|
|
145
|
-
const testTitle = this.getOutlineTestTitle(titleFormat, examples, exampleRow, ++exampleIndex);
|
|
146
|
-
const testLines = this.getOutlineTest(scenario, examples, exampleRow, testTitle, node);
|
|
147
|
-
lines.push(...testLines);
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
return this.formatter.suite(node, lines);
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Generate test from Examples row of Scenario Outline
|
|
154
|
-
*/
|
|
155
|
-
// eslint-disable-next-line max-params
|
|
156
|
-
getOutlineTest(scenario, examples, exampleRow, title, parent) {
|
|
157
|
-
const node = new _testNode.TestNode({
|
|
158
|
-
name: title,
|
|
159
|
-
tags: examples.tags
|
|
160
|
-
}, parent);
|
|
161
|
-
if (this.skipByTagsExpression(node)) return [];
|
|
162
|
-
this.testNodes.push(node);
|
|
163
|
-
const {
|
|
164
|
-
fixtures,
|
|
165
|
-
lines
|
|
166
|
-
} = this.getSteps(scenario, node.tags, exampleRow.id);
|
|
167
|
-
return this.formatter.test(node, fixtures, lines);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Generate test from Scenario
|
|
171
|
-
*/
|
|
172
|
-
getTest(scenario, parent) {
|
|
173
|
-
const node = new _testNode.TestNode(scenario, parent);
|
|
174
|
-
if (this.skipByTagsExpression(node)) return [];
|
|
175
|
-
this.testNodes.push(node);
|
|
176
|
-
const {
|
|
177
|
-
fixtures,
|
|
178
|
-
lines
|
|
179
|
-
} = this.getSteps(scenario, node.tags);
|
|
180
|
-
return this.formatter.test(node, fixtures, lines);
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Generate test steps
|
|
184
|
-
*/
|
|
185
|
-
getSteps(scenario, tags, outlineExampleRowId) {
|
|
186
|
-
const testFixtureNames = new Set();
|
|
187
|
-
const testPoms = new _testPoms.TestPoms(scenario.name || 'Background');
|
|
188
|
-
const decoratorSteps = [];
|
|
189
|
-
let previousKeywordType = undefined;
|
|
190
|
-
const lines = scenario.steps.map((step, index) => {
|
|
191
|
-
const {
|
|
192
|
-
keyword,
|
|
193
|
-
keywordType,
|
|
194
|
-
fixtureNames: stepFixtureNames,
|
|
195
|
-
line,
|
|
196
|
-
pickleStep,
|
|
197
|
-
stepConfig
|
|
198
|
-
} = this.getStep(step, previousKeywordType, outlineExampleRowId);
|
|
199
|
-
previousKeywordType = keywordType;
|
|
200
|
-
testFixtureNames.add(keyword);
|
|
201
|
-
stepFixtureNames.forEach(fixtureName => testFixtureNames.add(fixtureName));
|
|
202
|
-
if ((0, _stepConfig.isDecorator)(stepConfig)) {
|
|
203
|
-
testPoms.addByStep(stepConfig.pomNode);
|
|
204
|
-
decoratorSteps.push({
|
|
205
|
-
index,
|
|
206
|
-
keyword,
|
|
207
|
-
pickleStep,
|
|
208
|
-
pomNode: stepConfig.pomNode
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
return line;
|
|
212
|
-
});
|
|
213
|
-
// decorator steps handled in second pass to guess fixtures
|
|
214
|
-
if (decoratorSteps.length) {
|
|
215
|
-
testFixtureNames.forEach(fixtureName => testPoms.addByFixtureName(fixtureName));
|
|
216
|
-
tags === null || tags === void 0 || tags.forEach(tag => testPoms.addByTag(tag));
|
|
217
|
-
testPoms.resolveFixtures();
|
|
218
|
-
decoratorSteps.forEach(step => {
|
|
219
|
-
const {
|
|
220
|
-
line,
|
|
221
|
-
fixtureName
|
|
222
|
-
} = this.getDecoratorStep(step, testPoms);
|
|
223
|
-
lines[step.index] = line;
|
|
224
|
-
testFixtureNames.add(fixtureName);
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
return {
|
|
228
|
-
fixtures: testFixtureNames,
|
|
229
|
-
lines
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Generate step for Given, When, Then
|
|
234
|
-
*/
|
|
235
|
-
// eslint-disable-next-line max-statements, complexity
|
|
236
|
-
getStep(step, previousKeywordType, outlineExampleRowId) {
|
|
237
|
-
const pickleStep = this.getPickleStep(step, outlineExampleRowId);
|
|
238
|
-
const stepDefinition = (0, _loadSteps.findStepDefinition)(this.options.supportCodeLibrary, pickleStep.text, this.sourceFile);
|
|
239
|
-
const keywordType = (0, _index.getStepKeywordType)({
|
|
240
|
-
keyword: step.keyword,
|
|
241
|
-
language: this.language,
|
|
242
|
-
previousKeywordType
|
|
243
|
-
});
|
|
244
|
-
let keyword = this.getStepKeyword(step);
|
|
245
|
-
if (!stepDefinition) {
|
|
246
|
-
this.undefinedSteps.push({
|
|
247
|
-
keywordType,
|
|
248
|
-
step,
|
|
249
|
-
pickleStep
|
|
250
|
-
});
|
|
251
|
-
return this.getMissingStep(keyword, keywordType, pickleStep);
|
|
252
|
-
}
|
|
253
|
-
// for cucumber-style stepConfig is undefined
|
|
254
|
-
const stepConfig = (0, _stepConfig.getStepConfig)(stepDefinition);
|
|
255
|
-
if (stepConfig !== null && stepConfig !== void 0 && stepConfig.hasCustomTest) this.hasCustomTest = true;
|
|
256
|
-
// for cucumber-style transform Given/When/Then -> Given_/When_/Then_
|
|
257
|
-
// to use own bddWorld (containing PW built-in fixtures)
|
|
258
|
-
if (!(0, _stepConfig.isPlaywrightStyle)(stepConfig)) keyword = `${keyword}_`;
|
|
259
|
-
// for decorator steps fixtureNames are defined later in second pass
|
|
260
|
-
const fixtureNames = (0, _stepConfig.isDecorator)(stepConfig) ? [] : (0, _createBdd.extractFixtureNames)(stepConfig === null || stepConfig === void 0 ? void 0 : stepConfig.fn);
|
|
261
|
-
const line = (0, _stepConfig.isDecorator)(stepConfig) ? '' : this.formatter.step(keyword, pickleStep.text, pickleStep.argument, fixtureNames);
|
|
262
|
-
return {
|
|
263
|
-
keyword,
|
|
264
|
-
keywordType,
|
|
265
|
-
fixtureNames,
|
|
266
|
-
line,
|
|
267
|
-
pickleStep,
|
|
268
|
-
stepConfig
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
getMissingStep(keyword, keywordType, pickleStep) {
|
|
272
|
-
return {
|
|
273
|
-
keyword,
|
|
274
|
-
keywordType,
|
|
275
|
-
fixtureNames: [],
|
|
276
|
-
line: this.formatter.missingStep(keyword, pickleStep.text),
|
|
277
|
-
pickleStep,
|
|
278
|
-
stepConfig: undefined
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
getPickleStep(step, outlineExampleRowId) {
|
|
282
|
-
for (const pickle of this.options.pickles) {
|
|
283
|
-
const pickleStep = pickle.steps.find(({
|
|
284
|
-
astNodeIds
|
|
285
|
-
}) => {
|
|
286
|
-
const hasStepId = astNodeIds.includes(step.id);
|
|
287
|
-
const hasRowId = !outlineExampleRowId || astNodeIds.includes(outlineExampleRowId);
|
|
288
|
-
return hasStepId && hasRowId;
|
|
289
|
-
});
|
|
290
|
-
if (pickleStep) return pickleStep;
|
|
291
|
-
}
|
|
292
|
-
throw new Error(`Pickle step not found for step: ${step.text}`);
|
|
293
|
-
}
|
|
294
|
-
getStepKeyword(step) {
|
|
295
|
-
const origKeyword = step.keyword.trim();
|
|
296
|
-
let enKeyword;
|
|
297
|
-
if (origKeyword === '*') {
|
|
298
|
-
enKeyword = 'And';
|
|
299
|
-
} else {
|
|
300
|
-
enKeyword = this.i18nKeywordsMap ? this.i18nKeywordsMap.get(origKeyword) : origKeyword;
|
|
301
|
-
}
|
|
302
|
-
if (!enKeyword) throw new Error(`Keyword not found: ${origKeyword}`);
|
|
303
|
-
return enKeyword;
|
|
304
|
-
}
|
|
305
|
-
getDecoratorStep(step, testPoms) {
|
|
306
|
-
const {
|
|
307
|
-
keyword,
|
|
308
|
-
pickleStep,
|
|
309
|
-
pomNode
|
|
310
|
-
} = step;
|
|
311
|
-
const resolvedFixtures = testPoms.getResolvedFixtures(pomNode);
|
|
312
|
-
if (resolvedFixtures.length !== 1) {
|
|
313
|
-
const suggestedTags = resolvedFixtures.filter(f => !f.byTag).map(f => (0, _testPoms.buildFixtureTag)(f.name)).join(', ');
|
|
314
|
-
const suggestedTagsStr = suggestedTags.length ? ` or set one of the following tags: ${suggestedTags}` : '.';
|
|
315
|
-
(0, _utils.exitWithMessage)(`Can't guess fixture for decorator step "${pickleStep.text}" in file: ${this.sourceFile}.`, `Please refactor your Page Object classes${suggestedTagsStr}`);
|
|
316
|
-
}
|
|
317
|
-
const fixtureName = resolvedFixtures[0].name;
|
|
318
|
-
return {
|
|
319
|
-
fixtureName,
|
|
320
|
-
line: this.formatter.step(keyword, pickleStep.text, pickleStep.argument, [fixtureName])
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
getOutlineTestTitle(titleFormat, examples, exampleRow, exampleIndex) {
|
|
324
|
-
const params = {
|
|
325
|
-
_index_: exampleIndex
|
|
326
|
-
};
|
|
327
|
-
exampleRow.cells.forEach((cell, index) => {
|
|
328
|
-
var _examples$tableHeader;
|
|
329
|
-
const colName = (_examples$tableHeader = examples.tableHeader) === null || _examples$tableHeader === void 0 || (_examples$tableHeader = _examples$tableHeader.cells[index]) === null || _examples$tableHeader === void 0 ? void 0 : _examples$tableHeader.value;
|
|
330
|
-
if (colName) params[colName] = cell.value;
|
|
331
|
-
});
|
|
332
|
-
return (0, _utils.template)(titleFormat, params);
|
|
333
|
-
}
|
|
334
|
-
getExamplesTitleFormat(examples) {
|
|
335
|
-
var _comment$text;
|
|
336
|
-
const {
|
|
337
|
-
line
|
|
338
|
-
} = examples.location;
|
|
339
|
-
const titleFormatCommentLine = line - 1;
|
|
340
|
-
const comment = this.options.doc.comments.find(c => {
|
|
341
|
-
return c.location.line === titleFormatCommentLine;
|
|
342
|
-
});
|
|
343
|
-
const commentText = comment === null || comment === void 0 || (_comment$text = comment.text) === null || _comment$text === void 0 ? void 0 : _comment$text.trim();
|
|
344
|
-
const prefix = '# title-format:';
|
|
345
|
-
return commentText !== null && commentText !== void 0 && commentText.startsWith(prefix) ? commentText.replace(prefix, '').trim() : this.config.examplesTitleFormat;
|
|
346
|
-
}
|
|
347
|
-
skipByTagsExpression(node) {
|
|
348
|
-
var _this$options$tagsExp;
|
|
349
|
-
// see: https://github.com/cucumber/tag-expressions/tree/main/javascript
|
|
350
|
-
return ((_this$options$tagsExp = this.options.tagsExpression) === null || _this$options$tagsExp === void 0 ? void 0 : _this$options$tagsExp.evaluate(node.tags)) === false;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
exports.TestFile = TestFile;
|
|
354
|
-
function isOutline(scenario) {
|
|
355
|
-
return scenario.keyword === 'Scenario Outline' || scenario.keyword === 'Scenario Template';
|
|
356
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TestNode = void 0;
|
|
7
|
-
var _utils = require("../utils");
|
|
8
|
-
/**
|
|
9
|
-
* Universal TestNode class of parent-child relations in test file structure.
|
|
10
|
-
* Holds tags and titles path.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const SPECIAL_TAGS = ['@only', '@skip', '@fixme'];
|
|
14
|
-
class TestNode {
|
|
15
|
-
title;
|
|
16
|
-
titlePath;
|
|
17
|
-
ownTags = [];
|
|
18
|
-
tags = [];
|
|
19
|
-
flags = {};
|
|
20
|
-
constructor(gherkinNode, parent) {
|
|
21
|
-
this.initOwnTags(gherkinNode);
|
|
22
|
-
this.tags = (0, _utils.removeDuplicates)(((parent === null || parent === void 0 ? void 0 : parent.tags) || []).concat(this.ownTags));
|
|
23
|
-
this.title = gherkinNode.name;
|
|
24
|
-
this.titlePath = ((parent === null || parent === void 0 ? void 0 : parent.titlePath) || []).concat([this.title]);
|
|
25
|
-
}
|
|
26
|
-
initOwnTags(gherkinNode) {
|
|
27
|
-
const tagNames = (0, _utils.removeDuplicates)(getTagNames(gherkinNode.tags));
|
|
28
|
-
tagNames.forEach(tag => {
|
|
29
|
-
if (isSpecialTag(tag)) {
|
|
30
|
-
this.setFlag(tag);
|
|
31
|
-
} else {
|
|
32
|
-
this.ownTags.push(tag);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
setFlag(tag) {
|
|
37
|
-
if (tag === '@only') this.flags.only = true;
|
|
38
|
-
if (tag === '@skip') this.flags.skip = true;
|
|
39
|
-
if (tag === '@fixme') this.flags.fixme = true;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.TestNode = TestNode;
|
|
43
|
-
function getTagNames(tags) {
|
|
44
|
-
return tags.map(tag => tag.name);
|
|
45
|
-
}
|
|
46
|
-
function isSpecialTag(tag) {
|
|
47
|
-
return SPECIAL_TAGS.includes(tag);
|
|
48
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TestPoms = void 0;
|
|
7
|
-
exports.buildFixtureTag = buildFixtureTag;
|
|
8
|
-
var _poms = require("../stepDefinitions/decorators/poms");
|
|
9
|
-
var _utils = require("../utils");
|
|
10
|
-
/**
|
|
11
|
-
* Track PomNodes used in the particular test.
|
|
12
|
-
* To select correct fixture for decorator steps.
|
|
13
|
-
*
|
|
14
|
-
* Idea: try to use the deepest child fixture for parent steps.
|
|
15
|
-
*
|
|
16
|
-
* Example inheritance tree:
|
|
17
|
-
* A
|
|
18
|
-
* / \
|
|
19
|
-
* B C
|
|
20
|
-
* / \ \
|
|
21
|
-
* D E F
|
|
22
|
-
*
|
|
23
|
-
* If test uses steps from classes A and D:
|
|
24
|
-
* -> resolved fixture will be D, even for steps from A.
|
|
25
|
-
*
|
|
26
|
-
* If test uses steps from classes A, D and C:
|
|
27
|
-
* -> error, b/c A has 2 possible fixtures.
|
|
28
|
-
*
|
|
29
|
-
* If test uses steps from classes A and C, but @fixture tag is D:
|
|
30
|
-
* -> error, b/c A has 2 possible fixtures.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
const FIXTURE_TAG_PREFIX = '@fixture:';
|
|
34
|
-
class TestPoms {
|
|
35
|
-
title;
|
|
36
|
-
// map of poms used in test
|
|
37
|
-
usedPoms = new Map();
|
|
38
|
-
constructor(title) {
|
|
39
|
-
this.title = title;
|
|
40
|
-
}
|
|
41
|
-
addByStep(pomNode) {
|
|
42
|
-
this.addUsedPom(pomNode, {
|
|
43
|
-
byTag: false
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
addByFixtureName(fixtureName) {
|
|
47
|
-
const pomNode = (0, _poms.getPomNodeByFixtureName)(fixtureName);
|
|
48
|
-
this.addUsedPom(pomNode, {
|
|
49
|
-
byTag: false
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
addByTag(tag) {
|
|
53
|
-
const fixtureName = extractFixtureName(tag);
|
|
54
|
-
if (fixtureName) {
|
|
55
|
-
const pomNode = (0, _poms.getPomNodeByFixtureName)(fixtureName);
|
|
56
|
-
this.addUsedPom(pomNode, {
|
|
57
|
-
byTag: true
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Resolve all used pomNodes to fixtures.
|
|
63
|
-
* This is needed to handle @fixture: tagged pomNodes
|
|
64
|
-
* that does not have steps in the test, but should be considered.
|
|
65
|
-
*/
|
|
66
|
-
resolveFixtures() {
|
|
67
|
-
this.usedPoms.forEach((_, pomNode) => {
|
|
68
|
-
this.getResolvedFixtures(pomNode);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Returns fixtures suitable for particular pomNode (actually for step)
|
|
73
|
-
*/
|
|
74
|
-
getResolvedFixtures(pomNode) {
|
|
75
|
-
const usedPom = this.usedPoms.get(pomNode);
|
|
76
|
-
if (usedPom !== null && usedPom !== void 0 && usedPom.fixtures) return usedPom.fixtures;
|
|
77
|
-
// Recursively resolve children fixtures, used in test.
|
|
78
|
-
let childFixtures = [...pomNode.children].map(child => this.getResolvedFixtures(child)).flat();
|
|
79
|
-
if (!usedPom) return childFixtures;
|
|
80
|
-
if (childFixtures.length) {
|
|
81
|
-
this.verifyChildFixtures(pomNode, usedPom, childFixtures);
|
|
82
|
-
usedPom.fixtures = childFixtures;
|
|
83
|
-
} else {
|
|
84
|
-
usedPom.fixtures = [{
|
|
85
|
-
name: pomNode.fixtureName,
|
|
86
|
-
byTag: usedPom.byTag
|
|
87
|
-
}];
|
|
88
|
-
}
|
|
89
|
-
return usedPom.fixtures;
|
|
90
|
-
}
|
|
91
|
-
addUsedPom(pomNode, {
|
|
92
|
-
byTag
|
|
93
|
-
}) {
|
|
94
|
-
if (!pomNode) return;
|
|
95
|
-
const usedPom = this.usedPoms.get(pomNode);
|
|
96
|
-
if (usedPom) {
|
|
97
|
-
if (byTag && !usedPom.byTag) usedPom.byTag = true;
|
|
98
|
-
} else {
|
|
99
|
-
this.usedPoms.set(pomNode, {
|
|
100
|
-
byTag
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* For scenarios with @fixture:xxx tags verify that there are no steps from fixtures,
|
|
106
|
-
* deeper than xxx.
|
|
107
|
-
* @fixture:xxx tag provides maximum fixture that can be used in the scenario.
|
|
108
|
-
*/
|
|
109
|
-
verifyChildFixtures(pomNode, usedPom, childFixtures) {
|
|
110
|
-
if (!usedPom.byTag) return;
|
|
111
|
-
const childFixturesBySteps = childFixtures.filter(f => !f.byTag);
|
|
112
|
-
if (childFixturesBySteps.length) {
|
|
113
|
-
(0, _utils.exitWithMessage)(`Scenario "${this.title}" contains ${childFixturesBySteps.length} step(s)`, `not compatible with required fixture "${pomNode.fixtureName}"`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.TestPoms = TestPoms;
|
|
118
|
-
function extractFixtureName(tag) {
|
|
119
|
-
return tag.startsWith(FIXTURE_TAG_PREFIX) ? tag.replace(FIXTURE_TAG_PREFIX, '') : '';
|
|
120
|
-
}
|
|
121
|
-
function buildFixtureTag(fixtureName) {
|
|
122
|
-
return `${FIXTURE_TAG_PREFIX}${fixtureName}`;
|
|
123
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BDDInputConfig", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _config.BDDInputConfig;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "BddWorld", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _bddWorld.BddWorld;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "BddWorldOptions", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _bddWorld.BddWorldOptions;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "createBdd", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _createBdd.createBdd;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "defineBddConfig", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _config.defineBddConfig;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "test", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _bddFixtures.test;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var _config = require("./config");
|
|
43
|
-
var _createBdd = require("./stepDefinitions/createBdd");
|
|
44
|
-
var _bddFixtures = require("./run/bddFixtures");
|
|
45
|
-
var _bddWorld = require("./run/bddWorld");
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.fixtureParameterNames = fixtureParameterNames;
|
|
7
|
-
/**
|
|
8
|
-
* Extracted from playwright.
|
|
9
|
-
* https://github.com/microsoft/playwright/blob/main/packages/playwright-test/src/common/fixtures.ts#L226
|
|
10
|
-
*/
|
|
11
|
-
/* eslint-disable max-statements, complexity, max-len, max-depth */
|
|
12
|
-
const signatureSymbol = Symbol('signature');
|
|
13
|
-
function fixtureParameterNames(fn) {
|
|
14
|
-
if (typeof fn !== 'function') return [];
|
|
15
|
-
if (!fn[signatureSymbol]) fn[signatureSymbol] = innerFixtureParameterNames(fn);
|
|
16
|
-
return fn[signatureSymbol];
|
|
17
|
-
}
|
|
18
|
-
function innerFixtureParameterNames(fn) {
|
|
19
|
-
const text = filterOutComments(fn.toString());
|
|
20
|
-
const match = text.match(/(?:async)?(?:\s+function)?[^(]*\(([^)]*)/);
|
|
21
|
-
if (!match) return [];
|
|
22
|
-
const trimmedParams = match[1].trim();
|
|
23
|
-
if (!trimmedParams) return [];
|
|
24
|
-
const [firstParam] = splitByComma(trimmedParams);
|
|
25
|
-
if (firstParam[0] !== '{' || firstParam[firstParam.length - 1] !== '}') {
|
|
26
|
-
throw new Error('First argument must use the object destructuring pattern: ' + firstParam + ' ' + fn.toString());
|
|
27
|
-
}
|
|
28
|
-
const props = splitByComma(firstParam.substring(1, firstParam.length - 1)).map(prop => {
|
|
29
|
-
const colon = prop.indexOf(':');
|
|
30
|
-
return colon === -1 ? prop.trim() : prop.substring(0, colon).trim();
|
|
31
|
-
});
|
|
32
|
-
const restProperty = props.find(prop => prop.startsWith('...'));
|
|
33
|
-
if (restProperty) {
|
|
34
|
-
throw new Error(`Rest property "${restProperty}" is not supported. List all used fixtures explicitly, separated by comma. ${fn.toString()}`);
|
|
35
|
-
}
|
|
36
|
-
return props;
|
|
37
|
-
}
|
|
38
|
-
function filterOutComments(s) {
|
|
39
|
-
const result = [];
|
|
40
|
-
let commentState = 'none';
|
|
41
|
-
for (let i = 0; i < s.length; ++i) {
|
|
42
|
-
if (commentState === 'singleline') {
|
|
43
|
-
if (s[i] === '\n') commentState = 'none';
|
|
44
|
-
} else if (commentState === 'multiline') {
|
|
45
|
-
if (s[i - 1] === '*' && s[i] === '/') commentState = 'none';
|
|
46
|
-
} else if (commentState === 'none') {
|
|
47
|
-
if (s[i] === '/' && s[i + 1] === '/') {
|
|
48
|
-
commentState = 'singleline';
|
|
49
|
-
} else if (s[i] === '/' && s[i + 1] === '*') {
|
|
50
|
-
commentState = 'multiline';
|
|
51
|
-
i += 2;
|
|
52
|
-
} else {
|
|
53
|
-
result.push(s[i]);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return result.join('');
|
|
58
|
-
}
|
|
59
|
-
function splitByComma(s) {
|
|
60
|
-
const result = [];
|
|
61
|
-
const stack = [];
|
|
62
|
-
let start = 0;
|
|
63
|
-
for (let i = 0; i < s.length; i++) {
|
|
64
|
-
if (s[i] === '{' || s[i] === '[') {
|
|
65
|
-
stack.push(s[i] === '{' ? '}' : ']');
|
|
66
|
-
} else if (s[i] === stack[stack.length - 1]) {
|
|
67
|
-
stack.pop();
|
|
68
|
-
} else if (!stack.length && s[i] === ',') {
|
|
69
|
-
const token = s.substring(start, i).trim();
|
|
70
|
-
if (token) result.push(token);
|
|
71
|
-
start = i + 1;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const lastToken = s.substring(start).trim();
|
|
75
|
-
if (lastToken) result.push(lastToken);
|
|
76
|
-
return result;
|
|
77
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getLocationInFile = getLocationInFile;
|
|
8
|
-
var _url = _interopRequireDefault(require("url"));
|
|
9
|
-
var _utils = require("./utils");
|
|
10
|
-
/**
|
|
11
|
-
* Inspects stacktrace and finds call location in provided file.
|
|
12
|
-
* This function is based on Playwright's getLocationByStacktrace().
|
|
13
|
-
* See: https://github.com/microsoft/playwright/blob/main/packages/playwright-test/src/common/transform.ts#L229
|
|
14
|
-
*/
|
|
15
|
-
function getLocationInFile(filePath) {
|
|
16
|
-
const {
|
|
17
|
-
sourceMapSupport
|
|
18
|
-
} = (0, _utils.requirePlaywrightModule)('lib/utilsBundle.js');
|
|
19
|
-
const oldPrepareStackTrace = Error.prepareStackTrace;
|
|
20
|
-
Error.prepareStackTrace = (error, stackFrames) => {
|
|
21
|
-
const frameInFile = stackFrames.find(frame => frame.getFileName() === filePath);
|
|
22
|
-
if (!frameInFile) return {
|
|
23
|
-
file: '',
|
|
24
|
-
line: 0,
|
|
25
|
-
column: 0
|
|
26
|
-
};
|
|
27
|
-
const frame = sourceMapSupport.wrapCallSite(frameInFile);
|
|
28
|
-
const fileName = frame.getFileName();
|
|
29
|
-
// Node error stacks for modules use file:// urls instead of paths.
|
|
30
|
-
const file = fileName && fileName.startsWith('file://') ? _url.default.fileURLToPath(fileName) : fileName;
|
|
31
|
-
return {
|
|
32
|
-
file,
|
|
33
|
-
line: frame.getLineNumber(),
|
|
34
|
-
column: frame.getColumnNumber()
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
// commented stackTraceLImit modification, todo: check if it has perf impact
|
|
38
|
-
// const oldStackTraceLimit = Error.stackTraceLimit;
|
|
39
|
-
// Error.stackTraceLimit = level + 1;
|
|
40
|
-
const obj = {};
|
|
41
|
-
Error.captureStackTrace(obj);
|
|
42
|
-
const location = obj.stack;
|
|
43
|
-
// Error.stackTraceLimit = oldStackTraceLimit;
|
|
44
|
-
Error.prepareStackTrace = oldPrepareStackTrace;
|
|
45
|
-
return location;
|
|
46
|
-
}
|