@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,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.iOSTwoHorizontalScrollGrid2MobileFindDescriptor = exports.iOSVerticalGridCar75MobileFindDescriptor = exports.iOSVerticalGridContainerMobileFindDescriptor = exports.AndroidTestLabWebViewClickCounterMobileFindDescriptor = exports.iOSTestLabWebViewClickCounterMobileFindDescriptor = exports.AndroidWebViewTextFieldMobileFindDescriptor = exports.iOSWebViewTextFieldMobileFindDescriptor = void 0;
|
|
4
|
+
const domUtil_1 = require("../../../domUtil");
|
|
5
|
+
exports.iOSWebViewTextFieldMobileFindDescriptor = {
|
|
6
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
7
|
+
findTarget: {
|
|
8
|
+
selector: {
|
|
9
|
+
iOS: {
|
|
10
|
+
rect: {
|
|
11
|
+
width: 390,
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 175,
|
|
14
|
+
height: 635,
|
|
15
|
+
},
|
|
16
|
+
xpath: '//XCUIElementTypeApplication/XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeWebView',
|
|
17
|
+
visible: true,
|
|
18
|
+
index: 1,
|
|
19
|
+
alternateXPaths: [],
|
|
20
|
+
type: 'XCUIElementTypeWebView',
|
|
21
|
+
enabled: true,
|
|
22
|
+
},
|
|
23
|
+
uuid: '',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
webView: {
|
|
27
|
+
descriptor: {
|
|
28
|
+
findTarget: {
|
|
29
|
+
selector: {
|
|
30
|
+
bounding_width: '155',
|
|
31
|
+
visible: 'true',
|
|
32
|
+
tag_name: 'input',
|
|
33
|
+
namespace_uri: 'http://www.w3.org/1999/xhtml',
|
|
34
|
+
label: 'Regex pattern restriction (simple ip address-like):',
|
|
35
|
+
title: 'HTML5 Input Type test',
|
|
36
|
+
uuid: '',
|
|
37
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/input/inputtypes.html',
|
|
38
|
+
xpath: '//html[1]/body[1]/form[1]/table[1]/tbody[1]/tr[17]/td[2]/input[1]',
|
|
39
|
+
inputElementType: 'text',
|
|
40
|
+
name: 'input-regex',
|
|
41
|
+
id: 'input-regex',
|
|
42
|
+
bounding_height: '21',
|
|
43
|
+
bounding_x: '333',
|
|
44
|
+
bounding_y: '288',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
48
|
+
},
|
|
49
|
+
title: 'HTML5 Input Type test',
|
|
50
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/input/inputtypes.html',
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
exports.AndroidWebViewTextFieldMobileFindDescriptor = {
|
|
54
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
55
|
+
findTarget: {
|
|
56
|
+
selector: {
|
|
57
|
+
android: {
|
|
58
|
+
displayed: true,
|
|
59
|
+
checkable: false,
|
|
60
|
+
clickable: false,
|
|
61
|
+
focusable: false,
|
|
62
|
+
alternateXPaths: [],
|
|
63
|
+
enabled: true,
|
|
64
|
+
index: 0,
|
|
65
|
+
longClickable: false,
|
|
66
|
+
rect: {
|
|
67
|
+
width: 1440,
|
|
68
|
+
x: 0,
|
|
69
|
+
y: 280,
|
|
70
|
+
height: 2196,
|
|
71
|
+
},
|
|
72
|
+
password: false,
|
|
73
|
+
xpath: '//hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.compose.ui.platform.ComposeView/android.view.View/android.view.View/android.view.View/android.view.ViewGroup/android.webkit.WebView',
|
|
74
|
+
bounds: '[0,280][1440,2476]',
|
|
75
|
+
focused: false,
|
|
76
|
+
checked: false,
|
|
77
|
+
text: '',
|
|
78
|
+
class: 'android.webkit.WebView',
|
|
79
|
+
scrollable: false,
|
|
80
|
+
selected: false,
|
|
81
|
+
},
|
|
82
|
+
uuid: '',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
webView: {
|
|
86
|
+
descriptor: {
|
|
87
|
+
findTarget: {
|
|
88
|
+
selector: {
|
|
89
|
+
bounding_width: '191',
|
|
90
|
+
visible: 'true',
|
|
91
|
+
tag_name: 'input',
|
|
92
|
+
namespace_uri: 'http://www.w3.org/1999/xhtml',
|
|
93
|
+
label: 'Regex pattern restriction (simple ip address-like):',
|
|
94
|
+
title: 'HTML5 Input Type test',
|
|
95
|
+
uuid: '',
|
|
96
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/input/inputtypes.html',
|
|
97
|
+
xpath: '//html[1]/body[1]/form[1]/table[1]/tbody[1]/tr[17]/td[2]/input[1]',
|
|
98
|
+
inputElementType: 'text',
|
|
99
|
+
name: 'input-regex',
|
|
100
|
+
id: 'input-regex',
|
|
101
|
+
bounding_height: '21',
|
|
102
|
+
bounding_x: '92',
|
|
103
|
+
bounding_y: '476',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
107
|
+
},
|
|
108
|
+
title: 'HTML5 Input Type test',
|
|
109
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/input/inputtypes.html',
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
exports.iOSTestLabWebViewClickCounterMobileFindDescriptor = {
|
|
113
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
114
|
+
findTarget: {
|
|
115
|
+
selector: {
|
|
116
|
+
iOS: {
|
|
117
|
+
rect: {
|
|
118
|
+
width: 390,
|
|
119
|
+
x: 0,
|
|
120
|
+
y: 143,
|
|
121
|
+
height: 334,
|
|
122
|
+
},
|
|
123
|
+
visible: true,
|
|
124
|
+
xpath: '//XCUIElementTypeApplication/XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeWebView',
|
|
125
|
+
alternateXPaths: [],
|
|
126
|
+
type: 'XCUIElementTypeWebView',
|
|
127
|
+
enabled: true,
|
|
128
|
+
},
|
|
129
|
+
uuid: '',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
webView: {
|
|
133
|
+
descriptor: {
|
|
134
|
+
findTarget: {
|
|
135
|
+
selector: {
|
|
136
|
+
bounding_width: '69',
|
|
137
|
+
visible: 'true',
|
|
138
|
+
tag_name: 'button',
|
|
139
|
+
namespace_uri: 'http://www.w3.org/1999/xhtml',
|
|
140
|
+
title: 'test lab - click counter',
|
|
141
|
+
uuid: '',
|
|
142
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/click/click-counter.html',
|
|
143
|
+
xpath: '//html[1]/body[1]/div[1]/button[1]',
|
|
144
|
+
id: 'click-me-button',
|
|
145
|
+
text: 'Click me',
|
|
146
|
+
bounding_height: '29',
|
|
147
|
+
bounding_x: '40',
|
|
148
|
+
bounding_y: '125',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
152
|
+
},
|
|
153
|
+
title: 'test lab - click counter',
|
|
154
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/click/click-counter.html',
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
exports.AndroidTestLabWebViewClickCounterMobileFindDescriptor = {
|
|
158
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
159
|
+
findTarget: {
|
|
160
|
+
selector: {
|
|
161
|
+
android: {
|
|
162
|
+
displayed: true,
|
|
163
|
+
checkable: false,
|
|
164
|
+
clickable: false,
|
|
165
|
+
focusable: false,
|
|
166
|
+
alternateXPaths: [],
|
|
167
|
+
enabled: true,
|
|
168
|
+
index: 0,
|
|
169
|
+
longClickable: false,
|
|
170
|
+
rect: {
|
|
171
|
+
width: 1000,
|
|
172
|
+
x: 0,
|
|
173
|
+
y: 280,
|
|
174
|
+
height: 700,
|
|
175
|
+
},
|
|
176
|
+
password: false,
|
|
177
|
+
xpath: '//hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.compose.ui.platform.ComposeView/android.view.View/android.view.View/android.view.View/android.view.ViewGroup/android.webkit.WebView',
|
|
178
|
+
bounds: '[0,280][1000,980]',
|
|
179
|
+
focused: false,
|
|
180
|
+
checked: false,
|
|
181
|
+
text: '',
|
|
182
|
+
class: 'android.webkit.WebView',
|
|
183
|
+
scrollable: false,
|
|
184
|
+
selected: false,
|
|
185
|
+
},
|
|
186
|
+
uuid: '',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
webView: {
|
|
190
|
+
descriptor: {
|
|
191
|
+
findTarget: {
|
|
192
|
+
selector: {
|
|
193
|
+
bounding_width: '67',
|
|
194
|
+
visible: 'true',
|
|
195
|
+
tag_name: 'button',
|
|
196
|
+
namespace_uri: 'http://www.w3.org/1999/xhtml',
|
|
197
|
+
title: 'test lab - click counter',
|
|
198
|
+
uuid: '',
|
|
199
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/click/click-counter.html',
|
|
200
|
+
xpath: '//html[1]/body[1]/div[1]/button[1]',
|
|
201
|
+
id: 'click-me-button',
|
|
202
|
+
text: 'Click me',
|
|
203
|
+
bounding_height: '21',
|
|
204
|
+
bounding_x: '40',
|
|
205
|
+
bounding_y: '115',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
209
|
+
},
|
|
210
|
+
title: 'test lab - click counter',
|
|
211
|
+
url: 'https://storage.googleapis.com/public-dev-test-lab/click/click-counter.html',
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
exports.iOSVerticalGridContainerMobileFindDescriptor = {
|
|
215
|
+
findTarget: {
|
|
216
|
+
selector: {
|
|
217
|
+
iOS: {
|
|
218
|
+
type: 'XCUIElementTypeOther',
|
|
219
|
+
enabled: true,
|
|
220
|
+
rect: {
|
|
221
|
+
x: 0,
|
|
222
|
+
y: 143,
|
|
223
|
+
width: 390,
|
|
224
|
+
height: 5142,
|
|
225
|
+
},
|
|
226
|
+
index: 0,
|
|
227
|
+
xpath: '//XCUIElementTypeApplication/XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView/XCUIElementTypeOther',
|
|
228
|
+
alternateXPaths: [],
|
|
229
|
+
},
|
|
230
|
+
uuid: '',
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
234
|
+
};
|
|
235
|
+
exports.iOSVerticalGridCar75MobileFindDescriptor = {
|
|
236
|
+
findTarget: {
|
|
237
|
+
selector: {
|
|
238
|
+
iOS: {
|
|
239
|
+
rect: {
|
|
240
|
+
width: 51,
|
|
241
|
+
x: 219,
|
|
242
|
+
y: 657,
|
|
243
|
+
height: 21,
|
|
244
|
+
},
|
|
245
|
+
xpath: '//XCUIElementTypeApplication/XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeButton[55]/XCUIElementTypeStaticText',
|
|
246
|
+
name: 'Car 75',
|
|
247
|
+
index: 1,
|
|
248
|
+
alternateXPaths: [
|
|
249
|
+
'//XCUIElementTypeStaticText[@name="Car 75"]',
|
|
250
|
+
'//XCUIElementTypeButton[@name="Car 75"]/XCUIElementTypeStaticText',
|
|
251
|
+
],
|
|
252
|
+
label: 'Car 75',
|
|
253
|
+
type: 'XCUIElementTypeStaticText',
|
|
254
|
+
enabled: true,
|
|
255
|
+
},
|
|
256
|
+
uuid: '',
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
260
|
+
};
|
|
261
|
+
exports.iOSTwoHorizontalScrollGrid2MobileFindDescriptor = {
|
|
262
|
+
findTarget: {
|
|
263
|
+
selector: {
|
|
264
|
+
uuid: 'd0efcf61-de79-49d2-91e3-dd318185576b',
|
|
265
|
+
iOS: {
|
|
266
|
+
type: 'XCUIElementTypeOther',
|
|
267
|
+
name: 'grid-2',
|
|
268
|
+
enabled: true,
|
|
269
|
+
rect: {
|
|
270
|
+
x: 0,
|
|
271
|
+
y: 517,
|
|
272
|
+
width: 1125,
|
|
273
|
+
height: 301,
|
|
274
|
+
},
|
|
275
|
+
index: 0,
|
|
276
|
+
xpath: '//XCUIElementTypeApplication/XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView[2]/XCUIElementTypeOther/XCUIElementTypeOther',
|
|
277
|
+
alternateXPaths: ['//XCUIElementTypeOther[@name="grid-2"]'],
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
282
|
+
};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const domUtil_1 = require("../../../../domUtil");
|
|
4
|
+
const CreateVariableStepDescriptor_1 = require("../../../types/CreateVariableStepDescriptor");
|
|
5
|
+
const CreateVariableMobileStep_1 = require("../../steps/CreateVariableMobileStep");
|
|
6
|
+
const StepTestsUtil_1 = require("../StepTestsUtil");
|
|
7
|
+
describe('CreateVariable mobile steps parse correctly', () => {
|
|
8
|
+
it('Parses a CreateVariable mobile step with variable pattern', () => {
|
|
9
|
+
const stepDescriptor = {
|
|
10
|
+
id: 'VariableSchmariable',
|
|
11
|
+
generator: {
|
|
12
|
+
pattern: `my value: {{digit:3}}`,
|
|
13
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.PATTERN,
|
|
14
|
+
},
|
|
15
|
+
actionCode: 'as',
|
|
16
|
+
name: 'myValue',
|
|
17
|
+
};
|
|
18
|
+
const steps = [
|
|
19
|
+
{
|
|
20
|
+
CreateVariable: stepDescriptor,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
24
|
+
const varStep = new CreateVariableMobileStep_1.CreateVariableMobileStep(stepDescriptor);
|
|
25
|
+
expect(varStep.stepId()).toEqual(stepDescriptor.id);
|
|
26
|
+
});
|
|
27
|
+
it('Parses a CreateVariable mobile step for generating email address', () => {
|
|
28
|
+
const stepDescriptor = {
|
|
29
|
+
generator: {
|
|
30
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.EMAIL,
|
|
31
|
+
},
|
|
32
|
+
name: 'email',
|
|
33
|
+
actionCode: 'as',
|
|
34
|
+
};
|
|
35
|
+
const steps = [
|
|
36
|
+
{
|
|
37
|
+
CreateVariable: stepDescriptor,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
41
|
+
});
|
|
42
|
+
it('Parses a CreateVariable mobile step for element attribute (Android)', () => {
|
|
43
|
+
const stepDescriptor = {
|
|
44
|
+
find: {
|
|
45
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
46
|
+
findTarget: {
|
|
47
|
+
selector: {
|
|
48
|
+
android: {
|
|
49
|
+
text: 'Profile',
|
|
50
|
+
},
|
|
51
|
+
uuid: '',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
generator: {
|
|
56
|
+
attribute: 'text',
|
|
57
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.ATTRIBUTE,
|
|
58
|
+
},
|
|
59
|
+
name: 'profile',
|
|
60
|
+
actionCode: 'as',
|
|
61
|
+
};
|
|
62
|
+
const steps = [
|
|
63
|
+
{
|
|
64
|
+
CreateVariable: stepDescriptor,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
68
|
+
});
|
|
69
|
+
it('Parses a CreateVariable mobile step for element attribute (iOS)', () => {
|
|
70
|
+
const stepDescriptor = {
|
|
71
|
+
find: {
|
|
72
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
73
|
+
findTarget: {
|
|
74
|
+
selector: {
|
|
75
|
+
iOS: {
|
|
76
|
+
name: `PROFILE`,
|
|
77
|
+
},
|
|
78
|
+
uuid: '',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
generator: {
|
|
83
|
+
attribute: 'name',
|
|
84
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.ATTRIBUTE,
|
|
85
|
+
},
|
|
86
|
+
name: 'profile',
|
|
87
|
+
actionCode: 'as',
|
|
88
|
+
};
|
|
89
|
+
const steps = [
|
|
90
|
+
{
|
|
91
|
+
CreateVariable: stepDescriptor,
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
95
|
+
});
|
|
96
|
+
it('Parses a CreateVariable mobile step for element count (Android)', () => {
|
|
97
|
+
const stepDescriptor = {
|
|
98
|
+
find: {
|
|
99
|
+
findType: domUtil_1.FindType.FIND_ALL,
|
|
100
|
+
findTarget: {
|
|
101
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
102
|
+
},
|
|
103
|
+
foundElementSelectors: {
|
|
104
|
+
android: {
|
|
105
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
106
|
+
},
|
|
107
|
+
uuid: '',
|
|
108
|
+
},
|
|
109
|
+
primarySelectors: {
|
|
110
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
generator: {
|
|
114
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.ELEMENT_COUNT,
|
|
115
|
+
},
|
|
116
|
+
name: 'count',
|
|
117
|
+
actionCode: 'as',
|
|
118
|
+
};
|
|
119
|
+
const steps = [
|
|
120
|
+
{
|
|
121
|
+
CreateVariable: stepDescriptor,
|
|
122
|
+
},
|
|
123
|
+
];
|
|
124
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
125
|
+
});
|
|
126
|
+
it('Parses a CreateVariable mobile step for element count (iOS)', () => {
|
|
127
|
+
const stepDescriptor = {
|
|
128
|
+
find: {
|
|
129
|
+
findType: domUtil_1.FindType.FIND_ALL,
|
|
130
|
+
findTarget: {
|
|
131
|
+
xpath: "//XCUIElementTypeStaticText[@name='Car']",
|
|
132
|
+
},
|
|
133
|
+
foundElementSelectors: {
|
|
134
|
+
android: {
|
|
135
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
136
|
+
},
|
|
137
|
+
uuid: '',
|
|
138
|
+
},
|
|
139
|
+
primarySelectors: {
|
|
140
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
generator: {
|
|
144
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.ELEMENT_COUNT,
|
|
145
|
+
},
|
|
146
|
+
name: 'count',
|
|
147
|
+
actionCode: 'as',
|
|
148
|
+
};
|
|
149
|
+
const steps = [
|
|
150
|
+
{
|
|
151
|
+
CreateVariable: stepDescriptor,
|
|
152
|
+
},
|
|
153
|
+
];
|
|
154
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
155
|
+
});
|
|
156
|
+
it('Parses a CreateVariable mobile step for JavaScript snippet (Android)', () => {
|
|
157
|
+
const stepDescriptor = {
|
|
158
|
+
generator: {
|
|
159
|
+
javaScript: { encodedJS: 'myScript', actionCode: 'evaluate_js' },
|
|
160
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.JAVASCRIPT,
|
|
161
|
+
},
|
|
162
|
+
actionCode: 'as',
|
|
163
|
+
name: 'result',
|
|
164
|
+
};
|
|
165
|
+
const steps = [
|
|
166
|
+
{
|
|
167
|
+
CreateVariable: stepDescriptor,
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
171
|
+
});
|
|
172
|
+
it('Parses a CreateVariable mobile step for element count (iOS)', () => {
|
|
173
|
+
const stepDescriptor = {
|
|
174
|
+
generator: {
|
|
175
|
+
javaScript: { encodedJS: 'myScript', actionCode: 'evaluate_js' },
|
|
176
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.JAVASCRIPT,
|
|
177
|
+
},
|
|
178
|
+
name: 'result',
|
|
179
|
+
actionCode: 'as',
|
|
180
|
+
};
|
|
181
|
+
const steps = [
|
|
182
|
+
{
|
|
183
|
+
CreateVariable: stepDescriptor,
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, CreateVariableMobileStep_1.CreateVariableMobileStep.stepName, stepDescriptor);
|
|
187
|
+
});
|
|
188
|
+
it('Humanizes a Create variable from pattern step', () => {
|
|
189
|
+
const stepDescriptor = {
|
|
190
|
+
CreateVariable: {
|
|
191
|
+
generator: {
|
|
192
|
+
pattern: `my value: {{digit:3}}`,
|
|
193
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.PATTERN,
|
|
194
|
+
},
|
|
195
|
+
name: 'myValue',
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
const step = (0, StepTestsUtil_1.loadRawStepIntoMablStep)(stepDescriptor);
|
|
199
|
+
expect(step.stepDescription()).toEqual(`Assign variable \"myValue\" value from string generated with format \"my value: {{digit:3}}\"`);
|
|
200
|
+
});
|
|
201
|
+
it('Humanizes a Create variable from email step', () => {
|
|
202
|
+
const stepDescriptor = {
|
|
203
|
+
CreateVariable: {
|
|
204
|
+
generator: {
|
|
205
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.EMAIL,
|
|
206
|
+
},
|
|
207
|
+
name: 'email',
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
const step = (0, StepTestsUtil_1.loadRawStepIntoMablStep)(stepDescriptor);
|
|
211
|
+
expect(step.stepDescription()).toEqual(`Generate a new mabl mailbox email address`);
|
|
212
|
+
});
|
|
213
|
+
it('Humanizes a Create variable from element attribute step (android)', () => {
|
|
214
|
+
const stepDescriptor = {
|
|
215
|
+
CreateVariable: {
|
|
216
|
+
find: {
|
|
217
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
218
|
+
findTarget: {
|
|
219
|
+
selector: {
|
|
220
|
+
android: {
|
|
221
|
+
text: 'Profile',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
generator: {
|
|
227
|
+
attribute: 'text',
|
|
228
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.ATTRIBUTE,
|
|
229
|
+
},
|
|
230
|
+
name: 'profile',
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
const step = (0, StepTestsUtil_1.loadRawStepIntoMablStep)(stepDescriptor);
|
|
234
|
+
expect(step.stepDescription()).toEqual(`Assign variable \"profile\" value from element attribute \"text\"`);
|
|
235
|
+
});
|
|
236
|
+
it('Humanizes a Create variable from element attribute step (iOS)', () => {
|
|
237
|
+
const stepDescriptor = {
|
|
238
|
+
CreateVariable: {
|
|
239
|
+
find: {
|
|
240
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
241
|
+
findTarget: {
|
|
242
|
+
selector: {
|
|
243
|
+
iOS: {
|
|
244
|
+
name: `PROFILE`,
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
generator: {
|
|
250
|
+
attribute: 'name',
|
|
251
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.ATTRIBUTE,
|
|
252
|
+
},
|
|
253
|
+
name: 'profile',
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
const step = (0, StepTestsUtil_1.loadRawStepIntoMablStep)(stepDescriptor);
|
|
257
|
+
expect(step.stepDescription()).toEqual(`Assign variable \"profile\" value from element attribute \"name\"`);
|
|
258
|
+
});
|
|
259
|
+
it('Humanizes a Create variable from element count', () => {
|
|
260
|
+
const stepDescriptor = {
|
|
261
|
+
CreateVariable: {
|
|
262
|
+
find: {
|
|
263
|
+
findType: domUtil_1.FindType.FIND_ALL,
|
|
264
|
+
findTarget: {
|
|
265
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
266
|
+
},
|
|
267
|
+
foundElementSelectors: {
|
|
268
|
+
android: {
|
|
269
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
primarySelectors: {
|
|
273
|
+
xpath: "//android.widget.TextView[@text='Car']",
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
generator: {
|
|
277
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.ELEMENT_COUNT,
|
|
278
|
+
},
|
|
279
|
+
name: 'count',
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
const step = (0, StepTestsUtil_1.loadRawStepIntoMablStep)(stepDescriptor);
|
|
283
|
+
expect(step.stepDescription()).toEqual(`Assign variable \"count\" value from element count using xpath: //android.widget.TextView[@text='Car']`);
|
|
284
|
+
});
|
|
285
|
+
it('Humanizes a Create variable from script snippet', () => {
|
|
286
|
+
const stepDescriptor = {
|
|
287
|
+
CreateVariable: {
|
|
288
|
+
generator: {
|
|
289
|
+
javaScript: { encodedJS: 'myScript' },
|
|
290
|
+
type: CreateVariableStepDescriptor_1.VariableGenerator.JAVASCRIPT,
|
|
291
|
+
},
|
|
292
|
+
name: 'result',
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
const step = (0, StepTestsUtil_1.loadRawStepIntoMablStep)(stepDescriptor);
|
|
296
|
+
expect(step.stepDescription()).toEqual(`Assign variable \"result\" using script`);
|
|
297
|
+
});
|
|
298
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const EnterTextStep_1 = require("../../steps/EnterTextStep");
|
|
4
|
+
const domUtil_1 = require("../../../../domUtil");
|
|
5
|
+
const MablSymbol_1 = require("../../../MablSymbol");
|
|
6
|
+
const StepTestsUtil_1 = require("../StepTestsUtil");
|
|
7
|
+
const TestMobileFindDescriptors_1 = require("../TestMobileFindDescriptors");
|
|
8
|
+
describe('EnterText steps parse correctly', () => {
|
|
9
|
+
it('Parses an EnterText step with a Find One selector', () => {
|
|
10
|
+
const find = {
|
|
11
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
12
|
+
findTarget: {
|
|
13
|
+
selector: {
|
|
14
|
+
iOS: {
|
|
15
|
+
name: 'Name field',
|
|
16
|
+
},
|
|
17
|
+
uuid: '',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const enterTextStepDescriptor = {
|
|
22
|
+
find,
|
|
23
|
+
text: 'Mauro',
|
|
24
|
+
actionCode: 'enter_text',
|
|
25
|
+
};
|
|
26
|
+
const steps = [
|
|
27
|
+
{
|
|
28
|
+
EnterText: enterTextStepDescriptor,
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, EnterTextStep_1.EnterTextStep.stepName, enterTextStepDescriptor);
|
|
32
|
+
const enterTextStep = new EnterTextStep_1.EnterTextStep(enterTextStepDescriptor);
|
|
33
|
+
expect(enterTextStep.getInputVariables()).toHaveLength(0);
|
|
34
|
+
});
|
|
35
|
+
it('Parses an EnterText step with a Find One selector and a variable', () => {
|
|
36
|
+
const find = {
|
|
37
|
+
findType: domUtil_1.FindType.FIND_ONE,
|
|
38
|
+
findTarget: {
|
|
39
|
+
selector: {
|
|
40
|
+
iOS: {
|
|
41
|
+
name: '{{@varInFind}}',
|
|
42
|
+
},
|
|
43
|
+
uuid: '',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
const enterTextStepDescriptor = {
|
|
48
|
+
id: 'TypingTypesForTypers',
|
|
49
|
+
find,
|
|
50
|
+
text: new MablSymbol_1.MablSymbol('user.input'),
|
|
51
|
+
actionCode: 'enter_text',
|
|
52
|
+
};
|
|
53
|
+
const steps = [
|
|
54
|
+
{
|
|
55
|
+
EnterText: enterTextStepDescriptor,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, EnterTextStep_1.EnterTextStep.stepName, enterTextStepDescriptor);
|
|
59
|
+
const enterTextStep = new EnterTextStep_1.EnterTextStep(enterTextStepDescriptor);
|
|
60
|
+
expect(enterTextStep.getInputVariables()).toStrictEqual([
|
|
61
|
+
'varInFind',
|
|
62
|
+
'user.input',
|
|
63
|
+
]);
|
|
64
|
+
expect(enterTextStep.stepId()).toEqual(enterTextStepDescriptor.id);
|
|
65
|
+
});
|
|
66
|
+
it('Parses a WebView EnterText step with a Find One selector and a variable', () => {
|
|
67
|
+
const enterTextStepDescriptor = {
|
|
68
|
+
find: TestMobileFindDescriptors_1.iOSWebViewTextFieldMobileFindDescriptor,
|
|
69
|
+
text: new MablSymbol_1.MablSymbol('user.input'),
|
|
70
|
+
actionCode: 'enter_text',
|
|
71
|
+
};
|
|
72
|
+
const steps = [
|
|
73
|
+
{
|
|
74
|
+
EnterText: enterTextStepDescriptor,
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, EnterTextStep_1.EnterTextStep.stepName, enterTextStepDescriptor);
|
|
78
|
+
});
|
|
79
|
+
});
|