@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,293 @@
|
|
|
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.BasicApiClient = void 0;
|
|
30
|
+
const ApiError_1 = require("./ApiError");
|
|
31
|
+
const axiosProxyConfig_1 = require("../http/axiosProxyConfig");
|
|
32
|
+
const axios_1 = __importDefault(require("axios"));
|
|
33
|
+
const os = __importStar(require("os"));
|
|
34
|
+
const async_retry_1 = __importDefault(require("async-retry"));
|
|
35
|
+
const logUtils_1 = require("../util/logUtils");
|
|
36
|
+
const asyncUtil_1 = require("../util/asyncUtil");
|
|
37
|
+
const types_1 = require("./types");
|
|
38
|
+
const httpUtil_1 = require("../http/httpUtil");
|
|
39
|
+
const cliConfigProvider_1 = require("../providers/cliConfigProvider");
|
|
40
|
+
const MABL_ENTITY_VERSION_HEADER = 'x-mabl-entity-version';
|
|
41
|
+
const DEFAULT_RETRYABLE_REQUEST_TIMEOUT_MILLISECONDS = 60000;
|
|
42
|
+
const DEFAULT_RETRIES = 10;
|
|
43
|
+
const DEFAULT_MAX_TOTAL_RETRY_TIME_MILLISECONDS = DEFAULT_RETRYABLE_REQUEST_TIMEOUT_MILLISECONDS * DEFAULT_RETRIES;
|
|
44
|
+
const DEFAULT_NONRETRYABLE_REQUEST_TIMEOUT_MILLISECONDS = DEFAULT_MAX_TOTAL_RETRY_TIME_MILLISECONDS;
|
|
45
|
+
const DEFAULT_MIN_RETRY_INTERVAL_MILLISECONDS = 1000;
|
|
46
|
+
const DEFAULT_MAX_RETRY_INTERVAL_MILLISECONDS = 10000;
|
|
47
|
+
const RETRYABLE_NODEJS_ERRORS = [
|
|
48
|
+
'EAI_AGAIN',
|
|
49
|
+
'ECONNRESET',
|
|
50
|
+
'ENOTFOUND',
|
|
51
|
+
'ENETUNREACH',
|
|
52
|
+
'ETIMEOUT',
|
|
53
|
+
'ETIMEDOUT',
|
|
54
|
+
'ECONNABORTED',
|
|
55
|
+
];
|
|
56
|
+
const DEFAULT_SSL_VERIFY = false;
|
|
57
|
+
class BasicApiClient {
|
|
58
|
+
static async create() {
|
|
59
|
+
const httpConfig = (await cliConfigProvider_1.CliConfigProvider.getCliConfig()).http.mabl;
|
|
60
|
+
return new BasicApiClient({
|
|
61
|
+
authType: types_1.AuthType.None,
|
|
62
|
+
token: '',
|
|
63
|
+
proxyUrl: httpConfig.proxyHost,
|
|
64
|
+
sslVerify: httpConfig.sslVerify,
|
|
65
|
+
proxyType: httpConfig.proxyType,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
constructor(options) {
|
|
69
|
+
var _a, _b, _c, _d, _e;
|
|
70
|
+
const config = (0, axiosProxyConfig_1.axiosProxyConfig)({
|
|
71
|
+
sslVerify: (_a = options.sslVerify) !== null && _a !== void 0 ? _a : DEFAULT_SSL_VERIFY,
|
|
72
|
+
proxyHost: options.proxyUrl,
|
|
73
|
+
proxyType: options.proxyType,
|
|
74
|
+
});
|
|
75
|
+
if (!config.headers) {
|
|
76
|
+
config.headers = {};
|
|
77
|
+
}
|
|
78
|
+
config.timeout =
|
|
79
|
+
(_d = (_b = options.requestTimeoutMillis) !== null && _b !== void 0 ? _b : (_c = options.retryConfig) === null || _c === void 0 ? void 0 : _c.requestTimeoutMillis) !== null && _d !== void 0 ? _d : DEFAULT_RETRYABLE_REQUEST_TIMEOUT_MILLISECONDS;
|
|
80
|
+
config.maxBodyLength = Infinity;
|
|
81
|
+
config.maxContentLength = Infinity;
|
|
82
|
+
switch (options.authType) {
|
|
83
|
+
case types_1.AuthType.ApiKey:
|
|
84
|
+
if (!options.token) {
|
|
85
|
+
throw new Error(`Auth type [${options.authType}] requires token`);
|
|
86
|
+
}
|
|
87
|
+
config.auth = {
|
|
88
|
+
username: 'key',
|
|
89
|
+
password: options.token,
|
|
90
|
+
};
|
|
91
|
+
break;
|
|
92
|
+
case types_1.AuthType.Basic:
|
|
93
|
+
if (!options.token) {
|
|
94
|
+
throw new Error(`Auth type [${options.authType}] requires token`);
|
|
95
|
+
}
|
|
96
|
+
const parts = options.token.split(':');
|
|
97
|
+
if (parts.length !== 2) {
|
|
98
|
+
throw new Error('Invalid basic auth token');
|
|
99
|
+
}
|
|
100
|
+
const [username, password] = parts;
|
|
101
|
+
config.auth = {
|
|
102
|
+
username,
|
|
103
|
+
password,
|
|
104
|
+
};
|
|
105
|
+
break;
|
|
106
|
+
case types_1.AuthType.Bearer:
|
|
107
|
+
if (!options.token && !options.tokenAccessor) {
|
|
108
|
+
throw new Error(`Auth type [${options.authType}] requires token or tokenAccessor`);
|
|
109
|
+
}
|
|
110
|
+
if (options.token) {
|
|
111
|
+
config.headers.authorization = `Bearer ${options.token}`;
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case types_1.AuthType.None:
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
throw new Error(`Unhandled auth type [${options.authType}`);
|
|
118
|
+
}
|
|
119
|
+
config.headers = {
|
|
120
|
+
...config.headers,
|
|
121
|
+
...{
|
|
122
|
+
Accept: 'application/json',
|
|
123
|
+
'x-mabl-user-id': 'mabl-cli',
|
|
124
|
+
'x-mabl-user-platform': `${os.platform()}-${os.release()}`,
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
if (options.userAgentOverride) {
|
|
128
|
+
config.headers[httpUtil_1.USER_AGENT_HEADER] = options.userAgentOverride;
|
|
129
|
+
}
|
|
130
|
+
this.httpRequestConfig = config;
|
|
131
|
+
this.httpClient = axios_1.default.create(config);
|
|
132
|
+
this.httpClient.defaults.headers.common = { ...config.headers };
|
|
133
|
+
const { tokenAccessor } = options;
|
|
134
|
+
if (tokenAccessor) {
|
|
135
|
+
this.httpClient.interceptors.request.use(async (config) => {
|
|
136
|
+
const token = await tokenAccessor();
|
|
137
|
+
if (token) {
|
|
138
|
+
config.headers = {
|
|
139
|
+
...config.headers,
|
|
140
|
+
authorization: `Bearer ${token}`,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return config;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
this.retryConfig = options.retryConfig;
|
|
147
|
+
this.debugLogger = (_e = options.debugLogger) !== null && _e !== void 0 ? _e : logUtils_1.logInternal;
|
|
148
|
+
}
|
|
149
|
+
getNonRetryableRequestConfig(override) {
|
|
150
|
+
const overrideWithTimeout = { ...(override !== null && override !== void 0 ? override : {}) };
|
|
151
|
+
if (!overrideWithTimeout.timeout) {
|
|
152
|
+
overrideWithTimeout.timeout =
|
|
153
|
+
DEFAULT_NONRETRYABLE_REQUEST_TIMEOUT_MILLISECONDS;
|
|
154
|
+
}
|
|
155
|
+
return { ...this.httpRequestConfig, ...overrideWithTimeout };
|
|
156
|
+
}
|
|
157
|
+
getRetryableRequestConfig(retryConfig) {
|
|
158
|
+
var _a;
|
|
159
|
+
return this.getNonRetryableRequestConfig({
|
|
160
|
+
timeout: (_a = retryConfig === null || retryConfig === void 0 ? void 0 : retryConfig.requestTimeoutMillis) !== null && _a !== void 0 ? _a : this.httpRequestConfig.timeout,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
makeGetRequest(path, retryConfig, axiosConfig) {
|
|
164
|
+
return this.retryWrappedRequest(`makeGetRequest('${path}')`, () => this.getRequest(path, {
|
|
165
|
+
...axiosConfig,
|
|
166
|
+
...this.getRetryableRequestConfig(retryConfig),
|
|
167
|
+
}), retryConfig);
|
|
168
|
+
}
|
|
169
|
+
async getRequest(path, config) {
|
|
170
|
+
const response = await this.debugRequest('GET', path, () => this.httpClient.get(path, config));
|
|
171
|
+
BasicApiClient.checkResponseStatusCode(response);
|
|
172
|
+
return response.data;
|
|
173
|
+
}
|
|
174
|
+
makeGetRequestWithETag(path, retryConfig) {
|
|
175
|
+
return this.retryWrappedRequest(`makeGetRequestWithETag('${path}')`, () => this.getRequestWithETag(path, this.getRetryableRequestConfig(retryConfig)), retryConfig);
|
|
176
|
+
}
|
|
177
|
+
async getRequestWithETag(path, config) {
|
|
178
|
+
var _a;
|
|
179
|
+
const response = await this.debugRequest('GET', path, () => this.httpClient.get(path, config));
|
|
180
|
+
BasicApiClient.checkResponseStatusCode(response);
|
|
181
|
+
const headers = response.headers;
|
|
182
|
+
const result = response.data;
|
|
183
|
+
const versionHeader = (_a = headers[MABL_ENTITY_VERSION_HEADER]) === null || _a === void 0 ? void 0 : _a.toString();
|
|
184
|
+
if (!versionHeader) {
|
|
185
|
+
throw new Error(`Missing ${MABL_ENTITY_VERSION_HEADER} header`);
|
|
186
|
+
}
|
|
187
|
+
return { ...result, entity_version: versionHeader };
|
|
188
|
+
}
|
|
189
|
+
async makePostRequest(path, requestBody, requestConfig) {
|
|
190
|
+
return this.postRequest(path, requestBody, this.getNonRetryableRequestConfig(requestConfig));
|
|
191
|
+
}
|
|
192
|
+
async makePostRequestWithRetries(path, requestBody, config) {
|
|
193
|
+
return this.retryWrappedRequest(`makePostRequestWithRetries('${path}')`, () => this.postRequest(path, requestBody, this.getRetryableRequestConfig(config)), config);
|
|
194
|
+
}
|
|
195
|
+
async postRequest(path, requestBody, config) {
|
|
196
|
+
const response = await this.debugRequest('POST', path, () => this.httpClient.post(path, requestBody, config));
|
|
197
|
+
BasicApiClient.checkResponseStatusCode(response);
|
|
198
|
+
return response.data;
|
|
199
|
+
}
|
|
200
|
+
async makePutRequest(path, requestBody) {
|
|
201
|
+
const response = await this.debugRequest('PUT', path, () => this.httpClient.put(path, requestBody, this.getNonRetryableRequestConfig()));
|
|
202
|
+
BasicApiClient.checkResponseStatusCode(response);
|
|
203
|
+
return response.data;
|
|
204
|
+
}
|
|
205
|
+
makeDeleteRequest(path, retryConfig) {
|
|
206
|
+
return this.retryWrappedRequest(`makeDeleteRequest('${path}')`, () => this.deleteRequest(path, this.getRetryableRequestConfig(retryConfig)), retryConfig);
|
|
207
|
+
}
|
|
208
|
+
async deleteRequest(path, config) {
|
|
209
|
+
const response = await this.debugRequest('DELETE', path, () => this.httpClient.delete(path, config));
|
|
210
|
+
BasicApiClient.checkResponseStatusCode(response);
|
|
211
|
+
return response.data;
|
|
212
|
+
}
|
|
213
|
+
async makePatchRequest(path, requestBody, ifMatch, requestConfig) {
|
|
214
|
+
return this.patchRequest(path, requestBody, ifMatch, this.getNonRetryableRequestConfig(requestConfig));
|
|
215
|
+
}
|
|
216
|
+
async makePatchRequestWithRetries(path, requestBody, ifMatch, config) {
|
|
217
|
+
return this.retryWrappedRequest(`makePatchRequestWithRetries('${path}')`, () => this.patchRequest(path, requestBody, ifMatch, this.getRetryableRequestConfig(config)), config);
|
|
218
|
+
}
|
|
219
|
+
async patchRequest(path, requestBody, ifMatch, config) {
|
|
220
|
+
const extraConfig = ifMatch ? { headers: { 'If-Match': ifMatch } } : {};
|
|
221
|
+
const response = await this.debugRequest('PATCH', path, () => this.httpClient.patch(path, requestBody, { ...config, ...extraConfig }));
|
|
222
|
+
BasicApiClient.checkResponseStatusCode(response);
|
|
223
|
+
return response.data;
|
|
224
|
+
}
|
|
225
|
+
async debugRequest(method, path, request) {
|
|
226
|
+
const startTimeMillis = Date.now();
|
|
227
|
+
let responseCode;
|
|
228
|
+
let error;
|
|
229
|
+
try {
|
|
230
|
+
this.debugLogger(`API Client: Sending ${method} ${path}`);
|
|
231
|
+
const response = await request();
|
|
232
|
+
responseCode = response.status;
|
|
233
|
+
return response;
|
|
234
|
+
}
|
|
235
|
+
catch (e) {
|
|
236
|
+
error = e;
|
|
237
|
+
throw e;
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
this.debugLogger(`API Client: ${method} ${path} ${error ? 'failed' : 'completed'} in ${Date.now() - startTimeMillis}ms with ${responseCode !== null && responseCode !== void 0 ? responseCode : error}`);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
static checkResponseStatusCode(response) {
|
|
244
|
+
const statusCode = response.status;
|
|
245
|
+
if (!statusCode || statusCode >= 400) {
|
|
246
|
+
throw new ApiError_1.ApiError(`[${statusCode} - ${response.statusText}]`, statusCode);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
retryWrappedRequest(description, requestFunc, retryConfigOverride) {
|
|
250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
251
|
+
const retryOptions = {
|
|
252
|
+
retries: (_c = (_a = retryConfigOverride === null || retryConfigOverride === void 0 ? void 0 : retryConfigOverride.retryCount) !== null && _a !== void 0 ? _a : (_b = this.retryConfig) === null || _b === void 0 ? void 0 : _b.retryCount) !== null && _c !== void 0 ? _c : DEFAULT_RETRIES,
|
|
253
|
+
minTimeout: (_f = (_d = retryConfigOverride === null || retryConfigOverride === void 0 ? void 0 : retryConfigOverride.minRetryIntervalMillis) !== null && _d !== void 0 ? _d : (_e = this.retryConfig) === null || _e === void 0 ? void 0 : _e.minRetryIntervalMillis) !== null && _f !== void 0 ? _f : DEFAULT_MIN_RETRY_INTERVAL_MILLISECONDS,
|
|
254
|
+
maxTimeout: (_j = (_g = retryConfigOverride === null || retryConfigOverride === void 0 ? void 0 : retryConfigOverride.maxRetryIntervalMillis) !== null && _g !== void 0 ? _g : (_h = this.retryConfig) === null || _h === void 0 ? void 0 : _h.maxRetryIntervalMillis) !== null && _j !== void 0 ? _j : DEFAULT_MAX_RETRY_INTERVAL_MILLISECONDS,
|
|
255
|
+
maxRetryTime: (_m = (_k = retryConfigOverride === null || retryConfigOverride === void 0 ? void 0 : retryConfigOverride.maxRetryTimeMillis) !== null && _k !== void 0 ? _k : (_l = this.retryConfig) === null || _l === void 0 ? void 0 : _l.maxRetryTimeMillis) !== null && _m !== void 0 ? _m : DEFAULT_MAX_TOTAL_RETRY_TIME_MILLISECONDS,
|
|
256
|
+
onRetry: (error) => {
|
|
257
|
+
this.debugLogger(`Retrying failed API request "${description}"`, error);
|
|
258
|
+
},
|
|
259
|
+
forever: false,
|
|
260
|
+
};
|
|
261
|
+
return (0, asyncUtil_1.promiseWithTimeout)((0, async_retry_1.default)(async (bail) => {
|
|
262
|
+
try {
|
|
263
|
+
return await requestFunc();
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
if (axios_1.default.isAxiosError(error) && BasicApiClient.isRetryable(error)) {
|
|
267
|
+
throw error;
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
let code;
|
|
271
|
+
if (axios_1.default.isAxiosError(error)) {
|
|
272
|
+
code = error.code;
|
|
273
|
+
}
|
|
274
|
+
this.debugLogger(`Non-retryable error on API client: ${code} ${description} ${error}`);
|
|
275
|
+
bail(error);
|
|
276
|
+
return {};
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}, retryOptions), retryOptions.maxRetryTime + retryOptions.maxTimeout, 'Retryable API request');
|
|
280
|
+
}
|
|
281
|
+
static isRetryable(axiosError) {
|
|
282
|
+
if (axiosError.response) {
|
|
283
|
+
const statusCode = axiosError.response.status;
|
|
284
|
+
return (statusCode === 429 ||
|
|
285
|
+
statusCode === 502 ||
|
|
286
|
+
statusCode === 503 ||
|
|
287
|
+
statusCode === 504);
|
|
288
|
+
}
|
|
289
|
+
return (axiosError.code !== undefined &&
|
|
290
|
+
RETRYABLE_NODEJS_ERRORS.includes(axiosError.code));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
exports.BasicApiClient = BasicApiClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Browser = void 0;
|
|
4
|
+
var Browser;
|
|
5
|
+
(function (Browser) {
|
|
6
|
+
Browser["chrome"] = "chrome";
|
|
7
|
+
Browser["edge"] = "edge";
|
|
8
|
+
Browser["firefox"] = "firefox";
|
|
9
|
+
Browser["internet_explorer"] = "internet_explorer";
|
|
10
|
+
Browser["safari"] = "safari";
|
|
11
|
+
})(Browser || (exports.Browser = Browser = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEmail = void 0;
|
|
4
|
+
const mablApi_1 = require("../../mablApi");
|
|
5
|
+
function isEmail(value) {
|
|
6
|
+
const test = value;
|
|
7
|
+
return (test.id !== undefined &&
|
|
8
|
+
test.input_artifacts !== undefined &&
|
|
9
|
+
test.input_properties !== undefined &&
|
|
10
|
+
test.input_type === mablApi_1.ExecutionInput.InputTypeEnum.Email &&
|
|
11
|
+
test.received_time !== undefined &&
|
|
12
|
+
test.workspace_id !== undefined);
|
|
13
|
+
}
|
|
14
|
+
exports.isEmail = isEmail;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindStrategy = void 0;
|
|
4
|
+
var FindStrategy;
|
|
5
|
+
(function (FindStrategy) {
|
|
6
|
+
FindStrategy["FindSummaryStrategy"] = "FindSummaryStrategy";
|
|
7
|
+
FindStrategy["LastDitchStrategy"] = "LastDitchStrategy";
|
|
8
|
+
FindStrategy["OverriddenFindOneStrategy"] = "OverriddenFindOneStrategy";
|
|
9
|
+
FindStrategy["PropertyWeightedFindOneStrategy"] = "PropertyWeightedFindOneStrategy";
|
|
10
|
+
})(FindStrategy || (exports.FindStrategy = FindStrategy = {}));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FeatureSet = exports.FindImplementationVersion = exports.AI_ASSERTIONS_FEATURE_FLAG = exports.ADVANCED_AUTO_HEALING_FEATURE_FLAG = exports.GENERATIVE_AI_FEATURE_FLAG = void 0;
|
|
4
|
+
const types_1 = require("../browserLauncher/types");
|
|
5
|
+
const ACCESSIBILITY_CHECK_FEATURE_FLAG = 'accessibility_checks';
|
|
6
|
+
const PERFORMANCE_TESTING_FEATURE_FLAG = 'performance_testing';
|
|
7
|
+
const SMARTER_WAIT_FEATURE_FLAG = 'smarter_wait';
|
|
8
|
+
exports.GENERATIVE_AI_FEATURE_FLAG = 'generative_ai';
|
|
9
|
+
exports.ADVANCED_AUTO_HEALING_FEATURE_FLAG = 'advanced_auto_healing';
|
|
10
|
+
exports.AI_ASSERTIONS_FEATURE_FLAG = 'ai_assertion_steps';
|
|
11
|
+
var FindImplementationVersion;
|
|
12
|
+
(function (FindImplementationVersion) {
|
|
13
|
+
FindImplementationVersion[FindImplementationVersion["V1"] = 0] = "V1";
|
|
14
|
+
FindImplementationVersion[FindImplementationVersion["SmartFind"] = 1] = "SmartFind";
|
|
15
|
+
})(FindImplementationVersion || (exports.FindImplementationVersion = FindImplementationVersion = {}));
|
|
16
|
+
class FeatureSet {
|
|
17
|
+
constructor(featureFlags) {
|
|
18
|
+
this.featureFlags = featureFlags;
|
|
19
|
+
}
|
|
20
|
+
getRunnerType() {
|
|
21
|
+
return types_1.RunnerType.Playwright;
|
|
22
|
+
}
|
|
23
|
+
getFindImplementationVersion() {
|
|
24
|
+
return this.featureFlags.has(SMARTER_WAIT_FEATURE_FLAG)
|
|
25
|
+
? FindImplementationVersion.SmartFind
|
|
26
|
+
: FindImplementationVersion.V1;
|
|
27
|
+
}
|
|
28
|
+
hasAccessibilityChecksEnabled() {
|
|
29
|
+
return this.featureFlags.has(ACCESSIBILITY_CHECK_FEATURE_FLAG);
|
|
30
|
+
}
|
|
31
|
+
hasPerformanceTestingFeatureEnabled() {
|
|
32
|
+
return this.featureFlags.has(PERFORMANCE_TESTING_FEATURE_FLAG);
|
|
33
|
+
}
|
|
34
|
+
hasAiAssertions() {
|
|
35
|
+
return this.featureFlags.has(exports.AI_ASSERTIONS_FEATURE_FLAG);
|
|
36
|
+
}
|
|
37
|
+
allowGenerativeAi() {
|
|
38
|
+
return this.featureFlags.has(exports.GENERATIVE_AI_FEATURE_FLAG);
|
|
39
|
+
}
|
|
40
|
+
useAdvancedAutoHeal() {
|
|
41
|
+
return this.featureFlags.has(exports.ADVANCED_AUTO_HEALING_FEATURE_FLAG);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.FeatureSet = FeatureSet;
|