@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,42 +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.loadConfig = loadConfig;
|
|
8
|
-
exports.resolveConfigFile = resolveConfigFile;
|
|
9
|
-
var _path = _interopRequireDefault(require("path"));
|
|
10
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
-
var _utils = require("./utils");
|
|
12
|
-
var _transform = require("./transform");
|
|
13
|
-
var _utils2 = require("../utils");
|
|
14
|
-
/**
|
|
15
|
-
* Loading Playwright config.
|
|
16
|
-
* See: https://github.com/microsoft/playwright/blob/main/packages/playwright-test/src/common/configLoader.ts
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
async function loadConfig(cliConfigPath) {
|
|
20
|
-
const resolvedConfigFile = resolveConfigFile(cliConfigPath);
|
|
21
|
-
assertConfigFileExists(resolvedConfigFile, cliConfigPath);
|
|
22
|
-
await (0, _transform.requireTransform)().requireOrImport(resolvedConfigFile);
|
|
23
|
-
return {
|
|
24
|
-
resolvedConfigFile
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function resolveConfigFile(cliConfigPath) {
|
|
28
|
-
const {
|
|
29
|
-
resolveConfigFile
|
|
30
|
-
} = (0, _utils.requirePlaywrightModule)('lib/common/configLoader.js');
|
|
31
|
-
const configFileOrDirectory = getConfigFilePath(cliConfigPath);
|
|
32
|
-
return resolveConfigFile(configFileOrDirectory) || '';
|
|
33
|
-
}
|
|
34
|
-
function getConfigFilePath(cliConfigPath) {
|
|
35
|
-
return cliConfigPath ? _path.default.resolve(process.cwd(), cliConfigPath) : process.cwd();
|
|
36
|
-
}
|
|
37
|
-
function assertConfigFileExists(resolvedConfigFile, cliConfigPath) {
|
|
38
|
-
if (!resolvedConfigFile || !_fs.default.existsSync(resolvedConfigFile)) {
|
|
39
|
-
const configFilePath = getConfigFilePath(cliConfigPath);
|
|
40
|
-
(0, _utils2.exitWithMessage)(`Can't find Playwright config file in: ${configFilePath}`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getTestImpl = getTestImpl;
|
|
7
|
-
exports.isParentChildTest = isParentChildTest;
|
|
8
|
-
var _test = require("@playwright/test");
|
|
9
|
-
var _utils = require("../utils");
|
|
10
|
-
/**
|
|
11
|
-
* Helpers to deal with Playwright test internal stuff.
|
|
12
|
-
* See: https://github.com/microsoft/playwright/blob/main/packages/playwright-test/src/common/testType.ts
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
const testTypeSymbol = (0, _utils.getSymbolByName)(_test.test, 'testType');
|
|
16
|
-
/**
|
|
17
|
-
* Returns test fixtures using Symbol.
|
|
18
|
-
*/
|
|
19
|
-
function getTestFixtures(test) {
|
|
20
|
-
return getTestImpl(test).fixtures;
|
|
21
|
-
}
|
|
22
|
-
function getTestImpl(test) {
|
|
23
|
-
return test[testTypeSymbol];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Returns true if all fixtures of parent test found in child test.
|
|
27
|
-
*/
|
|
28
|
-
function isParentChildTest(parent, child) {
|
|
29
|
-
if (parent === child) return false;
|
|
30
|
-
const childLocationsSet = new Set(getTestFixtures(child).map(f => locationToString(f.location)));
|
|
31
|
-
return getTestFixtures(parent).every(f => {
|
|
32
|
-
return childLocationsSet.has(locationToString(f.location));
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function locationToString({
|
|
36
|
-
file,
|
|
37
|
-
line,
|
|
38
|
-
column
|
|
39
|
-
}) {
|
|
40
|
-
return `${file}:${line}:${column}`;
|
|
41
|
-
}
|
|
@@ -1,80 +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.installTransform = installTransform;
|
|
8
|
-
exports.requireTransform = requireTransform;
|
|
9
|
-
var _module = _interopRequireDefault(require("module"));
|
|
10
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
-
var _path = _interopRequireDefault(require("path"));
|
|
12
|
-
var _utils = require("./utils");
|
|
13
|
-
/* eslint-disable max-params */
|
|
14
|
-
/**
|
|
15
|
-
* Installs require hook to transform ts.
|
|
16
|
-
* Extracted from playwright.
|
|
17
|
-
* See: https://github.com/microsoft/playwright/blob/main/packages/playwright-test/src/transform/transform.ts
|
|
18
|
-
*/
|
|
19
|
-
function installTransform() {
|
|
20
|
-
const {
|
|
21
|
-
pirates
|
|
22
|
-
} = (0, _utils.requirePlaywrightModule)('lib/utilsBundle.js');
|
|
23
|
-
const {
|
|
24
|
-
resolveHook,
|
|
25
|
-
shouldTransform,
|
|
26
|
-
transformHook
|
|
27
|
-
} = requireTransform();
|
|
28
|
-
let reverted = false;
|
|
29
|
-
const originalResolveFilename = _module.default._resolveFilename;
|
|
30
|
-
function resolveFilename(specifier, parent, ...rest) {
|
|
31
|
-
if (!reverted && parent) {
|
|
32
|
-
const resolved = resolveHook(parent.filename, specifier);
|
|
33
|
-
if (resolved !== undefined) specifier = resolved;
|
|
34
|
-
}
|
|
35
|
-
return originalResolveFilename.call(this, specifier, parent, ...rest);
|
|
36
|
-
}
|
|
37
|
-
_module.default._resolveFilename = resolveFilename;
|
|
38
|
-
const revertPirates = pirates.addHook((code, filename) => {
|
|
39
|
-
if (!shouldTransform(filename)) return code;
|
|
40
|
-
return transformHook(code, filename);
|
|
41
|
-
}, {
|
|
42
|
-
exts: ['.ts', '.tsx', '.js', '.jsx', '.mjs']
|
|
43
|
-
});
|
|
44
|
-
return () => {
|
|
45
|
-
reverted = true;
|
|
46
|
-
_module.default._resolveFilename = originalResolveFilename;
|
|
47
|
-
revertPirates();
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function requireTransform() {
|
|
51
|
-
const transformPathSince1_35 = (0, _utils.getPlaywrightModulePath)('lib/transform/transform.js');
|
|
52
|
-
if (_fs.default.existsSync(transformPathSince1_35)) {
|
|
53
|
-
const {
|
|
54
|
-
resolveHook,
|
|
55
|
-
shouldTransform,
|
|
56
|
-
transformHook,
|
|
57
|
-
requireOrImport
|
|
58
|
-
} = (0, _utils.requirePlaywrightModule)(transformPathSince1_35);
|
|
59
|
-
return {
|
|
60
|
-
resolveHook,
|
|
61
|
-
shouldTransform,
|
|
62
|
-
transformHook,
|
|
63
|
-
requireOrImport
|
|
64
|
-
};
|
|
65
|
-
} else {
|
|
66
|
-
const {
|
|
67
|
-
resolveHook,
|
|
68
|
-
transformHook,
|
|
69
|
-
requireOrImport
|
|
70
|
-
} = (0, _utils.requirePlaywrightModule)('lib/common/transform.js');
|
|
71
|
-
// see: https://github.com/microsoft/playwright/blob/b4ffb848de1b00e9a0abad6dacdccce60cce9bed/packages/playwright-test/src/reporters/base.ts#L524
|
|
72
|
-
const shouldTransform = file => !file.includes(`${_path.default.sep}node_modules${_path.default.sep}`);
|
|
73
|
-
return {
|
|
74
|
-
resolveHook,
|
|
75
|
-
shouldTransform,
|
|
76
|
-
transformHook,
|
|
77
|
-
requireOrImport
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,34 +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.getPlaywrightModulePath = getPlaywrightModulePath;
|
|
8
|
-
exports.requirePlaywrightModule = requirePlaywrightModule;
|
|
9
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
10
|
-
var _path = _interopRequireDefault(require("path"));
|
|
11
|
-
var _utils = require("../utils");
|
|
12
|
-
// cache playwright root
|
|
13
|
-
let playwrightRoot = '';
|
|
14
|
-
/**
|
|
15
|
-
* Requires Playwright's internal module that is not exported via package.exports.
|
|
16
|
-
*/
|
|
17
|
-
function requirePlaywrightModule(modulePath) {
|
|
18
|
-
const absPath = _path.default.isAbsolute(modulePath) ? modulePath : getPlaywrightModulePath(modulePath);
|
|
19
|
-
return require(absPath);
|
|
20
|
-
}
|
|
21
|
-
function getPlaywrightModulePath(relativePath) {
|
|
22
|
-
return _path.default.join(getPlaywrightRoot(), relativePath);
|
|
23
|
-
}
|
|
24
|
-
function getPlaywrightRoot() {
|
|
25
|
-
if (!playwrightRoot) {
|
|
26
|
-
// Since 1.38 all modules moved from @playwright/test to playwright.
|
|
27
|
-
// Here we check existance of 'lib' dir instead of checking version.
|
|
28
|
-
// See: https://github.com/microsoft/playwright/pull/26946
|
|
29
|
-
const playwrightTestRoot = (0, _utils.resolvePackageRoot)('@playwright/test');
|
|
30
|
-
const libDir = _path.default.join(playwrightTestRoot, 'lib');
|
|
31
|
-
playwrightRoot = _fs.default.existsSync(libDir) ? playwrightTestRoot : (0, _utils.resolvePackageRoot)('playwright');
|
|
32
|
-
}
|
|
33
|
-
return playwrightRoot;
|
|
34
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isBddAutoInjectFixture = isBddAutoInjectFixture;
|
|
7
|
-
exports.test = void 0;
|
|
8
|
-
var _test = require("@playwright/test");
|
|
9
|
-
var _loadConfig = require("../cucumber/loadConfig");
|
|
10
|
-
var _loadSteps = require("../cucumber/loadSteps");
|
|
11
|
-
var _bddWorld = require("./bddWorld");
|
|
12
|
-
var _config = require("../config");
|
|
13
|
-
var _env = require("../config/env");
|
|
14
|
-
var _steps = require("../stepDefinitions/decorators/steps");
|
|
15
|
-
var _dir = require("../config/dir");
|
|
16
|
-
const test = _test.test.extend({
|
|
17
|
-
$bddWorldBase: async ({
|
|
18
|
-
$tags,
|
|
19
|
-
$test
|
|
20
|
-
}, use, testInfo) => {
|
|
21
|
-
const config = (0, _env.getConfigFromEnv)(testInfo.project.testDir);
|
|
22
|
-
const environment = {
|
|
23
|
-
cwd: (0, _dir.getPlaywrightConfigDir)()
|
|
24
|
-
};
|
|
25
|
-
const {
|
|
26
|
-
runConfiguration
|
|
27
|
-
} = await (0, _loadConfig.loadConfig)({
|
|
28
|
-
provided: (0, _config.extractCucumberConfig)(config)
|
|
29
|
-
}, environment);
|
|
30
|
-
const supportCodeLibrary = await (0, _loadSteps.loadSteps)(runConfiguration, environment);
|
|
31
|
-
(0, _steps.appendDecoratorSteps)(supportCodeLibrary);
|
|
32
|
-
const World = (0, _bddWorld.getWorldConstructor)(supportCodeLibrary);
|
|
33
|
-
const world = new World({
|
|
34
|
-
testInfo,
|
|
35
|
-
supportCodeLibrary,
|
|
36
|
-
$tags,
|
|
37
|
-
$test,
|
|
38
|
-
parameters: runConfiguration.runtime.worldParameters || {},
|
|
39
|
-
log: () => {},
|
|
40
|
-
attach: async () => {}
|
|
41
|
-
});
|
|
42
|
-
await world.init();
|
|
43
|
-
await use(world);
|
|
44
|
-
await world.destroy();
|
|
45
|
-
},
|
|
46
|
-
$bddWorld: async ({
|
|
47
|
-
$bddWorldBase,
|
|
48
|
-
page,
|
|
49
|
-
context,
|
|
50
|
-
browser,
|
|
51
|
-
browserName,
|
|
52
|
-
request
|
|
53
|
-
}, use) => {
|
|
54
|
-
$bddWorldBase.builtinFixtures = {
|
|
55
|
-
page,
|
|
56
|
-
context,
|
|
57
|
-
browser,
|
|
58
|
-
browserName,
|
|
59
|
-
request
|
|
60
|
-
};
|
|
61
|
-
await use($bddWorldBase);
|
|
62
|
-
},
|
|
63
|
-
// below fixtures are used in playwright-style
|
|
64
|
-
// and does not automatically init Playwright builtin fixtures
|
|
65
|
-
Given: ({
|
|
66
|
-
$bddWorldBase
|
|
67
|
-
}, use) => use($bddWorldBase.invokeStep),
|
|
68
|
-
When: ({
|
|
69
|
-
$bddWorldBase
|
|
70
|
-
}, use) => use($bddWorldBase.invokeStep),
|
|
71
|
-
Then: ({
|
|
72
|
-
$bddWorldBase
|
|
73
|
-
}, use) => use($bddWorldBase.invokeStep),
|
|
74
|
-
And: ({
|
|
75
|
-
$bddWorldBase
|
|
76
|
-
}, use) => use($bddWorldBase.invokeStep),
|
|
77
|
-
But: ({
|
|
78
|
-
$bddWorldBase
|
|
79
|
-
}, use) => use($bddWorldBase.invokeStep),
|
|
80
|
-
// below fixtures are used in cucumber-style
|
|
81
|
-
// and automatically init Playwright builtin fixtures
|
|
82
|
-
Given_: ({
|
|
83
|
-
$bddWorld
|
|
84
|
-
}, use) => use($bddWorld.invokeStep),
|
|
85
|
-
When_: ({
|
|
86
|
-
$bddWorld
|
|
87
|
-
}, use) => use($bddWorld.invokeStep),
|
|
88
|
-
Then_: ({
|
|
89
|
-
$bddWorld
|
|
90
|
-
}, use) => use($bddWorld.invokeStep),
|
|
91
|
-
And_: ({
|
|
92
|
-
$bddWorld
|
|
93
|
-
}, use) => use($bddWorld.invokeStep),
|
|
94
|
-
But_: ({
|
|
95
|
-
$bddWorld
|
|
96
|
-
}, use) => use($bddWorld.invokeStep),
|
|
97
|
-
// Init $tags fixture with empty array. Can be owerwritten in test file
|
|
98
|
-
// eslint-disable-next-line
|
|
99
|
-
$tags: ({}, use) => use([]),
|
|
100
|
-
// Init $test fixture with base test, but it will be always overwritten in test file
|
|
101
|
-
// eslint-disable-next-line
|
|
102
|
-
$test: ({}, use) => use(_test.test)
|
|
103
|
-
});
|
|
104
|
-
exports.test = test;
|
|
105
|
-
const BDD_AUTO_INJECT_FIXTURES = ['$testInfo', '$test', '$tags'];
|
|
106
|
-
function isBddAutoInjectFixture(name) {
|
|
107
|
-
return BDD_AUTO_INJECT_FIXTURES.includes(name);
|
|
108
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BddWorld = void 0;
|
|
7
|
-
exports.getWorldConstructor = getWorldConstructor;
|
|
8
|
-
var _cucumber = require("@cucumber/cucumber");
|
|
9
|
-
var _loadSteps = require("../cucumber/loadSteps");
|
|
10
|
-
var _getLocationInFile = require("../playwright/getLocationInFile");
|
|
11
|
-
var _testTypeImpl = require("../playwright/testTypeImpl");
|
|
12
|
-
var _defineStep = require("../stepDefinitions/defineStep");
|
|
13
|
-
class BddWorld extends _cucumber.World {
|
|
14
|
-
options;
|
|
15
|
-
builtinFixtures;
|
|
16
|
-
customFixtures;
|
|
17
|
-
constructor(options) {
|
|
18
|
-
super(options);
|
|
19
|
-
this.options = options;
|
|
20
|
-
this.invokeStep = this.invokeStep.bind(this);
|
|
21
|
-
}
|
|
22
|
-
async invokeStep(text, argument, customFixtures) {
|
|
23
|
-
const stepDefinition = (0, _loadSteps.findStepDefinition)(this.options.supportCodeLibrary, text, this.testInfo.file);
|
|
24
|
-
if (!stepDefinition) {
|
|
25
|
-
throw new Error(`Undefined step: "${text}"`);
|
|
26
|
-
}
|
|
27
|
-
// attach custom fixtures to world - the only way to pass them to cucumber step fn
|
|
28
|
-
this.customFixtures = customFixtures;
|
|
29
|
-
const code = (0, _defineStep.getStepCode)(stepDefinition);
|
|
30
|
-
// get location of step call in generated test file
|
|
31
|
-
const location = (0, _getLocationInFile.getLocationInFile)(this.test.info().file);
|
|
32
|
-
const {
|
|
33
|
-
parameters
|
|
34
|
-
} = await stepDefinition.getInvocationParameters({
|
|
35
|
-
hookParameter: {},
|
|
36
|
-
step: {
|
|
37
|
-
text,
|
|
38
|
-
argument
|
|
39
|
-
},
|
|
40
|
-
world: this
|
|
41
|
-
});
|
|
42
|
-
const res = await (0, _testTypeImpl.getTestImpl)(this.test)._step(location, text, () => code.apply(this, parameters));
|
|
43
|
-
delete this.customFixtures;
|
|
44
|
-
return res;
|
|
45
|
-
}
|
|
46
|
-
get page() {
|
|
47
|
-
return this.builtinFixtures.page;
|
|
48
|
-
}
|
|
49
|
-
get context() {
|
|
50
|
-
return this.builtinFixtures.context;
|
|
51
|
-
}
|
|
52
|
-
get browser() {
|
|
53
|
-
return this.builtinFixtures.browser;
|
|
54
|
-
}
|
|
55
|
-
get browserName() {
|
|
56
|
-
return this.builtinFixtures.browserName;
|
|
57
|
-
}
|
|
58
|
-
get request() {
|
|
59
|
-
return this.builtinFixtures.request;
|
|
60
|
-
}
|
|
61
|
-
get testInfo() {
|
|
62
|
-
return this.options.testInfo;
|
|
63
|
-
}
|
|
64
|
-
get tags() {
|
|
65
|
-
return this.options.$tags;
|
|
66
|
-
}
|
|
67
|
-
get test() {
|
|
68
|
-
return this.options.$test;
|
|
69
|
-
}
|
|
70
|
-
async init() {
|
|
71
|
-
// async setup before each test
|
|
72
|
-
}
|
|
73
|
-
async destroy() {
|
|
74
|
-
// async teardown after each test
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.BddWorld = BddWorld;
|
|
78
|
-
function getWorldConstructor(supportCodeLibrary) {
|
|
79
|
-
// setWorldConstructor was not called
|
|
80
|
-
if (supportCodeLibrary.World === _cucumber.World) {
|
|
81
|
-
return BddWorld;
|
|
82
|
-
}
|
|
83
|
-
if (!Object.prototype.isPrototypeOf.call(BddWorld, supportCodeLibrary.World)) {
|
|
84
|
-
throw new Error(`CustomWorld should inherit from playwright-bdd World`);
|
|
85
|
-
}
|
|
86
|
-
return supportCodeLibrary.World;
|
|
87
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Snippets = void 0;
|
|
7
|
-
var _loadSnippetBuilder = require("../cucumber/loadSnippetBuilder");
|
|
8
|
-
var _utils = require("../utils");
|
|
9
|
-
var _logger = require("../utils/logger");
|
|
10
|
-
var _stepConfig = require("../stepDefinitions/stepConfig");
|
|
11
|
-
/**
|
|
12
|
-
* Generate and show snippets for undefined steps
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
class Snippets {
|
|
16
|
-
files;
|
|
17
|
-
runConfiguration;
|
|
18
|
-
supportCodeLibrary;
|
|
19
|
-
snippetBuilder;
|
|
20
|
-
bddBuiltInSyntax = false;
|
|
21
|
-
constructor(files, runConfiguration, supportCodeLibrary) {
|
|
22
|
-
this.files = files;
|
|
23
|
-
this.runConfiguration = runConfiguration;
|
|
24
|
-
this.supportCodeLibrary = supportCodeLibrary;
|
|
25
|
-
}
|
|
26
|
-
async printSnippetsAndExit() {
|
|
27
|
-
this.snippetBuilder = await this.createSnippetBuilder();
|
|
28
|
-
const snippets = this.getSnippets();
|
|
29
|
-
this.printHeader();
|
|
30
|
-
this.printSnippets(snippets);
|
|
31
|
-
this.printFooter(snippets);
|
|
32
|
-
}
|
|
33
|
-
async createSnippetBuilder() {
|
|
34
|
-
const {
|
|
35
|
-
snippetInterface
|
|
36
|
-
} = this.runConfiguration.formats.options;
|
|
37
|
-
const snippetSyntax = this.getSnippetSyntax();
|
|
38
|
-
return (0, _loadSnippetBuilder.loadSnippetBuilder)(this.supportCodeLibrary, snippetInterface, snippetSyntax);
|
|
39
|
-
}
|
|
40
|
-
getSnippetSyntax() {
|
|
41
|
-
const {
|
|
42
|
-
snippetSyntax
|
|
43
|
-
} = this.runConfiguration.formats.options;
|
|
44
|
-
if (!snippetSyntax && this.isPlaywrightStyle()) {
|
|
45
|
-
this.bddBuiltInSyntax = true;
|
|
46
|
-
return this.isDecorators() ? require.resolve('./snippetSyntaxDecorators.js') : this.isTypeScript() ? require.resolve('./snippetSyntaxTs.js') : require.resolve('./snippetSyntax.js');
|
|
47
|
-
} else {
|
|
48
|
-
return snippetSyntax;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
getSnippets() {
|
|
52
|
-
const snippetsSet = new Set();
|
|
53
|
-
const snippets = [];
|
|
54
|
-
this.files.forEach(file => {
|
|
55
|
-
file.undefinedSteps.forEach(undefinedStep => {
|
|
56
|
-
const {
|
|
57
|
-
snippet,
|
|
58
|
-
snippetWithLocation
|
|
59
|
-
} = this.getSnippet(file, snippets.length + 1, undefinedStep);
|
|
60
|
-
if (!snippetsSet.has(snippet)) {
|
|
61
|
-
snippetsSet.add(snippet);
|
|
62
|
-
snippets.push(snippetWithLocation);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
return snippets;
|
|
67
|
-
}
|
|
68
|
-
getSnippet(file, index, undefinedStep) {
|
|
69
|
-
const snippet = this.snippetBuilder.build({
|
|
70
|
-
keywordType: undefinedStep.keywordType,
|
|
71
|
-
pickleStep: undefinedStep.pickleStep
|
|
72
|
-
});
|
|
73
|
-
const {
|
|
74
|
-
line,
|
|
75
|
-
column
|
|
76
|
-
} = undefinedStep.step.location;
|
|
77
|
-
const snippetWithLocation = [`// ${index}. Missing step definition for "${file.sourceFile}:${line}:${column}"`, snippet].join('\n');
|
|
78
|
-
return {
|
|
79
|
-
snippet,
|
|
80
|
-
snippetWithLocation
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
isTypeScript() {
|
|
84
|
-
const {
|
|
85
|
-
requirePaths,
|
|
86
|
-
importPaths
|
|
87
|
-
} = this.supportCodeLibrary.originalCoordinates;
|
|
88
|
-
return requirePaths.some(p => p.endsWith('.ts')) || importPaths.some(p => p.endsWith('.ts'));
|
|
89
|
-
}
|
|
90
|
-
isPlaywrightStyle() {
|
|
91
|
-
const {
|
|
92
|
-
stepDefinitions
|
|
93
|
-
} = this.supportCodeLibrary;
|
|
94
|
-
return stepDefinitions.length > 0 ? stepDefinitions.some(step => (0, _stepConfig.isPlaywrightStyle)((0, _stepConfig.getStepConfig)(step))) : true;
|
|
95
|
-
}
|
|
96
|
-
isDecorators() {
|
|
97
|
-
const {
|
|
98
|
-
stepDefinitions
|
|
99
|
-
} = this.supportCodeLibrary;
|
|
100
|
-
const decoratorSteps = stepDefinitions.filter(step => (0, _stepConfig.isDecorator)((0, _stepConfig.getStepConfig)(step)));
|
|
101
|
-
return decoratorSteps.length > stepDefinitions.length / 2;
|
|
102
|
-
}
|
|
103
|
-
printHeader() {
|
|
104
|
-
const lines = [`Missing steps found. Use snippets below:`];
|
|
105
|
-
if (this.bddBuiltInSyntax) {
|
|
106
|
-
if (this.isDecorators()) {
|
|
107
|
-
lines.push(`import { Fixture, Given, When, Then } from 'playwright-bdd/decorators';\n`);
|
|
108
|
-
} else {
|
|
109
|
-
lines.push(`import { createBdd } from '@zohodesk/testinglibrary';`, `const { Given, When, Then } = createBdd();\n`);
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
lines.push(`import { Given, When, Then } from '@cucumber/cucumber';\n`);
|
|
113
|
-
}
|
|
114
|
-
_logger.logger.error(lines.join('\n\n'));
|
|
115
|
-
}
|
|
116
|
-
printSnippets(snippets) {
|
|
117
|
-
_logger.logger.error(snippets.concat(['']).join('\n\n'));
|
|
118
|
-
}
|
|
119
|
-
printFooter(snippets) {
|
|
120
|
-
(0, _utils.exitWithMessage)(`Missing step definitions (${snippets.length}).`, 'Use snippets above to create them.', this.getWarnOnZeroScannedFiles());
|
|
121
|
-
}
|
|
122
|
-
getWarnOnZeroScannedFiles() {
|
|
123
|
-
const {
|
|
124
|
-
requirePaths,
|
|
125
|
-
importPaths
|
|
126
|
-
} = this.supportCodeLibrary.originalCoordinates;
|
|
127
|
-
const scannedFilesCount = requirePaths.length + importPaths.length;
|
|
128
|
-
return scannedFilesCount === 0 && !this.isDecorators() ? `\nNote that 0 step definition files found, check the config.` : '';
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
exports.Snippets = Snippets;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// todo: custom cucumber parameters
|
|
8
|
-
// See: https://github.com/cucumber/cucumber-expressions#custom-parameter-types
|
|
9
|
-
class _default {
|
|
10
|
-
isTypescript = false;
|
|
11
|
-
build({
|
|
12
|
-
generatedExpressions,
|
|
13
|
-
functionName,
|
|
14
|
-
stepParameterNames
|
|
15
|
-
}) {
|
|
16
|
-
// Always take only first generatedExpression
|
|
17
|
-
// Other expressions are for int/float combinations
|
|
18
|
-
const generatedExpression = generatedExpressions[0];
|
|
19
|
-
const expressionParameters = generatedExpression.parameterNames.map((name, i) => {
|
|
20
|
-
const argName = `arg${i === 0 ? '' : i}`;
|
|
21
|
-
const type = name.startsWith('string') ? 'string' : 'number';
|
|
22
|
-
return this.isTypescript ? `${argName}: ${type}` : argName;
|
|
23
|
-
});
|
|
24
|
-
const stepParameters = stepParameterNames.map(argName => {
|
|
25
|
-
const type = argName === 'dataTable' ? 'DataTable' : 'string';
|
|
26
|
-
return this.isTypescript ? `${argName}: ${type}` : argName;
|
|
27
|
-
});
|
|
28
|
-
const allParameterNames = ['{}', ...expressionParameters, ...stepParameters];
|
|
29
|
-
const functionSignature = `${functionName}('${this.escapeSpecialCharacters(generatedExpression)}', async (${allParameterNames.join(', ')}) => {`;
|
|
30
|
-
return [functionSignature, ` // ...`, '});'].join('\n');
|
|
31
|
-
}
|
|
32
|
-
escapeSpecialCharacters(generatedExpression) {
|
|
33
|
-
let source = generatedExpression.source;
|
|
34
|
-
// double up any backslashes because we're in a javascript string
|
|
35
|
-
source = source.replace(/\\/g, '\\\\');
|
|
36
|
-
// escape any single quotes because that's our quote delimiter
|
|
37
|
-
source = source.replace(/'/g, "\\'");
|
|
38
|
-
return source;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.default = _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
class _default {
|
|
8
|
-
build({
|
|
9
|
-
generatedExpressions,
|
|
10
|
-
functionName
|
|
11
|
-
}) {
|
|
12
|
-
// Always take only first generatedExpression
|
|
13
|
-
// Other expressions are for int/float combinations
|
|
14
|
-
const generatedExpression = generatedExpressions[0];
|
|
15
|
-
return `@${functionName}('${this.escapeSpecialCharacters(generatedExpression)}')`;
|
|
16
|
-
}
|
|
17
|
-
escapeSpecialCharacters(generatedExpression) {
|
|
18
|
-
let source = generatedExpression.source;
|
|
19
|
-
// double up any backslashes because we're in a javascript string
|
|
20
|
-
source = source.replace(/\\/g, '\\\\');
|
|
21
|
-
// escape any single quotes because that's our quote delimiter
|
|
22
|
-
source = source.replace(/'/g, "\\'");
|
|
23
|
-
return source;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.default = _default;
|
|
@@ -1,18 +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.default = void 0;
|
|
8
|
-
var _snippetSyntax = _interopRequireDefault(require("./snippetSyntax"));
|
|
9
|
-
/**
|
|
10
|
-
* Playwright-style snippet syntax for typescript.
|
|
11
|
-
* Important to use separate file as it's simplest way to distinguish between js/ts
|
|
12
|
-
* without hooking into cucumber machinery.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
class _default extends _snippetSyntax.default {
|
|
16
|
-
isTypescript = true;
|
|
17
|
-
}
|
|
18
|
-
exports.default = _default;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createBdd = createBdd;
|
|
7
|
-
exports.extractFixtureNames = extractFixtureNames;
|
|
8
|
-
var _fixtureParameterNames = require("../playwright/fixtureParameterNames");
|
|
9
|
-
var _utils = require("../utils");
|
|
10
|
-
var _bddFixtures = require("../run/bddFixtures");
|
|
11
|
-
var _testTypeImpl = require("../playwright/testTypeImpl");
|
|
12
|
-
var _defineStep = require("./defineStep");
|
|
13
|
-
/**
|
|
14
|
-
* Stuff related to writing steps in Playwright-style.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
function createBdd(customTest) {
|
|
18
|
-
const hasCustomTest = isCustomTest(customTest);
|
|
19
|
-
const Given = defineStepCtor('Given', hasCustomTest);
|
|
20
|
-
const When = defineStepCtor('When', hasCustomTest);
|
|
21
|
-
const Then = defineStepCtor('Then', hasCustomTest);
|
|
22
|
-
const Step = defineStepCtor('Unknown', hasCustomTest);
|
|
23
|
-
return {
|
|
24
|
-
Given,
|
|
25
|
-
When,
|
|
26
|
-
Then,
|
|
27
|
-
Step
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function defineStepCtor(keyword, hasCustomTest) {
|
|
31
|
-
return (pattern, fn) => {
|
|
32
|
-
(0, _defineStep.defineStep)({
|
|
33
|
-
keyword,
|
|
34
|
-
pattern,
|
|
35
|
-
fn,
|
|
36
|
-
hasCustomTest
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function extractFixtureNames(fn) {
|
|
41
|
-
return (0, _fixtureParameterNames.fixtureParameterNames)(fn).filter(name => !(0, _bddFixtures.isBddAutoInjectFixture)(name));
|
|
42
|
-
}
|
|
43
|
-
function isCustomTest(customTest) {
|
|
44
|
-
const isCustomTest = Boolean(customTest && customTest !== _bddFixtures.test);
|
|
45
|
-
if (isCustomTest && customTest && !(0, _testTypeImpl.isParentChildTest)(_bddFixtures.test, customTest)) {
|
|
46
|
-
(0, _utils.exitWithMessage)(`createBdd() should use test extended from "playwright-bdd"`);
|
|
47
|
-
}
|
|
48
|
-
return isCustomTest;
|
|
49
|
-
}
|