@zohodesk/testinglibrary 0.0.9 → 0.0.10-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 +115 -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 +9725 -6739
- package/package.json +34 -27
- 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-0.0.10-n20-experimental.tgz +0 -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,72 +1,15 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import { test as setup, expect } from '@zohodesk/testinglibrary';
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
performLoginSteps,
|
|
5
|
+
getDefaultActor
|
|
6
|
+
} from '@zohodesk/testinglibrary/helpers';
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
import { loginSteps , validateLogin } from './testSetup';
|
|
7
9
|
|
|
8
|
-
const
|
|
10
|
+
const user = getDefaultActor();
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function convertCookiesToParse(cookies, authFilePath) {
|
|
17
|
-
try {
|
|
18
|
-
return JSON.parse(cookies)
|
|
19
|
-
} catch (err) {
|
|
20
|
-
throw new Error(` Error while parsing cookies ${err} \n${path.resolve(process.cwd(), authFilePath)} File is Empty`)
|
|
21
|
-
// process.exit()
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (!existsSync(authDirectory)) {
|
|
26
|
-
console.log('Creating auth directory for the first time setup...');
|
|
27
|
-
mkdirSync(authDirectory, { recursive: true });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
userdata.forEach((data) => {
|
|
31
|
-
const authFile = path.resolve(path.join(authDirectory, `${data.filename}`));
|
|
32
|
-
if (!existsSync(authFile)) {
|
|
33
|
-
console.log('creating auth file..');
|
|
34
|
-
writeFileSync(authFile, JSON.stringify(authContent, null, 2))
|
|
35
|
-
}
|
|
36
|
-
setup(data.description, async ({ page }) => {
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
const cookies = readFileSync(authFile);
|
|
40
|
-
const parsedCookies = convertCookiesToParse(cookies, authFile);
|
|
41
|
-
await page.context().addCookies(parsedCookies.cookies === undefined ? [] : parsedCookies.cookies)
|
|
42
|
-
await page.goto(page.getBaseUrl());
|
|
43
|
-
await page.waitForLoadState();
|
|
44
|
-
if (await page.url().includes(process.env.domain)) {
|
|
45
|
-
await page.waitForSelector(data.locator);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error(LOGIN_ERR_MESSAGE);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} catch (err) {
|
|
52
|
-
if (err.message === LOGIN_ERR_MESSAGE) {
|
|
53
|
-
|
|
54
|
-
await expect(page.locator('.load-bg')).toBeHidden();
|
|
55
|
-
await page.locator('#login_id').type(data.useremail);
|
|
56
|
-
await page.locator('#nextbtn').click();
|
|
57
|
-
await page.locator('#password').type(data.password);
|
|
58
|
-
await page.locator('#nextbtn').click();
|
|
59
|
-
|
|
60
|
-
await page.waitForLoadState("networkidle");
|
|
61
|
-
|
|
62
|
-
await page.waitForSelector(data.locator)
|
|
63
|
-
|
|
64
|
-
await page.context().storageState({ path: authFile });
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
12
|
+
setup(`${user.edition} - Authentication`, async ({ page }) => {
|
|
13
|
+
//Implement performLoginSteps here
|
|
14
|
+
await performLoginSteps({page, ...user},validateLogin ,loginSteps);
|
|
15
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "1",
|
|
4
|
+
"edition": "free",
|
|
5
|
+
"orgName": "orgFree",
|
|
6
|
+
"profiles": [
|
|
7
|
+
{
|
|
8
|
+
"profile": "admin",
|
|
9
|
+
"email": "admin+free@zohotest.com",
|
|
10
|
+
"password": "password@0987"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"profile": "agent",
|
|
14
|
+
"email": "agent@zohotest.com",
|
|
15
|
+
"password": "password@12345"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"profile": "lightagent",
|
|
19
|
+
"email": "lightagent@zohotest.com",
|
|
20
|
+
"password": "password@12345"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
|
|
@@ -2,15 +2,19 @@ import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { Logger } from '../utils/logger';
|
|
4
4
|
import { generateConfigFromFile } from '../core/playwright/readConfigFile';
|
|
5
|
-
|
|
5
|
+
const gitIgnoreAbsolutePath = path.resolve(process.cwd(), '../', '../')
|
|
6
6
|
|
|
7
7
|
const { reportPath = path.resolve(process.cwd(), 'uat', 'playwright-reports') } = generateConfigFromFile();
|
|
8
8
|
const testResultsPath = path.resolve(process.cwd(), 'uat', 'test-results');
|
|
9
9
|
|
|
10
|
-
const testResultsRelativepath = path.relative(
|
|
11
|
-
const reportRelativepath = path.relative(
|
|
10
|
+
const testResultsRelativepath = path.relative(gitIgnoreAbsolutePath, testResultsPath)
|
|
11
|
+
const reportRelativepath = path.relative(gitIgnoreAbsolutePath, reportPath)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const absolutePathfeaturegen = path.resolve(process.cwd(), 'uat', '.features-gen');
|
|
15
|
+
const featuregenRelativePath = path.relative(gitIgnoreAbsolutePath,absolutePathfeaturegen)
|
|
12
16
|
|
|
13
|
-
const dirpathtoIgnore = `${testResultsRelativepath}\n${reportRelativepath}`
|
|
17
|
+
const dirpathtoIgnore = `${testResultsRelativepath}\n${reportRelativepath}\n${featuregenRelativePath}`
|
|
14
18
|
|
|
15
19
|
function updateGitIgnore() {
|
|
16
20
|
if (existsSync(path.resolve(process.cwd(), '../', '../', '.gitignore'))) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable global-require */
|
|
2
|
+
const accountLogin = require('./accountLogin');
|
|
3
|
+
|
|
4
|
+
async function verifyPageIsLoaded({page}) {
|
|
5
|
+
|
|
6
|
+
//Implement your validation logic here
|
|
7
|
+
//Refer deskclientapp testSetup.js
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
loginSteps:accountLogin,
|
|
12
|
+
validateLogin:verifyPageIsLoaded,
|
|
13
|
+
page:()=>{}
|
|
14
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const testSetup = require('../../fixtures/testSetup');
|
|
1
2
|
/**
|
|
2
3
|
* @typedef {Object|null} viewportConfig
|
|
3
4
|
* @property {number} width - width of the viewport
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
* @property {boolean} video - video for test cases,
|
|
12
13
|
* @property {boolean} debug - debug mode
|
|
13
14
|
* @property {string} mode: mode in which the test cases needs to run
|
|
14
|
-
* @property {boolean} isAuthMode - Auth Mode
|
|
15
|
+
* @property {boolean} isAuthMode - Auth Mode. config whether authentication step needed before running test cases
|
|
15
16
|
* @property {string} authFilePath - File Path where the cookies stored
|
|
16
17
|
* @property {any} browsers: List of browsers
|
|
17
18
|
* @property {string} openReportOn: default Option value (never, on-failure and always)
|
|
@@ -22,7 +23,8 @@
|
|
|
22
23
|
* @property {Object} additionalPages: custom pages configuration
|
|
23
24
|
* @property {string} featureFilesFolder: folder name under which feature-files will be placed. Default is feature-files
|
|
24
25
|
* @property {string} stepDefinitionsFolder: folder name under which step implementations will be placed. Default is steps
|
|
25
|
-
* @property {viewportConfig} viewport: viewport configuration for the browser. Default is {width: 1280, height: 720 }
|
|
26
|
+
* @property {viewportConfig} viewport: viewport configuration for the browser. Default is { width: 1280, height: 720 }
|
|
27
|
+
* @property {string} testIdAttribute: Change the default data-testid attribute. configure what attribute to search while calling getByTestId
|
|
26
28
|
*/
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -36,7 +38,9 @@ module.exports = {
|
|
|
36
38
|
authFilePath: 'uat/playwright/.auth/user.json',
|
|
37
39
|
trace: true,
|
|
38
40
|
video: true,
|
|
41
|
+
bddMode: true,
|
|
39
42
|
featureFilesFolder: 'feature-files',
|
|
40
43
|
stepDefinitionsFolder: 'steps',
|
|
41
|
-
viewport:
|
|
44
|
+
viewport: { width: 1280, height: 720 },
|
|
45
|
+
testSetup
|
|
42
46
|
}
|
|
@@ -10,8 +10,9 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
10
10
|
var _logger = require("../utils/logger");
|
|
11
11
|
function getScriptsToBeAdded() {
|
|
12
12
|
return {
|
|
13
|
-
"uat": "ZDTestingFramework test --mode=
|
|
14
|
-
"uat-debug": "ZDTestingFramework test --mode=
|
|
13
|
+
"uat": "ZDTestingFramework test --mode=dev --headed",
|
|
14
|
+
"uat-debug": "ZDTestingFramework test --mode=dev --debug",
|
|
15
|
+
"uat-validate": "ZDTestingFramework validate",
|
|
15
16
|
"uat-report": "ZDTestingFramework report --port=9009",
|
|
16
17
|
"codegen": "ZDTestingFramework codegen deskclientapp.localzoho.com/agent"
|
|
17
18
|
};
|
|
@@ -61,15 +62,23 @@ function createUatConfig() {
|
|
|
61
62
|
function createAuthenticationFile() {
|
|
62
63
|
const isUATexist = _path.default.resolve(process.cwd(), 'uat');
|
|
63
64
|
if ((0, _fs.existsSync)(isUATexist)) {
|
|
64
|
-
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating Authentication File ....');
|
|
65
65
|
try {
|
|
66
|
-
(0, _fs.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures'))) {
|
|
67
|
+
(0, _fs.mkdirSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures'));
|
|
68
|
+
}
|
|
69
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(process.cwd(), 'uat', 'playwright', '.auth'))) {
|
|
70
|
+
(0, _fs.mkdirSync)(_path.default.resolve(process.cwd(), 'uat', 'playwright', '.auth'), {
|
|
71
|
+
recursive: true
|
|
72
|
+
});
|
|
73
|
+
}
|
|
70
74
|
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'auth.setup.js'), getSetupFileAsString('auth-setup-sample.js'), null, 2);
|
|
71
|
-
|
|
75
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating Authentication File ....');
|
|
76
|
+
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'accountLogin.js'), getSetupFileAsString('accountLogin-sample.js'), null, 2);
|
|
77
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating login script File ....');
|
|
78
|
+
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'testSetup.js'), getSetupFileAsString('testSetup-sample.js'), null, 2);
|
|
79
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating testSetup File ....');
|
|
72
80
|
} catch (err) {
|
|
81
|
+
_logger.Logger.error(err);
|
|
73
82
|
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, 'Something went wrong ! Folder not Created. Please re-initialize npm init-uat');
|
|
74
83
|
}
|
|
75
84
|
} else {
|
|
@@ -79,8 +88,21 @@ function createAuthenticationFile() {
|
|
|
79
88
|
function createConfigJson() {
|
|
80
89
|
const uatFolder = _path.default.resolve(process.cwd(), 'uat');
|
|
81
90
|
if ((0, _fs.existsSync)(uatFolder)) {
|
|
82
|
-
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating
|
|
83
|
-
(0, _fs.
|
|
91
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating settings.json file inside UAT Folder');
|
|
92
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(uatFolder, 'conf', 'default'))) {
|
|
93
|
+
(0, _fs.mkdirSync)(_path.default.resolve(uatFolder, 'conf', 'default'), {
|
|
94
|
+
recursive: true
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', './settings.json'), getSetupFileAsString('settings.json'), null, 2);
|
|
98
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions'))) {
|
|
99
|
+
(0, _fs.mkdirSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions'), {
|
|
100
|
+
recursive: true
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions', 'free.json'), getSetupFileAsString('free-sample.json'), null, 2);
|
|
104
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions', 'index.js'), getSetupFileAsString('editions-index.js'), null, 2);
|
|
105
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'index.js'), getSetupFileAsString('actors-index.js'), null, 2);
|
|
84
106
|
} else {
|
|
85
107
|
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Something went wrong. Please re-initialize the @zohodesk/testinglibrary');
|
|
86
108
|
}
|
|
@@ -91,6 +113,7 @@ function setupProject() {
|
|
|
91
113
|
createFolderForUAT();
|
|
92
114
|
createConfigJson();
|
|
93
115
|
createAuthenticationFile();
|
|
116
|
+
//updateGitIgnore()
|
|
94
117
|
// Create folder for playwright . Inside .auth folder needs to be created. user.json
|
|
95
118
|
// Add playwright and test-results to .gitignore
|
|
96
119
|
setTimeout(() => {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _tagProcessor = _interopRequireDefault(require("../../../../../src/core/playwright/tagProcessor"));
|
|
5
|
+
var _logger = require("../../../../utils/logger");
|
|
6
|
+
jest.mock('../../../../utils/logger');
|
|
7
|
+
describe('TagProcessor', () => {
|
|
8
|
+
const editionOrder = ['edition1', 'edition2', 'edition3', 'edition4'];
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
jest.clearAllMocks();
|
|
11
|
+
});
|
|
12
|
+
test('should return tagArgs if no edition is provided', () => {
|
|
13
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
14
|
+
const userArgs = {
|
|
15
|
+
tags: 'tag1',
|
|
16
|
+
edition: null
|
|
17
|
+
};
|
|
18
|
+
const result = tagProcessor.processTags(userArgs);
|
|
19
|
+
expect(result).toBe('tag1');
|
|
20
|
+
});
|
|
21
|
+
test('should handle a single edition with <= operator', () => {
|
|
22
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
23
|
+
const userArgs = {
|
|
24
|
+
tags: 'tag1',
|
|
25
|
+
edition: '<=edition2'
|
|
26
|
+
};
|
|
27
|
+
const result = tagProcessor.processTags(userArgs);
|
|
28
|
+
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
29
|
+
});
|
|
30
|
+
test('should handle a single edition with >= operator', () => {
|
|
31
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
32
|
+
const userArgs = {
|
|
33
|
+
tags: 'tag1',
|
|
34
|
+
edition: '>=edition2'
|
|
35
|
+
};
|
|
36
|
+
const result = tagProcessor.processTags(userArgs);
|
|
37
|
+
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
38
|
+
});
|
|
39
|
+
test('should handle a single edition with < operator', () => {
|
|
40
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
41
|
+
const userArgs = {
|
|
42
|
+
tags: 'tag1',
|
|
43
|
+
edition: '<edition3'
|
|
44
|
+
};
|
|
45
|
+
const result = tagProcessor.processTags(userArgs);
|
|
46
|
+
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
47
|
+
});
|
|
48
|
+
test('should handle a single edition with > operator', () => {
|
|
49
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
50
|
+
const userArgs = {
|
|
51
|
+
tags: 'tag1',
|
|
52
|
+
edition: '>edition1'
|
|
53
|
+
};
|
|
54
|
+
const result = tagProcessor.processTags(userArgs);
|
|
55
|
+
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
56
|
+
});
|
|
57
|
+
test('should handle a single edition with no operator', () => {
|
|
58
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
59
|
+
const userArgs = {
|
|
60
|
+
tags: 'tag1',
|
|
61
|
+
edition: 'edition2'
|
|
62
|
+
};
|
|
63
|
+
const result = tagProcessor.processTags(userArgs);
|
|
64
|
+
expect(result).toBe('tag1 and not (@edition_edition1 or @edition_edition3 or @edition_edition4)');
|
|
65
|
+
});
|
|
66
|
+
test('should log a message if edition is not found', () => {
|
|
67
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
68
|
+
const userArgs = {
|
|
69
|
+
tags: 'tag1',
|
|
70
|
+
edition: 'nonexistentEdition'
|
|
71
|
+
};
|
|
72
|
+
const result = tagProcessor.processTags(userArgs);
|
|
73
|
+
expect(result).toBe('tag1');
|
|
74
|
+
expect(_logger.Logger.log).toHaveBeenCalledWith(_logger.Logger.INFO_TYPE, expect.stringContaining('No matching editions for nonexistentEdition found.'));
|
|
75
|
+
});
|
|
76
|
+
test('should handle multiple editions', () => {
|
|
77
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
78
|
+
const userArgs = {
|
|
79
|
+
tags: 'tag1',
|
|
80
|
+
edition: 'edition1,edition3'
|
|
81
|
+
};
|
|
82
|
+
const result = tagProcessor.processTags(userArgs);
|
|
83
|
+
expect(result).toBe('tag1 and not (@edition_edition2 or @edition_edition4)');
|
|
84
|
+
});
|
|
85
|
+
test('should build tags correctly when tags are empty', () => {
|
|
86
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
87
|
+
const userArgs = {
|
|
88
|
+
tags: '',
|
|
89
|
+
edition: 'edition1'
|
|
90
|
+
};
|
|
91
|
+
const result = tagProcessor.processTags(userArgs);
|
|
92
|
+
expect(result).toBe('not (@edition_edition2 or @edition_edition3 or @edition_edition4)');
|
|
93
|
+
});
|
|
94
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _validateFeature = _interopRequireDefault(require("../../../../core/playwright/validateFeature"));
|
|
5
|
+
var _parseUserArgs = _interopRequireDefault(require("../../../../core/playwright/helpers/parseUserArgs"));
|
|
6
|
+
var _readConfigFile = require("../../../../core/playwright/readConfigFile");
|
|
7
|
+
var _tagProcessor = _interopRequireDefault(require("../../../../core/playwright/tagProcessor"));
|
|
8
|
+
var _testRunner = require("../../../../core/playwright/test-runner");
|
|
9
|
+
var _logger = require("../../../../utils/logger");
|
|
10
|
+
jest.mock('../../../../core/playwright/helpers/parseUserArgs', () => ({
|
|
11
|
+
__esModule: true,
|
|
12
|
+
default: jest.fn()
|
|
13
|
+
}));
|
|
14
|
+
jest.mock('../../../../core/playwright/readConfigFile');
|
|
15
|
+
jest.mock('../../../../core/playwright/tagProcessor');
|
|
16
|
+
jest.mock('../../../../core/playwright/test-runner');
|
|
17
|
+
jest.mock('../../../../utils/logger', () => ({
|
|
18
|
+
__esModule: true,
|
|
19
|
+
Logger: {
|
|
20
|
+
log: jest.fn(),
|
|
21
|
+
SUCCESS_TYPE: 'success',
|
|
22
|
+
FAILURE_TYPE: 'failure'
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
describe('validateFeatureFiles', () => {
|
|
26
|
+
let tagProcessorInstance;
|
|
27
|
+
beforeEach(() => {
|
|
28
|
+
jest.clearAllMocks();
|
|
29
|
+
tagProcessorInstance = {
|
|
30
|
+
processTags: jest.fn()
|
|
31
|
+
};
|
|
32
|
+
_tagProcessor.default.mockImplementation(() => tagProcessorInstance);
|
|
33
|
+
});
|
|
34
|
+
test('runPreprocessing with correct arguments and log success', async () => {
|
|
35
|
+
const mockUserArgs = {
|
|
36
|
+
mode: 'dev'
|
|
37
|
+
};
|
|
38
|
+
_parseUserArgs.default.mockReturnValue(mockUserArgs);
|
|
39
|
+
const mockConfig = {
|
|
40
|
+
editionOrder: ["beta", "enterprice"]
|
|
41
|
+
};
|
|
42
|
+
_readConfigFile.generateConfigFromFile.mockReturnValue(mockConfig);
|
|
43
|
+
_readConfigFile.isUserConfigFileAvailable.mockReturnValue(true);
|
|
44
|
+
const mockTagArgs = ['@beta_admin'];
|
|
45
|
+
tagProcessorInstance.processTags.mockReturnValue(mockTagArgs);
|
|
46
|
+
_testRunner.runPreprocessing.mockResolvedValueOnce();
|
|
47
|
+
await (0, _validateFeature.default)();
|
|
48
|
+
expect(_parseUserArgs.default).toHaveBeenCalled();
|
|
49
|
+
expect(_readConfigFile.generateConfigFromFile).toHaveBeenCalled();
|
|
50
|
+
expect(_readConfigFile.isUserConfigFileAvailable).toHaveBeenCalled();
|
|
51
|
+
expect(tagProcessorInstance.processTags).toHaveBeenCalledWith(mockUserArgs);
|
|
52
|
+
expect(_testRunner.runPreprocessing).toHaveBeenCalledWith(mockTagArgs, expect.stringContaining('config-creator.js'));
|
|
53
|
+
expect(_logger.Logger.log).toHaveBeenCalledWith(_logger.Logger.SUCCESS_TYPE, 'Feature files validated successfully.');
|
|
54
|
+
});
|
|
55
|
+
test('runPreprocessing with playwright conf', async () => {
|
|
56
|
+
const mockTagArgs = ['@beta_admin'];
|
|
57
|
+
tagProcessorInstance.processTags.mockReturnValue(mockTagArgs);
|
|
58
|
+
_readConfigFile.isUserConfigFileAvailable.mockReturnValue(false);
|
|
59
|
+
_testRunner.runPreprocessing.mockResolvedValueOnce();
|
|
60
|
+
await (0, _validateFeature.default)();
|
|
61
|
+
expect(_testRunner.runPreprocessing).toHaveBeenCalledWith(mockTagArgs, expect.stringContaining('playwright.config.js'));
|
|
62
|
+
});
|
|
63
|
+
test('error when runPreprocessing fails', async () => {
|
|
64
|
+
const mockError = new Error('Test error');
|
|
65
|
+
_testRunner.runPreprocessing.mockRejectedValueOnce(mockError);
|
|
66
|
+
await await (0, _validateFeature.default)();
|
|
67
|
+
expect(_logger.Logger.log).toHaveBeenCalledWith(_logger.Logger.FAILURE_TYPE, `Error while validating the feature files - ${mockError}`);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _customFixturesHelper = require("../../../../../core/playwright/helpers/customFixturesHelper");
|
|
5
|
+
var _executionContext = _interopRequireDefault(require("../../../../../core/playwright/builtInFixtures/executionContext"));
|
|
6
|
+
jest.mock('../../../../../core/playwright/helpers/customFixturesHelper');
|
|
7
|
+
describe('executionContext', () => {
|
|
8
|
+
test('should pass actorInfo with details from getCustomAccountDetails to use', async () => {
|
|
9
|
+
const mockTags = ['tag1', 'tag2'];
|
|
10
|
+
const mockMainActorInfo = {
|
|
11
|
+
id: '1',
|
|
12
|
+
edition: 'enterprise',
|
|
13
|
+
orgName: 'orgName',
|
|
14
|
+
profile: 'admin',
|
|
15
|
+
email: 'xxx.x+uat@zohotest.com'
|
|
16
|
+
};
|
|
17
|
+
_customFixturesHelper.getCustomAccountDetails.mockReturnValue(mockMainActorInfo);
|
|
18
|
+
const use = jest.fn();
|
|
19
|
+
await _executionContext.default.executionContext({
|
|
20
|
+
$tags: mockTags
|
|
21
|
+
}, use);
|
|
22
|
+
expect(_customFixturesHelper.getCustomAccountDetails).toHaveBeenCalledWith(mockTags);
|
|
23
|
+
expect(use).toHaveBeenCalledWith({
|
|
24
|
+
actorInfo: mockMainActorInfo
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const Configuration = require("../../../../../core/playwright/configuration/Configuration");
|
|
4
|
+
const {
|
|
5
|
+
combineConfiguration
|
|
6
|
+
} = require("../../../../../core/playwright/configuration/ConfigurationHelper");
|
|
7
|
+
jest.mock('../../../../../core/playwright/configuration/ConfigurationHelper', () => ({
|
|
8
|
+
combineConfiguration: jest.fn()
|
|
9
|
+
}));
|
|
10
|
+
describe('Configuration Class', () => {
|
|
11
|
+
let config;
|
|
12
|
+
let sampleData;
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
// Sample data as a JSON object
|
|
15
|
+
sampleData = {
|
|
16
|
+
headless: false,
|
|
17
|
+
trace: true,
|
|
18
|
+
video: true,
|
|
19
|
+
bddMode: true
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Initialize the Configuration instance with sample data
|
|
23
|
+
config = new Configuration(sampleData);
|
|
24
|
+
});
|
|
25
|
+
test('should add new key-value pair to the configuration', () => {
|
|
26
|
+
config.add('newKey', 'newValue');
|
|
27
|
+
expect(config.get('newKey')).toBe('newValue');
|
|
28
|
+
});
|
|
29
|
+
test('should combine configurations correctly using addAll', () => {
|
|
30
|
+
const newConfig = new Configuration({
|
|
31
|
+
newKey1: 'newValue1',
|
|
32
|
+
trace: false // existing key to test override
|
|
33
|
+
});
|
|
34
|
+
const combinedConfig = {
|
|
35
|
+
headless: false,
|
|
36
|
+
trace: false,
|
|
37
|
+
// trace overridden
|
|
38
|
+
video: true,
|
|
39
|
+
bddMode: true,
|
|
40
|
+
newKey1: 'newValue1'
|
|
41
|
+
};
|
|
42
|
+
combineConfiguration.mockReturnValue(combinedConfig);
|
|
43
|
+
config.addAll(newConfig);
|
|
44
|
+
expect(combineConfiguration).toHaveBeenCalledWith(sampleData, newConfig.getAll());
|
|
45
|
+
expect(config.getAll()).toEqual(combinedConfig);
|
|
46
|
+
});
|
|
47
|
+
test('should return correct value for a given key', () => {
|
|
48
|
+
expect(config.get('headless')).toBe(false);
|
|
49
|
+
expect(config.get('trace')).toBe(true);
|
|
50
|
+
expect(config.get('video')).toBe(true);
|
|
51
|
+
expect(config.get('bddMode')).toBe(true);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _additionalProfiles = require("../../../../../core/playwright/helpers/additionalProfiles");
|
|
4
|
+
jest.mock('../../../../../core/playwright/helpers/auth/getUsers', () => ({
|
|
5
|
+
getUserForSelectedEditionAndProfile: jest.fn((edition, profile, betaFeature, portalInfo) => {
|
|
6
|
+
return {
|
|
7
|
+
email: 'manager.m@zohotest.com',
|
|
8
|
+
id: '1',
|
|
9
|
+
edition: edition || 'enterprise',
|
|
10
|
+
orgName: 'orgName',
|
|
11
|
+
profile: profile || 'admin',
|
|
12
|
+
betaFeature: betaFeature || null,
|
|
13
|
+
portalInfo: portalInfo || null
|
|
14
|
+
};
|
|
15
|
+
})
|
|
16
|
+
}));
|
|
17
|
+
const defaultTags = ['@profile_admin', '@edition_enterprise'];
|
|
18
|
+
const editionTags = ['@profile_admin', '@edition_enterprise', '@additional_profile_manager', '@additional_profile_agent'];
|
|
19
|
+
const editionAndPortalTags = ['@profile_admin', '@edition_enterprise', '@beta_parentchild', '@portal_clientuat2', '@additional_profile_manager'];
|
|
20
|
+
describe('additionalProfiles', () => {
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
jest.clearAllMocks();
|
|
23
|
+
});
|
|
24
|
+
test('should return empty object when no additional profile tags are present', () => {
|
|
25
|
+
const result = (0, _additionalProfiles.additionProfiles)(defaultTags);
|
|
26
|
+
expect(result).toEqual({});
|
|
27
|
+
});
|
|
28
|
+
test('should return additional profile actors when additional profile tags and editionInfo are present', () => {
|
|
29
|
+
const result = (0, _additionalProfiles.additionProfiles)(editionTags);
|
|
30
|
+
expect(Object.keys(result)).toEqual(['manager', 'agent']);
|
|
31
|
+
expect(result.manager).toHaveProperty('email');
|
|
32
|
+
expect(result.agent).toHaveProperty('email');
|
|
33
|
+
expect(result.manager.profile).toBe('manager');
|
|
34
|
+
expect(result.manager.betaFeature).toBe(null);
|
|
35
|
+
expect(result.agent.portalInfo).toBe(null);
|
|
36
|
+
});
|
|
37
|
+
test('should return additional profile actors when all actor details are present', () => {
|
|
38
|
+
const result = (0, _additionalProfiles.additionProfiles)(editionAndPortalTags);
|
|
39
|
+
expect(Object.keys(result)).toEqual(['manager']);
|
|
40
|
+
expect(result.manager).toHaveProperty('email');
|
|
41
|
+
expect(result.manager.profile).toBe('manager');
|
|
42
|
+
expect(result.manager.betaFeature).toBe("parentchild");
|
|
43
|
+
expect(result.manager.portalInfo).toBe("clientuat2");
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _fs = require("fs");
|
|
5
|
+
var _path = _interopRequireDefault(require("path"));
|
|
6
|
+
var _configFileNameProvider = require("../../../../../core/playwright/helpers/configFileNameProvider");
|
|
7
|
+
jest.mock('fs');
|
|
8
|
+
jest.mock('path');
|
|
9
|
+
const mockCwd = '/mock/current/directory';
|
|
10
|
+
_path.default.resolve = jest.fn();
|
|
11
|
+
process.cwd = jest.fn(() => mockCwd);
|
|
12
|
+
describe('getUATFileName', () => {
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
jest.clearAllMocks();
|
|
15
|
+
});
|
|
16
|
+
test('return the pipeline matched config files for pipeline matched files exists', () => {
|
|
17
|
+
const mode = 'cd';
|
|
18
|
+
const mockPath = `${mockCwd}/uat/conf/${mode}/uat.config.js`;
|
|
19
|
+
_fs.existsSync.mockReturnValue(true);
|
|
20
|
+
_path.default.resolve.mockImplementation((...args) => args.join('/'));
|
|
21
|
+
const result = (0, _configFileNameProvider.getUATFileName)(mode);
|
|
22
|
+
expect(_fs.existsSync).toHaveBeenCalledWith(mockPath);
|
|
23
|
+
expect(result).toBe(mockPath);
|
|
24
|
+
});
|
|
25
|
+
test('return the default config files for pipeline matched files not exists', () => {
|
|
26
|
+
const mode = 'ci';
|
|
27
|
+
const defaultPath = `${mockCwd}/uat/conf/default/uat.config.js`;
|
|
28
|
+
_fs.existsSync.mockReturnValue(false);
|
|
29
|
+
_path.default.resolve.mockImplementation((...args) => args.join('/'));
|
|
30
|
+
const result = (0, _configFileNameProvider.getUATFileName)(mode);
|
|
31
|
+
expect(_fs.existsSync).toHaveBeenCalledWith(`${mockCwd}/uat/conf/${mode}/uat.config.js`);
|
|
32
|
+
expect(result).toBe(defaultPath);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _customFixturesHelper = require("../../../../../core/playwright/helpers/customFixturesHelper");
|
|
4
|
+
var _logger = require("../../../../../utils/logger");
|
|
5
|
+
var _getUsers = require("../../../../../core/playwright/helpers/auth/getUsers");
|
|
6
|
+
jest.mock('../../../../../core/playwright/helpers/auth/getUsers', () => ({
|
|
7
|
+
getUserForSelectedEditionAndProfile: jest.fn((edition, profile, betaFeature, portalInfo) => ({
|
|
8
|
+
email: 'manager.m@zohotest.com',
|
|
9
|
+
id: '1',
|
|
10
|
+
edition: edition || 'enterprise',
|
|
11
|
+
orgName: 'orgName',
|
|
12
|
+
profile: profile || 'admin',
|
|
13
|
+
betaFeature: betaFeature || null,
|
|
14
|
+
portalInfo: portalInfo || null
|
|
15
|
+
})),
|
|
16
|
+
getDefaultActor: jest.fn(() => ({
|
|
17
|
+
edition: 'enterprise',
|
|
18
|
+
profile: 'admin'
|
|
19
|
+
}))
|
|
20
|
+
}));
|
|
21
|
+
jest.mock('../../../../../utils/logger', () => ({
|
|
22
|
+
Logger: {
|
|
23
|
+
log: jest.fn(),
|
|
24
|
+
FAILURE_TYPE: 'FAILURE'
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
const mockTags = ['@profile_admin', '@edition_enterprise', '@beta_feature', '@portal_clientuat'];
|
|
28
|
+
describe('getCustomAccountDetails', () => {
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
jest.clearAllMocks();
|
|
31
|
+
});
|
|
32
|
+
test('returns selected user when any tag info is present', () => {
|
|
33
|
+
const result = (0, _customFixturesHelper.getCustomAccountDetails)(mockTags);
|
|
34
|
+
expect(_getUsers.getUserForSelectedEditionAndProfile).toHaveBeenCalledWith('enterprise', 'admin', 'feature', 'clientuat');
|
|
35
|
+
expect(result).toHaveProperty('email', 'manager.m@zohotest.com');
|
|
36
|
+
});
|
|
37
|
+
test('logs and returns undefined if getCustomAccountDetails function throws', () => {
|
|
38
|
+
const error = new Error('failed to get user');
|
|
39
|
+
_getUsers.getUserForSelectedEditionAndProfile.mockImplementation(() => {
|
|
40
|
+
throw error;
|
|
41
|
+
});
|
|
42
|
+
const result = (0, _customFixturesHelper.getCustomAccountDetails)(mockTags);
|
|
43
|
+
expect(_logger.Logger.log).toHaveBeenCalledWith(_logger.Logger.FAILURE_TYPE, 'Error while getting accounts details:', error);
|
|
44
|
+
expect(result).toBeUndefined();
|
|
45
|
+
});
|
|
46
|
+
test('returns default actor when no tag info is not provided', () => {
|
|
47
|
+
const result = (0, _customFixturesHelper.getCustomAccountDetails)([]);
|
|
48
|
+
expect(_getUsers.getDefaultActor).toHaveBeenCalledTimes(1);
|
|
49
|
+
expect(result).toEqual((0, _getUsers.getDefaultActor)());
|
|
50
|
+
});
|
|
51
|
+
});
|