@mablhq/playwright-tools 2.49.1
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/Globals.js +69 -0
- package/LICENSE.txt +29 -0
- package/README.md +219 -0
- package/api/ApiError.js +11 -0
- package/api/atlassian/bitBucketApiClient.js +81 -0
- package/api/atlassian/entities/CodeAnnotation.js +9 -0
- package/api/atlassian/entities/CodeReport.js +15 -0
- package/api/atlassian/entities/PullRequest.js +2 -0
- package/api/basicApiClient.js +293 -0
- package/api/entities/Browser.js +11 -0
- package/api/entities/Email.js +14 -0
- package/api/entities/FindStrategy.js +10 -0
- package/api/entities/Label.js +2 -0
- package/api/entities/VersionedObject.js +2 -0
- package/api/entities/Workspace.js +2 -0
- package/api/featureSet.js +44 -0
- package/api/mablApiClient.js +1070 -0
- package/api/mablApiClientFactory.js +79 -0
- package/api/types.js +10 -0
- package/auth/AuthClient.js +38 -0
- package/auth/OktaClient.js +97 -0
- package/browserEngines/browserEngine.js +41 -0
- package/browserEngines/browserEngines.js +14 -0
- package/browserEngines/chromiumBrowserEngine.js +177 -0
- package/browserEngines/firefoxBrowserEngine.js +134 -0
- package/browserEngines/unsupportedBrowserEngine.js +29 -0
- package/browserEngines/webkitBrowerEngine.js +50 -0
- package/browserLauncher/browser.js +2 -0
- package/browserLauncher/browserEvent.js +11 -0
- package/browserLauncher/browserLauncher.js +17 -0
- package/browserLauncher/browserLauncherEventEmitter.js +2 -0
- package/browserLauncher/browserLauncherFactory.js +30 -0
- package/browserLauncher/elementHandle.js +30 -0
- package/browserLauncher/errors.js +26 -0
- package/browserLauncher/frame.js +17 -0
- package/browserLauncher/frameBase.js +10 -0
- package/browserLauncher/httpRequest.js +2 -0
- package/browserLauncher/httpResponse.js +2 -0
- package/browserLauncher/jsHandle.js +2 -0
- package/browserLauncher/page.js +2 -0
- package/browserLauncher/pageEvent.js +17 -0
- package/browserLauncher/playwrightBrowserLauncher/browserDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumBrowserDelegate.js +61 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumElementHandleDelegate.js +129 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumFrameDelegate.js +24 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumPageDelegate.js +145 -0
- package/browserLauncher/playwrightBrowserLauncher/elementHandleDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxBrowserDelegate.js +50 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxElementHandleDelegate.js +11 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxFrameDelegate.js +36 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxPageDelegate.js +15 -0
- package/browserLauncher/playwrightBrowserLauncher/frameDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/internals.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractBrowserDelegate.js +15 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractElementHandleDelegate.js +73 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractFrameDelegate.js +13 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractPageDelegate.js +81 -0
- package/browserLauncher/playwrightBrowserLauncher/pageDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightApiResponse.js +18 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +259 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +97 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +319 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +265 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +76 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpResponse.js +26 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +377 -0
- package/browserLauncher/playwrightBrowserLauncher/simplePlaywrightLogger.js +36 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitBrowserDelegate.js +50 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitElementHandleDelegate.js +16 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitFrameDelegate.js +19 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitPageDelegate.js +15 -0
- package/browserLauncher/playwrightBrowserLauncher/wrappers.js +25 -0
- package/browserLauncher/types.js +28 -0
- package/browserLauncher/utils.js +9 -0
- package/cli.js +66 -0
- package/commands/applications/applications.js +5 -0
- package/commands/applications/applications_cmds/describe.js +21 -0
- package/commands/applications/applications_cmds/list.js +56 -0
- package/commands/auth/auth.js +5 -0
- package/commands/auth/auth_cmds/activate-key.js +38 -0
- package/commands/auth/auth_cmds/clear.js +10 -0
- package/commands/auth/auth_cmds/info.js +10 -0
- package/commands/auth/auth_cmds/login.js +10 -0
- package/commands/branches/branches.js +5 -0
- package/commands/branches/branches_cmds/create.js +56 -0
- package/commands/branches/branches_cmds/describe.js +50 -0
- package/commands/branches/branches_cmds/list.js +84 -0
- package/commands/branches/branches_cmds/merge.js +56 -0
- package/commands/browserTypes.js +20 -0
- package/commands/commandUtil/awaitCompletion.js +67 -0
- package/commands/commandUtil/branches.js +44 -0
- package/commands/commandUtil/codeInsights.js +181 -0
- package/commands/commandUtil/describe.js +32 -0
- package/commands/commandUtil/fileUtil.js +50 -0
- package/commands/commandUtil/interfaces.js +4 -0
- package/commands/commandUtil/list.js +70 -0
- package/commands/commandUtil/util.js +127 -0
- package/commands/commandUtil/versionUtil.js +33 -0
- package/commands/config/config.js +5 -0
- package/commands/config/config_cmds/configKeys.js +28 -0
- package/commands/config/config_cmds/delete.js +29 -0
- package/commands/config/config_cmds/get.js +52 -0
- package/commands/config/config_cmds/install.js +119 -0
- package/commands/config/config_cmds/list.js +39 -0
- package/commands/config/config_cmds/set.js +80 -0
- package/commands/constants.js +160 -0
- package/commands/credentials/credentials.js +5 -0
- package/commands/credentials/credentials_cmds/list.js +66 -0
- package/commands/datatables/datatables.js +5 -0
- package/commands/datatables/datatables_cmds/create.js +61 -0
- package/commands/datatables/datatables_cmds/describe.js +17 -0
- package/commands/datatables/datatables_cmds/export.js +86 -0
- package/commands/datatables/datatables_cmds/list.js +18 -0
- package/commands/datatables/datatables_cmds/scenarios.js +35 -0
- package/commands/datatables/datatables_cmds/update.js +120 -0
- package/commands/datatables/utils.js +145 -0
- package/commands/deploy/deploy.js +5 -0
- package/commands/deploy/deploy_cmds/awaitDeploymentCompletion.js +100 -0
- package/commands/deploy/deploy_cmds/create.js +342 -0
- package/commands/deploy/deploy_cmds/describe.js +54 -0
- package/commands/deploy/deploy_cmds/executionResultPresenter.js +117 -0
- package/commands/deploy/deploy_cmds/list.js +74 -0
- package/commands/deploy/deploy_cmds/watch.js +44 -0
- package/commands/environments/environments.js +5 -0
- package/commands/environments/environments_cmds/build-files.js +5 -0
- package/commands/environments/environments_cmds/build-files_cmds/add.js +73 -0
- package/commands/environments/environments_cmds/build-files_cmds/list.js +54 -0
- package/commands/environments/environments_cmds/build-files_cmds/update.js +71 -0
- package/commands/environments/environments_cmds/create.js +153 -0
- package/commands/environments/environments_cmds/delete.js +32 -0
- package/commands/environments/environments_cmds/describe.js +28 -0
- package/commands/environments/environments_cmds/list.js +56 -0
- package/commands/environments/environments_cmds/update.js +46 -0
- package/commands/environments/environments_cmds/urls.js +5 -0
- package/commands/environments/environments_cmds/urls_cmds/add.js +91 -0
- package/commands/environments/environments_cmds/urls_cmds/list.js +49 -0
- package/commands/flows/flows.js +5 -0
- package/commands/flows/flows_cmds/export.js +78 -0
- package/commands/flows/flows_cmds/list.js +64 -0
- package/commands/internal/internal.js +6 -0
- package/commands/link-agents/link-agents.js +5 -0
- package/commands/link-agents/link-agents_cmds/delete.js +38 -0
- package/commands/link-agents/link-agents_cmds/list.js +131 -0
- package/commands/link-agents/link-agents_cmds/terminate.js +31 -0
- package/commands/mobile-build-files/mobile-build-files.js +5 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/delete.js +31 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/download.js +50 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/list.js +72 -0
- package/commands/mobile-build-files/mobile-build-files_cmds/upload.js +101 -0
- package/commands/plans/plans.js +5 -0
- package/commands/plans/plans_cmds/describe.js +23 -0
- package/commands/plans/plans_cmds/list.js +63 -0
- package/commands/test-runs/test-runs.js +5 -0
- package/commands/test-runs/test-runs_cmds/export.js +62 -0
- package/commands/tests/mobileEmulationUtil.js +46 -0
- package/commands/tests/tests.js +5 -0
- package/commands/tests/testsUtil.js +538 -0
- package/commands/tests/tests_cmds/create.js +130 -0
- package/commands/tests/tests_cmds/edit.js +111 -0
- package/commands/tests/tests_cmds/export.js +145 -0
- package/commands/tests/tests_cmds/import.js +5 -0
- package/commands/tests/tests_cmds/import_cmds/import_playwright.js +439 -0
- package/commands/tests/tests_cmds/import_cmds/import_selenium.js +295 -0
- package/commands/tests/tests_cmds/list.js +94 -0
- package/commands/tests/tests_cmds/run-cloud.js +314 -0
- package/commands/tests/tests_cmds/run-mobile.js +260 -0
- package/commands/tests/tests_cmds/run.js +314 -0
- package/commands/tests/tests_cmds/runUtils.js +60 -0
- package/commands/tests/tests_cmds/trainerUtil.js +12 -0
- package/commands/users/users.js +5 -0
- package/commands/users/users_cmds/list.js +58 -0
- package/commands/workspaces/workspace_cmds/copy.js +108 -0
- package/commands/workspaces/workspace_cmds/describe.js +21 -0
- package/commands/workspaces/workspace_cmds/list.js +67 -0
- package/commands/workspaces/workspaces.js +5 -0
- package/core/entityValidation/environmentsValidation.js +7 -0
- package/core/entityValidation/stepValidation.js +15 -0
- package/core/execution/ApiTestUtils.js +1060 -0
- package/core/execution/MailboxConstants.js +4 -0
- package/core/execution/PostmanUtils.js +53 -0
- package/core/execution/RunConfig.js +2 -0
- package/core/execution/TestResult.js +15 -0
- package/core/execution/VariableUtils.js +154 -0
- package/core/execution/VariablesSummary.js +2 -0
- package/core/execution/basic-types.js +2 -0
- package/core/execution/newman-types.js +42 -0
- package/core/messaging/actions/MobileTrainingActions.js +17 -0
- package/core/messaging/actions/pdfActions.js +27 -0
- package/core/messaging/actions/runnerActions.js +18 -0
- package/core/messaging/actions/trainingSessionActions.js +38 -0
- package/core/messaging/logLineMessaging.js +50 -0
- package/core/messaging/messaging.js +130 -0
- package/core/messaging/pageMessaging.js +9 -0
- package/core/trainer/openUtils.js +47 -0
- package/core/trainer/trainingSessions-types.js +35 -0
- package/core/trainer/trainingSessions.js +151 -0
- package/core/util.js +52 -0
- package/coreWebVitals/index.js +77 -0
- package/domUtil/index.js +1 -0
- package/env/defaultEnv.js +17 -0
- package/env/dev.js +17 -0
- package/env/env.js +76 -0
- package/env/local.js +17 -0
- package/env/prod.js +17 -0
- package/execution/index.js +8 -0
- package/execution/index.js.LICENSE.txt +254 -0
- package/execution/runAppiumServer.js +145 -0
- package/functions/apiTest/utils.js +47 -0
- package/functions/types.js +2 -0
- package/functions/utils.js +12 -0
- package/http/MablHttpAgent.js +73 -0
- package/http/RequestFilteringHttpAgent.js +119 -0
- package/http/RequestSecurityError.js +13 -0
- package/http/axiosProxyConfig.js +101 -0
- package/http/httpUtil.js +73 -0
- package/http/requestInterceptor.js +206 -0
- package/index.d.ts +241 -0
- package/index.js +14 -0
- package/mablApi/index.js +1 -0
- package/mablscript/MablAction.js +102 -0
- package/mablscript/MablStep.js +191 -0
- package/mablscript/MablStepV2.js +73 -0
- package/mablscript/MablSymbol.js +35 -0
- package/mablscript/actions/AwaitDownloadAction.js +14 -0
- package/mablscript/actions/AwaitPDFDownloadAction.js +19 -0
- package/mablscript/actions/ConditionAction.js +123 -0
- package/mablscript/actions/CountAction.js +16 -0
- package/mablscript/actions/ExtractAction.js +71 -0
- package/mablscript/actions/FindAction.js +301 -0
- package/mablscript/actions/GenerateEmailAddressAction.js +14 -0
- package/mablscript/actions/GenerateRandomStringAction.js +20 -0
- package/mablscript/actions/GetUrlAction.js +22 -0
- package/mablscript/actions/GetVariableValue.js +31 -0
- package/mablscript/actions/GetViewportAction.js +17 -0
- package/mablscript/actions/JavaScriptAction.js +219 -0
- package/mablscript/diffing/diffingUtil.js +229 -0
- package/mablscript/importer.js +576 -0
- package/mablscript/mobile/steps/CreateVariableMobileStep.js +53 -0
- package/mablscript/mobile/steps/EnterTextStep.js +45 -0
- package/mablscript/mobile/steps/HideKeyboardStep.js +20 -0
- package/mablscript/mobile/steps/InstallAppStep.js +22 -0
- package/mablscript/mobile/steps/NavigateBackStep.js +20 -0
- package/mablscript/mobile/steps/NavigateHomeStep.js +21 -0
- package/mablscript/mobile/steps/OpenAppStep.js +22 -0
- package/mablscript/mobile/steps/OpenLinkStep.js +19 -0
- package/mablscript/mobile/steps/PrepareSessionStep.js +19 -0
- package/mablscript/mobile/steps/PushFileStep.js +27 -0
- package/mablscript/mobile/steps/ScrollStep.js +87 -0
- package/mablscript/mobile/steps/SetOrientationStep.js +20 -0
- package/mablscript/mobile/steps/TapStep.js +37 -0
- package/mablscript/mobile/steps/UninstallAppStep.js +22 -0
- package/mablscript/mobile/steps/actions/MobileFindAction.js +23 -0
- package/mablscript/mobile/steps/stepUtil.js +113 -0
- package/mablscript/mobile/tests/StepTestsUtil.js +20 -0
- package/mablscript/mobile/tests/TestMobileFindDescriptors.js +282 -0
- package/mablscript/mobile/tests/steps/CreateVariableMobileStep.mobiletest.js +298 -0
- package/mablscript/mobile/tests/steps/EnterTextStep.mobiletest.js +79 -0
- package/mablscript/mobile/tests/steps/GeneralHumanization.mobiletest.js +304 -0
- package/mablscript/mobile/tests/steps/HideKeyboardStep.mobiletest.js +27 -0
- package/mablscript/mobile/tests/steps/InstallAppStep.mobiletest.js +20 -0
- package/mablscript/mobile/tests/steps/NavigateBackStep.mobiletest.js +27 -0
- package/mablscript/mobile/tests/steps/NavigateHomeStep.mobiletest.js +27 -0
- package/mablscript/mobile/tests/steps/OpenLinkStep.mobiletest.js +20 -0
- package/mablscript/mobile/tests/steps/PushFileStep.mobiletest.js +55 -0
- package/mablscript/mobile/tests/steps/ScrollStep.mobiletest.js +386 -0
- package/mablscript/mobile/tests/steps/SetOrientationStep.mobiletest.js +32 -0
- package/mablscript/mobile/tests/steps/TapStep.mobiletest.js +57 -0
- package/mablscript/mobile/tests/steps/UninstallAppStep.mobiletest.js +20 -0
- package/mablscript/steps/AbstractAssertionsAndVariablesStep.js +52 -0
- package/mablscript/steps/AccessibilityCheck.js +108 -0
- package/mablscript/steps/ActionsUtils.js +18 -0
- package/mablscript/steps/AssertStep.js +318 -0
- package/mablscript/steps/AssertStepOld.js +159 -0
- package/mablscript/steps/AwaitTabStep.js +69 -0
- package/mablscript/steps/AwaitUploadsStep.js +26 -0
- package/mablscript/steps/ClearCookiesStep.js +26 -0
- package/mablscript/steps/ClickAndHoldStep.js +76 -0
- package/mablscript/steps/ClickStep.js +58 -0
- package/mablscript/steps/CookieUtils.js +54 -0
- package/mablscript/steps/CreateVariableStep.js +236 -0
- package/mablscript/steps/DatabaseQueryStep.js +28 -0
- package/mablscript/steps/DoubleClickStep.js +64 -0
- package/mablscript/steps/DownloadStep.js +96 -0
- package/mablscript/steps/EchoStep.js +34 -0
- package/mablscript/steps/ElseIfConditionStep.js +32 -0
- package/mablscript/steps/ElseStep.js +27 -0
- package/mablscript/steps/EndStep.js +27 -0
- package/mablscript/steps/EnterAuthCodeStep.js +59 -0
- package/mablscript/steps/EnterTextStep.js +96 -0
- package/mablscript/steps/EvaluateFlowStep.js +51 -0
- package/mablscript/steps/EvaluateJavaScriptStep.js +50 -0
- package/mablscript/steps/HoverStep.js +63 -0
- package/mablscript/steps/IfConditionStep.js +191 -0
- package/mablscript/steps/NavigateStep.js +30 -0
- package/mablscript/steps/OpenEmailStep.js +46 -0
- package/mablscript/steps/ReleaseStep.js +76 -0
- package/mablscript/steps/RemoveCookieStep.js +36 -0
- package/mablscript/steps/RightClickStep.js +58 -0
- package/mablscript/steps/SelectStep.js +82 -0
- package/mablscript/steps/SendHttpRequestStep.js +48 -0
- package/mablscript/steps/SendKeyStep.js +84 -0
- package/mablscript/steps/SetCookieStep.js +70 -0
- package/mablscript/steps/SetFilesStep.js +71 -0
- package/mablscript/steps/SetViewportStep.js +38 -0
- package/mablscript/steps/SwitchContextStep.js +122 -0
- package/mablscript/steps/SyntheticStep.js +20 -0
- package/mablscript/steps/VisitUrlStep.js +68 -0
- package/mablscript/steps/WaitStep.js +37 -0
- package/mablscript/steps/WaitUntilStep.js +46 -0
- package/mablscript/types/AccessibilityCheckStepDescriptor.js +2 -0
- package/mablscript/types/AccessibilityCheckTypes.js +9 -0
- package/mablscript/types/AssertionsAndVariablesStepDescriptor.js +2 -0
- package/mablscript/types/AwaitTabDescriptor.js +2 -0
- package/mablscript/types/AwaitUploadStepDescriptor.js +2 -0
- package/mablscript/types/ClearCookiesStepDescriptor.js +2 -0
- package/mablscript/types/ClickAndHoldStepDescriptor.js +2 -0
- package/mablscript/types/ClickStepDescriptor.js +2 -0
- package/mablscript/types/ConditionDescriptor.js +133 -0
- package/mablscript/types/CountDescriptor.js +2 -0
- package/mablscript/types/CreateVariableStepDescriptor.js +12 -0
- package/mablscript/types/DownloadStepDescriptor.js +2 -0
- package/mablscript/types/EchoStepDescriptor.js +2 -0
- package/mablscript/types/EnterTextStepDescriptor.js +2 -0
- package/mablscript/types/EvaluateFlowStepDescriptor.js +2 -0
- package/mablscript/types/EvaluateJavaScriptStepDescriptor.js +2 -0
- package/mablscript/types/ExtractDescriptor.js +21 -0
- package/mablscript/types/GetCurrentLocationDescriptor.js +12 -0
- package/mablscript/types/GetVariableDescriptor.js +16 -0
- package/mablscript/types/GetViewportDescriptor.js +12 -0
- package/mablscript/types/HoverStepDescriptor.js +2 -0
- package/mablscript/types/NavigateStepDescriptor.js +7 -0
- package/mablscript/types/OpenEmailStepDescriptor.js +2 -0
- package/mablscript/types/OperatingSystemDescriptor.js +45 -0
- package/mablscript/types/ReleaseStepDescriptor.js +7 -0
- package/mablscript/types/RemoveCookieStepDescriptor.js +2 -0
- package/mablscript/types/SelectStepDescriptor.js +2 -0
- package/mablscript/types/SendHttpRequestTypes.js +2 -0
- package/mablscript/types/SendKeyStepDescriptor.js +30 -0
- package/mablscript/types/SetCookieStepDescriptor.js +2 -0
- package/mablscript/types/SetFilesStepDescriptor.js +2 -0
- package/mablscript/types/SetViewportStepDescriptor.js +2 -0
- package/mablscript/types/SnippetsDescriptor.js +36 -0
- package/mablscript/types/StepDescriptor.js +2 -0
- package/mablscript/types/SwitchContextStepDescriptor.js +15 -0
- package/mablscript/types/VariableNamespace.js +17 -0
- package/mablscript/types/VisitUrlStepDescriptor.js +2 -0
- package/mablscript/types/WaitStepDescriptor.js +2 -0
- package/mablscript/types/WaitUntilStepDescriptor.js +2 -0
- package/mablscript/types/mobile/CreateVariableMobileStepDescriptor.js +9 -0
- package/mablscript/types/mobile/EnterTextStepDescriptor.js +2 -0
- package/mablscript/types/mobile/HideKeyboardStepDescriptor.js +2 -0
- package/mablscript/types/mobile/InstallAppStepDescriptor.js +2 -0
- package/mablscript/types/mobile/NavigateBackStepDescriptor.js +2 -0
- package/mablscript/types/mobile/NavigateHomeStepDescriptor.js +2 -0
- package/mablscript/types/mobile/OpenAppStepDescriptor.js +2 -0
- package/mablscript/types/mobile/OpenLinkStepDescriptor.js +2 -0
- package/mablscript/types/mobile/PrepareSessionStepDescriptor.js +2 -0
- package/mablscript/types/mobile/PushFileDescriptor.js +2 -0
- package/mablscript/types/mobile/ScrollStepDescriptor.js +32 -0
- package/mablscript/types/mobile/SetOrientationStepDescriptor.js +8 -0
- package/mablscript/types/mobile/StepWithMobileFindDescriptor.js +8 -0
- package/mablscript/types/mobile/TapStepDescriptor.js +8 -0
- package/mablscript/types/mobile/UninstallAppStepDescriptor.js +2 -0
- package/mablscriptFind/index.js +2 -0
- package/mablscriptFind/index.js.LICENSE.txt +25 -0
- package/middleware.js +42 -0
- package/mobile/index.js +2 -0
- package/mobile/types.js +8 -0
- package/observers/ObserverBase.js +11 -0
- package/observers/mockObserver.js +47 -0
- package/package.json +107 -0
- package/popupDismissal/candidate.js +2 -0
- package/popupDismissal/index.js +255 -0
- package/providers/authenticationProvider.js +254 -0
- package/providers/cliConfigProvider.js +271 -0
- package/providers/exportRequestProvider.js +196 -0
- package/providers/logging/loggingProvider.js +90 -0
- package/providers/scmContextInterfaces.js +14 -0
- package/providers/scmContextProvider.js +335 -0
- package/providers/scmContextProviderV2.js +122 -0
- package/providers/types.js +9 -0
- package/proxy/index.js +2 -0
- package/proxy/index.js.LICENSE.txt +12 -0
- package/proxy/lib/xpath.js +1 -0
- package/reporters/__tests__/resources/sampleData.js +162 -0
- package/reporters/mochAwesome/interfaces.js +2 -0
- package/reporters/mochAwesome/mochAwesomeReporter.js +227 -0
- package/reporters/reporter.js +46 -0
- package/resources/actionabilityCheck.js +160 -0
- package/resources/coreWebVitals.js +1 -0
- package/resources/mablFind.js +2 -0
- package/resources/media/mabl_test_audio.wav +0 -0
- package/resources/media/mabl_test_pattern.y4m +3 -0
- package/resources/pdf-viewer/EmbeddedPdfHandler.js +1 -0
- package/resources/pdf-viewer/embeddedPdfDetection.js +225 -0
- package/resources/pdf-viewer/index.html +1 -0
- package/resources/pdf-viewer/index.js +2 -0
- package/resources/pdf-viewer/libEmbeddedPdfHandler.js +279 -0
- package/resources/pdf-viewer/libmablPdfViewer.js +21909 -0
- package/resources/pdf-viewer/mabl_attention_move.gif +0 -0
- package/resources/pdf-viewer/mabl_error_artwork_Unplugged.gif +0 -0
- package/resources/pdf-viewer/pdf.worker.9251738a897f697389be.js +2 -0
- package/resources/pdf-viewer/pdf.worker.9e2021092643447a5b9f.js +81 -0
- package/resources/popupDismissal.js +1 -0
- package/resources/webdriver.js +19 -0
- package/socketTunnel/index.js +2 -0
- package/socketTunnel/index.js.LICENSE.txt +68 -0
- package/upload/index.js +2 -0
- package/upload/index.js.LICENSE.txt +27 -0
- package/util/CloudStorageWriter.js +45 -0
- package/util/FileCache.js +180 -0
- package/util/IdentifierUtil.js +57 -0
- package/util/InternalMetricsTrackingSingleton.js +36 -0
- package/util/Lazy.js +90 -0
- package/util/MobileAppFileCache.js +103 -0
- package/util/RichPromise.js +53 -0
- package/util/TestOutputWriter.js +104 -0
- package/util/actionabilityUtil.js +165 -0
- package/util/analytics-events.js +14 -0
- package/util/analytics.js +176 -0
- package/util/asyncUtil.js +61 -0
- package/util/browserTestUtils.js +17 -0
- package/util/clickUtil.js +68 -0
- package/util/downloadUtil.js +87 -0
- package/util/encodingUtil.js +50 -0
- package/util/fileUploadUtil.js +146 -0
- package/util/javaScriptStepMigration.js +115 -0
- package/util/jestUtil.js +21 -0
- package/util/logUtils.js +131 -0
- package/util/markdownUtil.js +125 -0
- package/util/postInstallMessage.js +14 -0
- package/util/pureUtil.js +175 -0
- package/util/resourceUtil.js +90 -0
- package/util/timeUtil.js +31 -0
- package/utilities.js +7 -0
- package/webdriver/index.js +44 -0
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.parseBrowserType = exports.toBasicHttpAuthenticationCredentials = exports.logTestInfoIfPresent = exports.milliSecondsToSeconds = exports.calculateTotalTimeSeconds = exports.headerArrayToRecord = exports.getLinkCrawlerUrlOverride = exports.extractTestRunConfig = exports.pullDownTestRunConfig = exports.validateRunCommandWithLabels = exports.validateRunEditCommand = exports.cleanupTestResources = exports.sleep = exports.editTheTest = exports.runTheTest = exports.prepareTrainerForSplitPlayback = exports.cleanUpInitialPages = exports.getExtensionBackgroundPageWithCliTool = exports.createBrowserForExecutionEngine = exports.createBrowser = exports.getFinalUrl = void 0;
|
|
30
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
31
|
+
const fs = __importStar(require("fs"));
|
|
32
|
+
const os = __importStar(require("os"));
|
|
33
|
+
const path = __importStar(require("path"));
|
|
34
|
+
const browserLauncher_1 = require("../../browserLauncher/browserLauncher");
|
|
35
|
+
const trainingSessionActions_1 = require("../../core/messaging/actions/trainingSessionActions");
|
|
36
|
+
const logLineMessaging_1 = require("../../core/messaging/logLineMessaging");
|
|
37
|
+
const messaging_1 = require("../../core/messaging/messaging");
|
|
38
|
+
const mablApi_1 = require("../../mablApi");
|
|
39
|
+
const cliConfigProvider_1 = require("../../providers/cliConfigProvider");
|
|
40
|
+
const loggingProvider_1 = require("../../providers/logging/loggingProvider");
|
|
41
|
+
const fileUploadUtil_1 = require("../../util/fileUploadUtil");
|
|
42
|
+
const logUtils_1 = require("../../util/logUtils");
|
|
43
|
+
const browserTypes_1 = require("../browserTypes");
|
|
44
|
+
const constants_1 = require("../constants");
|
|
45
|
+
const utils_1 = require("../datatables/utils");
|
|
46
|
+
const trainerUtil_1 = require("./tests_cmds/trainerUtil");
|
|
47
|
+
const chalk = require('chalk');
|
|
48
|
+
const linkCrawlerStartUrlParam = 'mabl.link_crawler.starting_url';
|
|
49
|
+
let RUNNING_TEST = false;
|
|
50
|
+
function getFinalUrl(test, parsedUrl) {
|
|
51
|
+
const finalUrl = parsedUrl || test.url;
|
|
52
|
+
if (!finalUrl && test.test_type !== mablApi_1.TestTypeEnum.Performance) {
|
|
53
|
+
throw new Error('No default URL found on test, please specify a URL using the -u or --url flag');
|
|
54
|
+
}
|
|
55
|
+
return finalUrl;
|
|
56
|
+
}
|
|
57
|
+
exports.getFinalUrl = getFinalUrl;
|
|
58
|
+
async function launchBrowserInstance(options) {
|
|
59
|
+
var _a;
|
|
60
|
+
const optionsProxy = await maybeGetProxyOptions(options);
|
|
61
|
+
if (optionsProxy) {
|
|
62
|
+
options = {
|
|
63
|
+
...options,
|
|
64
|
+
proxy: optionsProxy,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
let browser;
|
|
68
|
+
try {
|
|
69
|
+
browser = await maybeLaunchBrowser(options);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
if (error.message.includes('Running as root without --no-sandbox is not supported')) {
|
|
73
|
+
(_a = options.commandLineArgs) === null || _a === void 0 ? void 0 : _a.push('--no-sandbox');
|
|
74
|
+
messaging_1.mablEventEmitter.log('Unable to initialize browser with standard settings, attempting to run with --no-sandbox setting', Date.now(), logLineMessaging_1.LogLineColor.yellow);
|
|
75
|
+
return maybeLaunchBrowser(options).catch((error) => {
|
|
76
|
+
messaging_1.mablEventEmitter.log('Browser launch failed', Date.now(), logLineMessaging_1.LogLineColor.red);
|
|
77
|
+
messaging_1.mablEventEmitter.log(error.message);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
messaging_1.mablEventEmitter.log('Browser launch failed', Date.now(), logLineMessaging_1.LogLineColor.red);
|
|
81
|
+
messaging_1.mablEventEmitter.log(error.message);
|
|
82
|
+
}
|
|
83
|
+
return browser;
|
|
84
|
+
}
|
|
85
|
+
async function maybeGetProxyOptions(options) {
|
|
86
|
+
const proxyServer = (await cliConfigProvider_1.CliConfigProvider.getCliConfig()).http.test
|
|
87
|
+
.proxyHost;
|
|
88
|
+
let optionsProxy;
|
|
89
|
+
if (options === null || options === void 0 ? void 0 : options.proxy) {
|
|
90
|
+
optionsProxy = {
|
|
91
|
+
server: options.proxy.server,
|
|
92
|
+
username: options.proxy.username,
|
|
93
|
+
password: options.proxy.password,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
else if (proxyServer) {
|
|
97
|
+
optionsProxy = {
|
|
98
|
+
server: proxyServer.href,
|
|
99
|
+
username: proxyServer.username,
|
|
100
|
+
password: proxyServer.password,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return optionsProxy;
|
|
104
|
+
}
|
|
105
|
+
function maybeLaunchBrowser(options) {
|
|
106
|
+
return browserLauncher_1.BrowserLauncherFactory.createRunner(options === null || options === void 0 ? void 0 : options.runnerType, options === null || options === void 0 ? void 0 : options.loggerFunc).launch(options);
|
|
107
|
+
}
|
|
108
|
+
async function createBrowser(engine, options) {
|
|
109
|
+
const userDataDir = await engine.prepareBrowserPreferencesDirectory(options.windowPlacement);
|
|
110
|
+
const browserEngineLaunchOptions = engine.getBrowserLaunchOptions(options);
|
|
111
|
+
const maybeBrowser = await launchBrowserInstance({
|
|
112
|
+
...options,
|
|
113
|
+
...browserEngineLaunchOptions,
|
|
114
|
+
downloadPath: createDownloadDirectory(),
|
|
115
|
+
userDataDir,
|
|
116
|
+
});
|
|
117
|
+
if (!maybeBrowser) {
|
|
118
|
+
throw new Error('Unable to start browser session');
|
|
119
|
+
}
|
|
120
|
+
maybeBrowser.on(browserLauncher_1.BrowserEvent.Disconnected, () => maybeBrowser.removeBrowserPreferencesDirectory());
|
|
121
|
+
return maybeBrowser;
|
|
122
|
+
}
|
|
123
|
+
exports.createBrowser = createBrowser;
|
|
124
|
+
async function createBrowserForExecutionEngine(engine, proxyInfo, options) {
|
|
125
|
+
const userDataDir = await engine.prepareBrowserPreferencesDirectory(undefined, proxyInfo);
|
|
126
|
+
const launchOptions = engine.getExecutionEngineBrowserLaunchOptions(options, proxyInfo);
|
|
127
|
+
const proxy = engine.getProxySpec(proxyInfo);
|
|
128
|
+
const maybeBrowser = await maybeLaunchBrowser({
|
|
129
|
+
...options,
|
|
130
|
+
...launchOptions,
|
|
131
|
+
proxy,
|
|
132
|
+
downloadPath: createDownloadDirectory(),
|
|
133
|
+
userDataDir,
|
|
134
|
+
});
|
|
135
|
+
if (!maybeBrowser) {
|
|
136
|
+
throw new Error('Unable to start browser session');
|
|
137
|
+
}
|
|
138
|
+
(0, logUtils_1.logCliOutput)(loggingProvider_1.LogLevel.Info, `Setting apiProxy server [${proxyInfo.httpProxy}]`);
|
|
139
|
+
maybeBrowser.setApiProxy(proxyInfo.httpProxy);
|
|
140
|
+
return maybeBrowser;
|
|
141
|
+
}
|
|
142
|
+
exports.createBrowserForExecutionEngine = createBrowserForExecutionEngine;
|
|
143
|
+
async function getExtensionBackgroundPageWithCliTool(browser) {
|
|
144
|
+
const backgroundPage = await browser.getExtensionBackgroundPage((0, trainerUtil_1.getTrainerId)());
|
|
145
|
+
if (backgroundPage) {
|
|
146
|
+
await checkForMablCliTool(backgroundPage);
|
|
147
|
+
await exposeMessagingFunctionToTrainer(backgroundPage, browser);
|
|
148
|
+
return backgroundPage;
|
|
149
|
+
}
|
|
150
|
+
throw new Error('mabl test creation failure, unable to locate the mabl extension. Please try again');
|
|
151
|
+
}
|
|
152
|
+
exports.getExtensionBackgroundPageWithCliTool = getExtensionBackgroundPageWithCliTool;
|
|
153
|
+
async function checkForMablCliTool(backgroundPage) {
|
|
154
|
+
let isReady = false;
|
|
155
|
+
while (!isReady) {
|
|
156
|
+
isReady = (await backgroundPage.evaluate(`!!window.mablCli`));
|
|
157
|
+
if (!isReady) {
|
|
158
|
+
await sleep(1000);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return isReady;
|
|
162
|
+
}
|
|
163
|
+
async function cleanUpInitialPages(browser) {
|
|
164
|
+
const currentPages = await browser.pages();
|
|
165
|
+
const pagePromises = currentPages.map(async (page) => {
|
|
166
|
+
const url = page.url();
|
|
167
|
+
if (url === 'about:blank') {
|
|
168
|
+
const pageCount = await browser.pages();
|
|
169
|
+
if (pageCount.length > 1) {
|
|
170
|
+
await page.close();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
await Promise.all(pagePromises);
|
|
175
|
+
}
|
|
176
|
+
exports.cleanUpInitialPages = cleanUpInitialPages;
|
|
177
|
+
async function exposeMessagingFunctionToTrainer(backgroundPage, browser) {
|
|
178
|
+
await backgroundPage
|
|
179
|
+
.exposeFunction('postMessageToCli', (message) => handleExtensionMessage(message, browser))
|
|
180
|
+
.catch((error) => messaging_1.mablEventEmitter.log('Error on the handle' + error));
|
|
181
|
+
}
|
|
182
|
+
function createRunLocalTestObject(test, flows, branchName, url, credentialsId, environment) {
|
|
183
|
+
return {
|
|
184
|
+
test,
|
|
185
|
+
flows,
|
|
186
|
+
branchName,
|
|
187
|
+
url,
|
|
188
|
+
credentialsId,
|
|
189
|
+
environment,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
async function prepareTrainerForSplitPlayback(backgroundPage, test, flows, branchName, url, credentialsId) {
|
|
193
|
+
const existingTestPayload = JSON.stringify(createRunLocalTestObject(test, flows, branchName, url, credentialsId));
|
|
194
|
+
const script = `window.mablCli.remoteTest(${existingTestPayload});`;
|
|
195
|
+
try {
|
|
196
|
+
await backgroundPage.evaluate(script);
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
messaging_1.mablEventEmitter.log(chalk.red('Issue preparing the trainer for split playback'));
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
exports.prepareTrainerForSplitPlayback = prepareTrainerForSplitPlayback;
|
|
203
|
+
async function runTheTest(trainingBrowser, backgroundPage, test, flows, branchName, url, credentialsId, environment) {
|
|
204
|
+
const runLocalTest = createRunLocalTestObject(test, flows, branchName, url, credentialsId, environment);
|
|
205
|
+
const script = `window.mablCli.runTest(${JSON.stringify(runLocalTest)});`;
|
|
206
|
+
try {
|
|
207
|
+
await backgroundPage.evaluate(script);
|
|
208
|
+
RUNNING_TEST = true;
|
|
209
|
+
while (RUNNING_TEST) {
|
|
210
|
+
await sleep(1000);
|
|
211
|
+
await cleanUpInitialPages(trainingBrowser);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
messaging_1.mablEventEmitter.log(chalk.red(error));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
exports.runTheTest = runTheTest;
|
|
219
|
+
async function editTheTest(backgroundPage, test, flows, branchName, url, credentialsId, environment) {
|
|
220
|
+
const editLocalTest = {
|
|
221
|
+
test,
|
|
222
|
+
flows,
|
|
223
|
+
branchName,
|
|
224
|
+
url,
|
|
225
|
+
credentialsId,
|
|
226
|
+
environment,
|
|
227
|
+
};
|
|
228
|
+
const script = `window.mablCli.editTest(${JSON.stringify(editLocalTest)});`;
|
|
229
|
+
try {
|
|
230
|
+
await backgroundPage.evaluate(script);
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
messaging_1.mablEventEmitter.log(chalk.red(error));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
exports.editTheTest = editTheTest;
|
|
237
|
+
async function shutItDown(trainingBrowser) {
|
|
238
|
+
await trainingBrowser.close().catch(() => 'Shutdown was a little bumpy');
|
|
239
|
+
}
|
|
240
|
+
function sleep(milliseconds) {
|
|
241
|
+
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
242
|
+
}
|
|
243
|
+
exports.sleep = sleep;
|
|
244
|
+
const TRAINER_SHUTDOWN = 'TRAINER_SHUTDOWN';
|
|
245
|
+
const TRAINED_TEST_INFO = 'TRAINED_TEST_INFO';
|
|
246
|
+
const LOG_LINE_OUTPUT = 'LOG_LINE_OUTPUT';
|
|
247
|
+
const TRAINED_TEST_SAVED = 'TRAINED_TEST_SAVED';
|
|
248
|
+
function handleExtensionMessage(message, trainingBrowser) {
|
|
249
|
+
switch (message.action) {
|
|
250
|
+
case TRAINER_SHUTDOWN:
|
|
251
|
+
const shutdownMessage = message;
|
|
252
|
+
if (shutdownMessage.shutdown) {
|
|
253
|
+
trainingSessionActions_1.TrainingEventEmitter.sessionClosed();
|
|
254
|
+
setTimeout(shutItDown, 1000, trainingBrowser);
|
|
255
|
+
}
|
|
256
|
+
RUNNING_TEST = false;
|
|
257
|
+
break;
|
|
258
|
+
case TRAINED_TEST_SAVED:
|
|
259
|
+
const trainedTestSavedMessage = message;
|
|
260
|
+
if (!trainedTestSavedMessage.test.id ||
|
|
261
|
+
!trainedTestSavedMessage.test.invariant_id) {
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
trainingSessionActions_1.TrainingEventEmitter.sessionSaved(trainedTestSavedMessage.test.id, trainedTestSavedMessage.test.invariant_id, trainedTestSavedMessage.branch, trainedTestSavedMessage.planId);
|
|
265
|
+
break;
|
|
266
|
+
case TRAINED_TEST_INFO:
|
|
267
|
+
const trainedTestInfoMessage = message;
|
|
268
|
+
if (!trainedTestInfoMessage.test.id ||
|
|
269
|
+
!trainedTestInfoMessage.test.invariant_id) {
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
trainingSessionActions_1.TrainingEventEmitter.sessionSaved(trainedTestInfoMessage.test.id, trainedTestInfoMessage.test.invariant_id, trainedTestInfoMessage.branch, trainedTestInfoMessage.planId);
|
|
273
|
+
const table = new cli_table3_1.default({
|
|
274
|
+
head: [chalk.yellow('Saved Test Info')],
|
|
275
|
+
wordWrap: true,
|
|
276
|
+
});
|
|
277
|
+
table.push([
|
|
278
|
+
{
|
|
279
|
+
rowSpan: 1,
|
|
280
|
+
content: 'ID',
|
|
281
|
+
vAlign: 'center',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
rowSpan: 1,
|
|
285
|
+
content: trainedTestInfoMessage.test.invariant_id,
|
|
286
|
+
vAlign: 'center',
|
|
287
|
+
},
|
|
288
|
+
], [
|
|
289
|
+
{
|
|
290
|
+
rowSpan: 1,
|
|
291
|
+
content: 'Name',
|
|
292
|
+
vAlign: 'center',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
rowSpan: 1,
|
|
296
|
+
content: trainedTestInfoMessage.test.name,
|
|
297
|
+
vAlign: 'center',
|
|
298
|
+
},
|
|
299
|
+
], [
|
|
300
|
+
{
|
|
301
|
+
rowSpan: 1,
|
|
302
|
+
content: 'Branch',
|
|
303
|
+
vAlign: 'center',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
rowSpan: 1,
|
|
307
|
+
content: trainedTestInfoMessage.branch,
|
|
308
|
+
vAlign: 'center',
|
|
309
|
+
},
|
|
310
|
+
]);
|
|
311
|
+
messaging_1.mablEventEmitter.log(table.toString());
|
|
312
|
+
if (trainedTestInfoMessage.link) {
|
|
313
|
+
messaging_1.mablEventEmitter.log(`View test: ${trainedTestInfoMessage.link}`);
|
|
314
|
+
}
|
|
315
|
+
messaging_1.mablEventEmitter.log('');
|
|
316
|
+
break;
|
|
317
|
+
case LOG_LINE_OUTPUT:
|
|
318
|
+
const logLineMessage = message;
|
|
319
|
+
if (logLineMessage.message) {
|
|
320
|
+
switch (logLineMessage.level) {
|
|
321
|
+
case 'error':
|
|
322
|
+
messaging_1.mablEventEmitter.log(chalk.red(`[ERROR] ${logLineMessage.message}`), Date.now());
|
|
323
|
+
break;
|
|
324
|
+
case 'debug':
|
|
325
|
+
messaging_1.mablEventEmitter.debug(chalk.gray(logLineMessage.message), Date.now());
|
|
326
|
+
break;
|
|
327
|
+
default:
|
|
328
|
+
messaging_1.mablEventEmitter.log(logLineMessage.message, Date.now());
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
break;
|
|
332
|
+
default:
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function cleanupTestResources(testContext) {
|
|
337
|
+
try {
|
|
338
|
+
if (testContext) {
|
|
339
|
+
testContext.getFileUploadDirs().forEach((dir) => (0, fileUploadUtil_1.removeUploadDirs)(dir));
|
|
340
|
+
testContext.clearFileUploadDirs();
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
catch (e) {
|
|
344
|
+
const msg = `WARNING: error received when cleaning up after tests: ${e.message}`;
|
|
345
|
+
(0, logUtils_1.logCliOutput)(loggingProvider_1.LogLevel.Warn, msg);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
exports.cleanupTestResources = cleanupTestResources;
|
|
349
|
+
function validateRunEditCommand(idArg, testRunIdArg) {
|
|
350
|
+
if (!idArg && !testRunIdArg) {
|
|
351
|
+
throw new Error(chalk.red(`Please specify a test ID (--${constants_1.CommandArgId}) or test run ID (--${constants_1.CommandArgTestRunId})\n`));
|
|
352
|
+
}
|
|
353
|
+
if (idArg && testRunIdArg) {
|
|
354
|
+
throw new Error(chalk.red(`Command does not support specifying both the test id (--${constants_1.CommandArgId}) AND the test run id (--${constants_1.CommandArgTestRunId}), please only supply one\n`));
|
|
355
|
+
}
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
exports.validateRunEditCommand = validateRunEditCommand;
|
|
359
|
+
function validateRunCommandWithLabels(testId, suppliedLabelsInclude, suppliedLabelsExclude, testRunId, planId, checkForRunIdOrPlanId = false, testFile) {
|
|
360
|
+
function cleanLabels(input) {
|
|
361
|
+
const distinctLabels = new Set();
|
|
362
|
+
input
|
|
363
|
+
.map((label) => label.toString().trim().toLowerCase())
|
|
364
|
+
.forEach((label) => distinctLabels.add(label));
|
|
365
|
+
return [...distinctLabels];
|
|
366
|
+
}
|
|
367
|
+
const labelsInclude = cleanLabels(suppliedLabelsInclude !== null && suppliedLabelsInclude !== void 0 ? suppliedLabelsInclude : []);
|
|
368
|
+
const labelsExclude = cleanLabels(suppliedLabelsExclude !== null && suppliedLabelsExclude !== void 0 ? suppliedLabelsExclude : []);
|
|
369
|
+
if (labelsInclude.length > 0 && labelsExclude.length > 0) {
|
|
370
|
+
const intersection = labelsInclude.filter((label) => labelsExclude.includes(label));
|
|
371
|
+
if (intersection.length > 0) {
|
|
372
|
+
throw new Error(`Include labels --${constants_1.CommandArgLabelsInclude} and exclude labels --${constants_1.CommandArgLabelsExclude} have overlapping values [${intersection.join(',')}]`);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
const maybeId = testId;
|
|
376
|
+
if (checkForRunIdOrPlanId) {
|
|
377
|
+
if (maybeId === undefined &&
|
|
378
|
+
testRunId === undefined &&
|
|
379
|
+
planId === undefined &&
|
|
380
|
+
testFile === undefined &&
|
|
381
|
+
labelsInclude.length === 0 &&
|
|
382
|
+
labelsExclude.length === 0) {
|
|
383
|
+
throw new Error(`Please provide at least one of --${constants_1.CommandArgId}, --${constants_1.CommandArgTestRunId}, --${constants_1.CommandArgLabelsInclude}, --${constants_1.CommandArgLabelsExclude}, --${constants_1.CommandArgFromPlanId}`);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
else if (maybeId === undefined &&
|
|
387
|
+
labelsInclude.length === 0 &&
|
|
388
|
+
labelsExclude.length === 0) {
|
|
389
|
+
throw new Error(`Please provide at least one of --${constants_1.CommandArgId}, --${constants_1.CommandArgLabelsInclude}, --${constants_1.CommandArgLabelsExclude}`);
|
|
390
|
+
}
|
|
391
|
+
return true;
|
|
392
|
+
}
|
|
393
|
+
exports.validateRunCommandWithLabels = validateRunCommandWithLabels;
|
|
394
|
+
async function pullDownTestRunConfig(testRunId, apiClient) {
|
|
395
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
396
|
+
const journeyRun = await apiClient.getTestRun(testRunId);
|
|
397
|
+
const planRun = await apiClient.getPlanRun(journeyRun.parent_execution);
|
|
398
|
+
const testDatatablevariables = ((_a = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _a === void 0 ? void 0 : _a.user_variables) &&
|
|
399
|
+
(0, utils_1.variableRowAsScenario)((_b = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _b === void 0 ? void 0 : _b.user_variables);
|
|
400
|
+
return {
|
|
401
|
+
basicAuthCredentialsId: ((_c = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _c === void 0 ? void 0 : _c.http_auth_credentials_required)
|
|
402
|
+
? (_d = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _d === void 0 ? void 0 : _d.http_auth_credentials_id
|
|
403
|
+
: undefined,
|
|
404
|
+
branchName: (_e = journeyRun.journey_parameters) === null || _e === void 0 ? void 0 : _e.source_control_tag,
|
|
405
|
+
credentialsId: ((_f = planRun.run_policy) === null || _f === void 0 ? void 0 : _f.credentials_required)
|
|
406
|
+
? (_g = planRun.run_policy) === null || _g === void 0 ? void 0 : _g.credentials_id
|
|
407
|
+
: undefined,
|
|
408
|
+
dataTableVariables: testDatatablevariables,
|
|
409
|
+
deviceEmulation: (_h = journeyRun.journey_parameters) === null || _h === void 0 ? void 0 : _h.device_emulation,
|
|
410
|
+
environmentId: (_k = (_j = journeyRun.journey_parameters) === null || _j === void 0 ? void 0 : _j.deployment) === null || _k === void 0 ? void 0 : _k.environment_id,
|
|
411
|
+
extraHttpHeaders: ((_l = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _l === void 0 ? void 0 : _l.http_headers_required) === true
|
|
412
|
+
? (_o = (_m = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _m === void 0 ? void 0 : _m.http_headers) === null || _o === void 0 ? void 0 : _o.reduce((headers, header) => {
|
|
413
|
+
var _a;
|
|
414
|
+
return ({
|
|
415
|
+
...headers,
|
|
416
|
+
[header.name]: (_a = header.value) !== null && _a !== void 0 ? _a : '',
|
|
417
|
+
});
|
|
418
|
+
}, {})
|
|
419
|
+
: undefined,
|
|
420
|
+
filterHttpRequests: false,
|
|
421
|
+
importedVariables: (_p = journeyRun.journey_parameters) === null || _p === void 0 ? void 0 : _p.imported_variables,
|
|
422
|
+
linkCrawlerStartingUrlOverride: getLinkCrawlerUrlOverride(journeyRun),
|
|
423
|
+
localizationOptions: journeyRun.localization_options,
|
|
424
|
+
pageLoadWait: (_q = journeyRun.journey_parameters) === null || _q === void 0 ? void 0 : _q.page_load_wait,
|
|
425
|
+
runId: journeyRun.id,
|
|
426
|
+
testId: (_r = journeyRun.journey) === null || _r === void 0 ? void 0 : _r.invariant_id,
|
|
427
|
+
url: (_t = (_s = journeyRun.journey_parameters) === null || _s === void 0 ? void 0 : _s.deployment) === null || _t === void 0 ? void 0 : _t.uri,
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
exports.pullDownTestRunConfig = pullDownTestRunConfig;
|
|
431
|
+
async function extractTestRunConfig(executionMessage, apiClient) {
|
|
432
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
433
|
+
const journeyRun = (_a = executionMessage.journey_run) !== null && _a !== void 0 ? _a : (await apiClient.getTestRun(executionMessage.journey_run_id));
|
|
434
|
+
const planRun = executionMessage.plan_run;
|
|
435
|
+
const maybeRunnerType = ((_b = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _b === void 0 ? void 0 : _b.nodejs_runtime_variant)
|
|
436
|
+
?
|
|
437
|
+
(_c = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _c === void 0 ? void 0 : _c.nodejs_runtime_variant
|
|
438
|
+
: undefined;
|
|
439
|
+
const config = {
|
|
440
|
+
basicAuthCredentialsId: ((_d = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _d === void 0 ? void 0 : _d.http_auth_credentials_required)
|
|
441
|
+
? (_e = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _e === void 0 ? void 0 : _e.http_auth_credentials_id
|
|
442
|
+
: undefined,
|
|
443
|
+
branchName: (_f = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _f === void 0 ? void 0 : _f.source_control_tag,
|
|
444
|
+
credentialsId: ((_g = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _g === void 0 ? void 0 : _g.credentials_required)
|
|
445
|
+
? (_h = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _h === void 0 ? void 0 : _h.credentials_id
|
|
446
|
+
: undefined,
|
|
447
|
+
dataTableVariables: ((_j = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _j === void 0 ? void 0 : _j.user_variables) &&
|
|
448
|
+
(0, utils_1.variableRowAsScenario)((_k = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _k === void 0 ? void 0 : _k.user_variables),
|
|
449
|
+
deviceEmulation: (_l = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _l === void 0 ? void 0 : _l.device_emulation,
|
|
450
|
+
environmentId: (_o = (_m = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _m === void 0 ? void 0 : _m.deployment) === null || _o === void 0 ? void 0 : _o.environment_id,
|
|
451
|
+
extraHttpHeaders: ((_p = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _p === void 0 ? void 0 : _p.http_headers_required) === true
|
|
452
|
+
? headerArrayToRecord((_q = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _q === void 0 ? void 0 : _q.http_headers)
|
|
453
|
+
: undefined,
|
|
454
|
+
filterHttpRequests: true,
|
|
455
|
+
importedVariables: (_r = journeyRun.journey_parameters) === null || _r === void 0 ? void 0 : _r.imported_variables,
|
|
456
|
+
linkCrawlerStartingUrlOverride: getLinkCrawlerUrlOverride(journeyRun),
|
|
457
|
+
localizationOptions: journeyRun.localization_options,
|
|
458
|
+
pageLoadWait: (_s = journeyRun.journey_parameters) === null || _s === void 0 ? void 0 : _s.page_load_wait,
|
|
459
|
+
runId: journeyRun.id,
|
|
460
|
+
runnerType: maybeRunnerType,
|
|
461
|
+
testId: (_t = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey) === null || _t === void 0 ? void 0 : _t.invariant_id,
|
|
462
|
+
url: (_v = (_u = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _u === void 0 ? void 0 : _u.deployment) === null || _v === void 0 ? void 0 : _v.uri,
|
|
463
|
+
};
|
|
464
|
+
if (executionMessage.test_type === mablApi_1.TestTypeEnum.Mobile) {
|
|
465
|
+
const mobileMessage = executionMessage;
|
|
466
|
+
config.mobileConfig = {
|
|
467
|
+
...config.mobileConfig,
|
|
468
|
+
deviceName: mobileMessage.mobile_device.device_name,
|
|
469
|
+
platformName: mobileMessage.mobile_device.platform,
|
|
470
|
+
mobileAppFileId: mobileMessage.mobile_app_file_id,
|
|
471
|
+
};
|
|
472
|
+
if (mobileMessage.mobile_device.platform === mablApi_1.MobilePlatformEnum.Ios) {
|
|
473
|
+
config.mobileConfig.platformVersion =
|
|
474
|
+
mobileMessage.mobile_device.os_version;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return config;
|
|
478
|
+
}
|
|
479
|
+
exports.extractTestRunConfig = extractTestRunConfig;
|
|
480
|
+
function getLinkCrawlerUrlOverride(journeyRun) {
|
|
481
|
+
var _a, _b, _c;
|
|
482
|
+
return (_c = (_b = (_a = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_configuration) === null || _a === void 0 ? void 0 : _a.parameters) === null || _b === void 0 ? void 0 : _b.find((param) => param.name === linkCrawlerStartUrlParam)) === null || _c === void 0 ? void 0 : _c.value;
|
|
483
|
+
}
|
|
484
|
+
exports.getLinkCrawlerUrlOverride = getLinkCrawlerUrlOverride;
|
|
485
|
+
function headerArrayToRecord(headers) {
|
|
486
|
+
return headers === null || headers === void 0 ? void 0 : headers.reduce((headers, header) => {
|
|
487
|
+
var _a;
|
|
488
|
+
return ({
|
|
489
|
+
...headers,
|
|
490
|
+
[header.name]: (_a = header.value) !== null && _a !== void 0 ? _a : '',
|
|
491
|
+
});
|
|
492
|
+
}, {});
|
|
493
|
+
}
|
|
494
|
+
exports.headerArrayToRecord = headerArrayToRecord;
|
|
495
|
+
function calculateTotalTimeSeconds(startTimeMillis, endTimeMillis) {
|
|
496
|
+
return (endTimeMillis - startTimeMillis) / 1000;
|
|
497
|
+
}
|
|
498
|
+
exports.calculateTotalTimeSeconds = calculateTotalTimeSeconds;
|
|
499
|
+
function milliSecondsToSeconds(timeMs) {
|
|
500
|
+
return Math.round((timeMs !== null && timeMs !== void 0 ? timeMs : 0) / 100) / 10;
|
|
501
|
+
}
|
|
502
|
+
exports.milliSecondsToSeconds = milliSecondsToSeconds;
|
|
503
|
+
function logTestInfoIfPresent(description, infoArg) {
|
|
504
|
+
if (infoArg !== undefined) {
|
|
505
|
+
messaging_1.mablEventEmitter.log(chalk.cyan(description, chalk.magenta(infoArg.toString())));
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
exports.logTestInfoIfPresent = logTestInfoIfPresent;
|
|
509
|
+
function createDownloadDirectory() {
|
|
510
|
+
return fs.mkdtempSync(path.join(os.tmpdir(), `mablTestRun-${Date.now()}-`));
|
|
511
|
+
}
|
|
512
|
+
function toBasicHttpAuthenticationCredentials(credentials) {
|
|
513
|
+
var _a, _b, _c, _d, _e;
|
|
514
|
+
if (credentials === undefined ||
|
|
515
|
+
((_a = credentials.properties) === null || _a === void 0 ? void 0 : _a.username) === undefined) {
|
|
516
|
+
return undefined;
|
|
517
|
+
}
|
|
518
|
+
return {
|
|
519
|
+
username: (_c = (_b = credentials.properties) === null || _b === void 0 ? void 0 : _b.username) !== null && _c !== void 0 ? _c : '',
|
|
520
|
+
password: (_e = (_d = credentials.properties) === null || _d === void 0 ? void 0 : _d.password) !== null && _e !== void 0 ? _e : '',
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
exports.toBasicHttpAuthenticationCredentials = toBasicHttpAuthenticationCredentials;
|
|
524
|
+
function parseBrowserType(browserType) {
|
|
525
|
+
switch (browserType) {
|
|
526
|
+
case 'edge':
|
|
527
|
+
return browserTypes_1.BrowserType.Edge;
|
|
528
|
+
case 'firefox':
|
|
529
|
+
return browserTypes_1.BrowserType.Firefox;
|
|
530
|
+
case 'chrome':
|
|
531
|
+
return browserTypes_1.BrowserType.Chrome;
|
|
532
|
+
case 'webkit':
|
|
533
|
+
return browserTypes_1.BrowserType.Webkit;
|
|
534
|
+
default:
|
|
535
|
+
return constants_1.DefaultBrowserType;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
exports.parseBrowserType = parseBrowserType;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.launchTrainingSession = exports.createTestDescriptionKey = exports.createTestNameKey = void 0;
|
|
4
|
+
const util_1 = require("../../commandUtil/util");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const trainingSessions_1 = require("../../../core/trainer/trainingSessions");
|
|
7
|
+
exports.createTestNameKey = 'test-name';
|
|
8
|
+
exports.createTestDescriptionKey = 'test-description';
|
|
9
|
+
exports.command = `create <${constants_1.CommandArgUrl}> <${exports.createTestNameKey}>`;
|
|
10
|
+
exports.describe = 'Create a test using the mabl Trainer';
|
|
11
|
+
exports.builder = (yargs) => {
|
|
12
|
+
yargs
|
|
13
|
+
.positional(constants_1.CommandArgUrl, {
|
|
14
|
+
describe: 'The url to test',
|
|
15
|
+
type: 'string',
|
|
16
|
+
})
|
|
17
|
+
.positional(exports.createTestNameKey, {
|
|
18
|
+
describe: 'The name of the test',
|
|
19
|
+
type: 'string',
|
|
20
|
+
})
|
|
21
|
+
.option('desc', {
|
|
22
|
+
alias: exports.createTestDescriptionKey,
|
|
23
|
+
describe: 'Description for the test',
|
|
24
|
+
default: '',
|
|
25
|
+
nargs: 1,
|
|
26
|
+
type: 'string',
|
|
27
|
+
})
|
|
28
|
+
.option('width', {
|
|
29
|
+
describe: 'Set the browser width in pixels',
|
|
30
|
+
default: 1366,
|
|
31
|
+
nargs: 1,
|
|
32
|
+
type: 'number',
|
|
33
|
+
})
|
|
34
|
+
.option('height', {
|
|
35
|
+
describe: 'Set the browser height in pixels',
|
|
36
|
+
default: 768,
|
|
37
|
+
nargs: 1,
|
|
38
|
+
type: 'number',
|
|
39
|
+
})
|
|
40
|
+
.option(constants_1.CommandArgMablBranch, {
|
|
41
|
+
describe: 'Branch to run the mabl test against',
|
|
42
|
+
nargs: 1,
|
|
43
|
+
type: 'string',
|
|
44
|
+
})
|
|
45
|
+
.option(constants_1.CommandArgEnvironmentId, {
|
|
46
|
+
alias: constants_1.CommandArgAliases.EnvironmentId,
|
|
47
|
+
describe: 'Mabl environment to create test under',
|
|
48
|
+
nargs: 1,
|
|
49
|
+
type: 'string',
|
|
50
|
+
})
|
|
51
|
+
.option(constants_1.CommandArgApplicationId, {
|
|
52
|
+
alias: constants_1.CommandArgAliases.ApplicationId,
|
|
53
|
+
describe: 'Mabl application to create test under',
|
|
54
|
+
nargs: 1,
|
|
55
|
+
type: 'string',
|
|
56
|
+
})
|
|
57
|
+
.option(constants_1.CommandArgPlanId, {
|
|
58
|
+
describe: 'Mabl plan to use the config from and add the test to upon completion',
|
|
59
|
+
nargs: 1,
|
|
60
|
+
type: 'string',
|
|
61
|
+
})
|
|
62
|
+
.option(constants_1.CommandArgMablAutoBranch, {
|
|
63
|
+
describe: 'Create a mabl branch when a mabl-branch target is specified that does not exist',
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
default: false,
|
|
66
|
+
})
|
|
67
|
+
.option(constants_1.CommandArgMablAutoLogin, {
|
|
68
|
+
describe: 'Insert an auto login flow at the beginning of the created test',
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
default: false,
|
|
71
|
+
})
|
|
72
|
+
.option(constants_1.CommandArgLabels, {
|
|
73
|
+
describe: 'Space delimited labels to save test with',
|
|
74
|
+
type: 'array',
|
|
75
|
+
})
|
|
76
|
+
.option(constants_1.CommandArgDataTables, {
|
|
77
|
+
describe: 'Space delimited data table IDs to use with test',
|
|
78
|
+
type: 'array',
|
|
79
|
+
})
|
|
80
|
+
.option(constants_1.CommandArgWorkspaceId, {
|
|
81
|
+
alias: constants_1.CommandArgAliases.WorkspaceId,
|
|
82
|
+
describe: 'Workspace to create test in',
|
|
83
|
+
nargs: 1,
|
|
84
|
+
type: 'string',
|
|
85
|
+
})
|
|
86
|
+
.option(constants_1.CommandArgCredentials, {
|
|
87
|
+
alias: constants_1.CommandArgAliases.Credentials,
|
|
88
|
+
describe: 'Credentials ID to run the test with',
|
|
89
|
+
nargs: 1,
|
|
90
|
+
type: 'string',
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
exports.handler = (0, util_1.failWrapper)(launchTrainingSession);
|
|
94
|
+
async function launchTrainingSession(parsed) {
|
|
95
|
+
const url = parsed.url;
|
|
96
|
+
const width = parsed.width;
|
|
97
|
+
const height = parsed.height;
|
|
98
|
+
const testName = parsed['test-name'];
|
|
99
|
+
const workspaceId = await (0, util_1.getWorkspaceId)(parsed);
|
|
100
|
+
const testDescription = parsed['test-description'];
|
|
101
|
+
const branchName = parsed['mabl-branch'];
|
|
102
|
+
const autoBranch = parsed['auto-branch'];
|
|
103
|
+
const autoLogin = parsed[constants_1.CommandArgMablAutoLogin];
|
|
104
|
+
const credentialsId = parsed['credentials-id'];
|
|
105
|
+
const environmentId = parsed[constants_1.CommandArgEnvironmentId];
|
|
106
|
+
const applicationId = parsed[constants_1.CommandArgApplicationId];
|
|
107
|
+
const planId = parsed[constants_1.CommandArgPlanId];
|
|
108
|
+
const labels = parsed[constants_1.CommandArgLabels];
|
|
109
|
+
const dataTableIds = parsed[constants_1.CommandArgDataTables];
|
|
110
|
+
const trainingSessionOptions = {
|
|
111
|
+
applicationId,
|
|
112
|
+
autoBranch,
|
|
113
|
+
autoLogin,
|
|
114
|
+
branchName,
|
|
115
|
+
credentialsId,
|
|
116
|
+
dataTableIds,
|
|
117
|
+
environmentId,
|
|
118
|
+
height,
|
|
119
|
+
labels,
|
|
120
|
+
planId,
|
|
121
|
+
testDescription,
|
|
122
|
+
testName,
|
|
123
|
+
url,
|
|
124
|
+
width,
|
|
125
|
+
workspaceId,
|
|
126
|
+
};
|
|
127
|
+
await (0, trainingSessions_1.trainNewTest)(trainingSessionOptions);
|
|
128
|
+
return 'done';
|
|
129
|
+
}
|
|
130
|
+
exports.launchTrainingSession = launchTrainingSession;
|