@mablhq/mabl-cli 1.16.16 → 1.17.0
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/api/basicApiClient.js +9 -4
- package/api/mablApiClient.js +14 -7
- package/browserLauncher/browserLauncherFactory.js +2 -1
- package/browserLauncher/elementHandle.js +2 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +5 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +22 -18
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +10 -6
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +5 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +13 -9
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerBrowser.js +1 -1
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerElementHandle.js +10 -10
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerFrame.js +6 -6
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerHttpRequest.js +1 -1
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerHttpResponse.js +1 -1
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerJsHandle.js +3 -3
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerPage.js +12 -11
- package/cli.js +12 -8
- package/commands/applications/applications_cmds/describe.js +4 -4
- package/commands/applications/applications_cmds/list.js +4 -4
- package/commands/auth/auth_cmds/activate-key.js +1 -1
- package/commands/branches/branches_cmds/create.js +4 -4
- package/commands/branches/branches_cmds/describe.js +3 -3
- package/commands/branches/branches_cmds/list.js +3 -3
- package/commands/branches/branches_cmds/merge.js +4 -4
- package/commands/commandUtil/codeInsights.js +4 -2
- package/commands/commandUtil/describe.js +1 -1
- package/commands/commandUtil/fileUtil.js +5 -1
- package/commands/commandUtil/util.js +2 -2
- package/commands/config/config_cmds/delete.js +1 -1
- package/commands/config/config_cmds/set.js +1 -1
- package/commands/constants.js +2 -1
- package/commands/credentials/credentials_cmds/list.js +4 -4
- package/commands/deploy/deploy_cmds/create.js +18 -13
- package/commands/deploy/deploy_cmds/describe.js +5 -5
- package/commands/deploy/deploy_cmds/executionResultPresenter.js +1 -1
- package/commands/deploy/deploy_cmds/list.js +4 -4
- package/commands/deploy/deploy_cmds/watch.js +2 -2
- package/commands/environments/environments_cmds/create.js +7 -7
- package/commands/environments/environments_cmds/delete.js +1 -1
- package/commands/environments/environments_cmds/describe.js +4 -4
- package/commands/environments/environments_cmds/list.js +4 -4
- package/commands/environments/environments_cmds/update.js +2 -2
- package/commands/environments/environments_cmds/urls_cmds/add.js +3 -3
- package/commands/environments/environments_cmds/urls_cmds/list.js +2 -2
- package/commands/flows/flows_cmds/export.js +5 -5
- package/commands/flows/flows_cmds/list.js +2 -2
- package/commands/link-agents/link-agents_cmds/delete.js +1 -1
- package/commands/plans/plans_cmds/describe.js +4 -4
- package/commands/plans/plans_cmds/list.js +2 -2
- package/commands/test-runs/test-runs_cmds/export.js +2 -2
- package/commands/tests/executionUtil.js +5 -5
- package/commands/tests/testsUtil.js +24 -13
- package/commands/tests/tests_cmds/create.js +3 -3
- package/commands/tests/tests_cmds/edit.js +3 -3
- package/commands/tests/tests_cmds/export.js +7 -7
- package/commands/tests/tests_cmds/import.js +35 -14
- package/commands/tests/tests_cmds/list.js +3 -3
- package/commands/tests/tests_cmds/run-alpha.js +3 -3
- package/commands/tests/tests_cmds/run-cloud.js +4 -4
- package/commands/tests/tests_cmds/run-legacy.js +8 -8
- package/commands/tests/tests_cmds/run.js +8 -8
- package/commands/tests/tests_cmds/trainer_cmds/trainerUtil.js +2 -2
- package/commands/tests/tests_cmds/trainer_cmds/update.js +1 -1
- package/commands/tests/tests_cmds/trainer_cmds/version.js +2 -2
- package/commands/workspaces/workspace_cmds/copy.js +2 -2
- package/commands/workspaces/workspace_cmds/describe.js +4 -4
- package/commands/workspaces/workspace_cmds/list.js +2 -2
- package/configGenerators/flowConfigGenerator.js +1 -1
- package/configGenerators/selIdeGenerator.js +6 -6
- package/core/messaging/actions/runnerActions.js +2 -2
- package/core/trainer/openUtils.js +2 -2
- package/core/trainer/trainingSessions.js +26 -26
- package/domUtil/index.js +1 -1
- package/env/env.js +5 -1
- package/execution/index.js +1 -1
- package/mablApi/index.js +1 -1
- package/mablscript/AttributesConstants.js +2 -1
- package/mablscript/MablStep.js +6 -12
- package/mablscript/actions/ConditionAction.js +1 -1
- package/mablscript/actions/FindAction.js +34 -38
- package/mablscript/actions/GetUrlAction.js +1 -1
- package/mablscript/actions/GetVariableValue.js +1 -1
- package/mablscript/actions/JavaScriptAction.js +16 -16
- package/mablscript/importer.js +7 -7
- package/mablscript/steps/AccessibilityCheck.js +4 -2
- package/mablscript/steps/AssertStep.js +16 -16
- package/mablscript/steps/AssertStepOld.js +2 -2
- package/mablscript/steps/ClickStep.js +1 -1
- package/mablscript/steps/CreateVariableStep.js +6 -6
- package/mablscript/steps/DoubleClickStep.js +1 -1
- package/mablscript/steps/EchoStep.js +2 -2
- package/mablscript/steps/EnterTextStep.js +3 -3
- package/mablscript/steps/HoverStep.js +1 -1
- package/mablscript/steps/IfConditionStep.js +2 -1
- package/mablscript/steps/NavigateStep.js +1 -1
- package/mablscript/steps/SendHttpRequestStep.js +1 -1
- package/mablscript/steps/SendKeyStep.js +2 -2
- package/mablscript/steps/SetViewportStep.js +1 -1
- package/mablscript/steps/SwitchContextStep.js +9 -9
- package/mablscript/steps/VisitUrlStep.js +1 -1
- package/mablscript/steps/WaitStep.js +1 -1
- package/mablscript/steps/WaitUntilStep.js +1 -1
- package/mablscript/types/OperatingSystemDescriptor.js +5 -1
- package/mablscript/types/VariableNamespace.js +1 -1
- package/mablscriptFind/index.js +1 -1
- package/observers/mockObserver.js +4 -2
- package/package.json +56 -56
- package/popupDismissal/index.js +3 -3
- package/providers/authenticationProvider.js +3 -3
- package/providers/logging/loggingProvider.js +5 -1
- package/proxy/index.js +2 -1
- package/proxy/index.js.LICENSE.txt +5 -0
- package/reporters/mochAwesome/mochAwesomeReporter.js +11 -7
- package/reporters/reporter.js +1 -1
- package/resources/mablFind.js +1 -1
- package/resources/pdf-viewer/embeddedPdfDetection.js +19 -8
- package/resources/popupDismissal.js +1 -1
- package/util/RichPromise.js +1 -0
- package/util/actionabilityUtil.js +18 -14
- package/util/analytics.js +7 -3
- package/util/downloadUtil.js +6 -2
- package/util/httpUtil.js +6 -2
- package/util/logUtils.js +7 -1
- package/util/markdownUtil.js +1 -1
- package/util/pureUtil.js +5 -1
- package/util/resourceUtil.js +5 -1
|
@@ -10,9 +10,9 @@ class EnterTextStep extends MablStep_1.MablStep {
|
|
|
10
10
|
constructor(name, args, actions) {
|
|
11
11
|
super(name, args, actions);
|
|
12
12
|
const arg = this.getActionArgs()[0];
|
|
13
|
-
this.text = MablAction_1.parseArgument(arg);
|
|
13
|
+
this.text = (0, MablAction_1.parseArgument)(arg);
|
|
14
14
|
this.validate();
|
|
15
|
-
if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
|
|
15
|
+
if ((0, mablscriptFind_1.isFindElementType)(this.actions[0].getActionName())) {
|
|
16
16
|
this.findAction = this.actions[0];
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
@@ -71,7 +71,7 @@ class EnterTextStep extends MablStep_1.MablStep {
|
|
|
71
71
|
return formatted;
|
|
72
72
|
}
|
|
73
73
|
produceSelIdeFormattedSteps(_stepIndex) {
|
|
74
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('type', this);
|
|
74
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('type', this);
|
|
75
75
|
seleniumStep.target = this.findAction.getSelIdeTarget();
|
|
76
76
|
seleniumStep.value = this.substituteSeleniumVariable(this.text);
|
|
77
77
|
return [seleniumStep];
|
|
@@ -46,7 +46,7 @@ class HoverStep extends MablStep_1.MablStep {
|
|
|
46
46
|
return new HoverStep('hover', [], [FindAction_1.FindAction.findActionFromStepArgs(stepArgs)]);
|
|
47
47
|
}
|
|
48
48
|
produceSelIdeFormattedSteps(_stepIndex) {
|
|
49
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('mouseOver', this);
|
|
49
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('mouseOver', this);
|
|
50
50
|
seleniumStep.target = this.findAction.getSelIdeTarget();
|
|
51
51
|
return [seleniumStep];
|
|
52
52
|
}
|
|
@@ -34,7 +34,8 @@ class IfConditionStep extends MablStep_1.MablStep {
|
|
|
34
34
|
toStepDescriptor() {
|
|
35
35
|
var _a, _b;
|
|
36
36
|
const conditionDescriptor = this.conditionAction !== undefined
|
|
37
|
-
? (_a = this.conditionAction) === null || _a === void 0 ? void 0 : _a.conditionDescriptor
|
|
37
|
+
? (_a = this.conditionAction) === null || _a === void 0 ? void 0 : _a.conditionDescriptor
|
|
38
|
+
: { conditionType: ConditionDescriptor_1.ConditionType.Truthy };
|
|
38
39
|
const find = this.primaryAction.toDescriptor();
|
|
39
40
|
return {
|
|
40
41
|
find,
|
|
@@ -17,7 +17,7 @@ class NavigateStep extends MablStep_1.MablStep {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
produceSelIdeFormattedSteps(_stepIndex) {
|
|
20
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('executeScript', this);
|
|
20
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('executeScript', this);
|
|
21
21
|
seleniumStep.target = 'window.location.reload()';
|
|
22
22
|
return [seleniumStep];
|
|
23
23
|
}
|
|
@@ -36,7 +36,7 @@ class SendHttpRequestStep extends MablStep_1.MablStep {
|
|
|
36
36
|
return new SendHttpRequestStep('send_http_request', [formatted], []);
|
|
37
37
|
}
|
|
38
38
|
toMablscript() {
|
|
39
|
-
const stepAsSource = MablStep_1.buildSourceRepresentationOfObject(this.sendRequest);
|
|
39
|
+
const stepAsSource = (0, MablStep_1.buildSourceRepresentationOfObject)(this.sendRequest);
|
|
40
40
|
return `send_http_request(${stepAsSource})`;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -35,7 +35,7 @@ class SendKeyStep extends MablStep_1.MablStep {
|
|
|
35
35
|
if (this.actions.length !== 1 && !(this.actions[0] instanceof FindAction_1.FindAction)) {
|
|
36
36
|
throw new Error(`${name} step should have one sub-action and it should be a find`);
|
|
37
37
|
}
|
|
38
|
-
if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
|
|
38
|
+
if ((0, mablscriptFind_1.isFindElementType)(this.actions[0].getActionName())) {
|
|
39
39
|
this.findAction = this.actions[0];
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
@@ -81,7 +81,7 @@ class SendKeyStep extends MablStep_1.MablStep {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
produceSelIdeFormattedSteps() {
|
|
84
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('sendKeys', this);
|
|
84
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('sendKeys', this);
|
|
85
85
|
seleniumStep.target = this.findAction.getSelIdeTarget();
|
|
86
86
|
seleniumStep.value = this.keys
|
|
87
87
|
.map((keyPress) => {
|
|
@@ -16,7 +16,7 @@ class SetViewportStep extends MablStep_1.MablStep {
|
|
|
16
16
|
return { size: this.size };
|
|
17
17
|
}
|
|
18
18
|
produceSelIdeFormattedSteps(_stepIndex) {
|
|
19
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('setWindowSize', this);
|
|
19
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('setWindowSize', this);
|
|
20
20
|
const width = this.size.width || 1920;
|
|
21
21
|
const height = this.size.height || 1080;
|
|
22
22
|
seleniumStep.target = this.substituteSeleniumVariable(`${width}x${height}`);
|
|
@@ -73,37 +73,37 @@ class SwitchContextStep extends MablStep_1.MablStep {
|
|
|
73
73
|
if (this.description) {
|
|
74
74
|
formatted[stepName].description = this.description;
|
|
75
75
|
}
|
|
76
|
-
if (SwitchContextStepDescriptor_1.isSwitchTab(step)) {
|
|
76
|
+
if ((0, SwitchContextStepDescriptor_1.isSwitchTab)(step)) {
|
|
77
77
|
formatted[stepName].findType = 'FindTab';
|
|
78
78
|
formatted[stepName].selector = step.tab.findTarget;
|
|
79
79
|
}
|
|
80
|
-
if (SwitchContextStepDescriptor_1.isSwitchFrame(step)) {
|
|
80
|
+
if ((0, SwitchContextStepDescriptor_1.isSwitchFrame)(step)) {
|
|
81
81
|
formatted[stepName].selector = step.frame.findTarget.selector;
|
|
82
82
|
if ((_a = step.frame.findTarget.auxiliaryDescriptors) === null || _a === void 0 ? void 0 : _a.length) {
|
|
83
83
|
formatted[stepName].selectorAncestors =
|
|
84
84
|
step.frame.findTarget.auxiliaryDescriptors.map((descriptor) => descriptor.selector);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
if (SwitchContextStepDescriptor_1.isSwitchRoot(step) && step.frame === 'root') {
|
|
87
|
+
if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(step) && step.frame === 'root') {
|
|
88
88
|
formatted[stepName].switch = 'root';
|
|
89
89
|
}
|
|
90
90
|
return formatted;
|
|
91
91
|
}
|
|
92
92
|
produceSelIdeFormattedSteps(_stepIndex) {
|
|
93
|
-
if (SwitchContextStepDescriptor_1.isSwitchRoot(this.switch) && this.switch.frame === 'root') {
|
|
94
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectWindow', this);
|
|
93
|
+
if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(this.switch) && this.switch.frame === 'root') {
|
|
94
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectWindow', this);
|
|
95
95
|
seleniumStep.target = 'window=0';
|
|
96
96
|
return [seleniumStep];
|
|
97
97
|
}
|
|
98
|
-
else if (SwitchContextStepDescriptor_1.isSwitchTab(this.switch)) {
|
|
99
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectWindow', this);
|
|
98
|
+
else if ((0, SwitchContextStepDescriptor_1.isSwitchTab)(this.switch)) {
|
|
99
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectWindow', this);
|
|
100
100
|
seleniumStep.target =
|
|
101
101
|
this.switch.tab.findTarget === 'initial'
|
|
102
102
|
? 'tab=0'
|
|
103
103
|
: `title="${this.switch.tab.findTarget.title}"`;
|
|
104
104
|
return [seleniumStep];
|
|
105
105
|
}
|
|
106
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectFrame', this);
|
|
106
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectFrame', this);
|
|
107
107
|
if (this.findAction) {
|
|
108
108
|
seleniumStep.target = this.findAction.getSelIdeTarget();
|
|
109
109
|
}
|
|
@@ -117,7 +117,7 @@ class SwitchContextStep extends MablStep_1.MablStep {
|
|
|
117
117
|
}
|
|
118
118
|
toMablscript() {
|
|
119
119
|
var _a;
|
|
120
|
-
if (SwitchContextStepDescriptor_1.isSwitchRoot(this.switch) && this.switch.frame === 'root') {
|
|
120
|
+
if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(this.switch) && this.switch.frame === 'root') {
|
|
121
121
|
return 'switch_context_to("root")';
|
|
122
122
|
}
|
|
123
123
|
return `${(_a = this.findAction) === null || _a === void 0 ? void 0 : _a.toMablscript()}.switch_context_to()`;
|
|
@@ -20,7 +20,7 @@ class VisitUrlStep extends MablStep_1.MablStep {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
produceSelIdeFormattedSteps(_stepIndex) {
|
|
23
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('open', this);
|
|
23
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('open', this);
|
|
24
24
|
seleniumStep.target = this.substituteSeleniumVariable(this.url);
|
|
25
25
|
return [seleniumStep];
|
|
26
26
|
}
|
|
@@ -17,7 +17,7 @@ class WaitStep extends MablStep_1.MablStep {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
produceSelIdeFormattedSteps(_stepIndex) {
|
|
20
|
-
const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('pause', this);
|
|
20
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('pause', this);
|
|
21
21
|
seleniumStep.target = `${this.milliseconds}`;
|
|
22
22
|
return [seleniumStep];
|
|
23
23
|
}
|
|
@@ -6,7 +6,7 @@ const mablscriptFind_1 = require("../../mablscriptFind");
|
|
|
6
6
|
class WaitUntilStep extends MablStep_1.MablStep {
|
|
7
7
|
constructor(name, args, actions) {
|
|
8
8
|
super(name, args, actions);
|
|
9
|
-
if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
|
|
9
|
+
if ((0, mablscriptFind_1.isFindElementType)(this.actions[0].getActionName())) {
|
|
10
10
|
this.findAction = this.actions[0];
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -6,7 +6,7 @@ function isVariableNamespace(value) {
|
|
|
6
6
|
return (value &&
|
|
7
7
|
typeof value === 'object' &&
|
|
8
8
|
!Array.isArray(value) &&
|
|
9
|
-
VariableDataType_1.isSimpleObject(value) &&
|
|
9
|
+
(0, VariableDataType_1.isSimpleObject)(value) &&
|
|
10
10
|
Object.keys(value).every((key) => key) &&
|
|
11
11
|
Object.values(value).every(VariableDataType_1.isVariableDataType));
|
|
12
12
|
}
|