@mablhq/mabl-cli 2.99.12 → 2.100.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/mablApiClient.js +19 -3
- package/browserLauncher/index.js +2 -2
- package/commands/datatables/datatables_cmds/update.js +39 -69
- package/commands/datatables/utils.js +0 -27
- package/commands/tests/tests_cmds/create.js +58 -0
- package/core/execution/ApiTestUtils.js +1 -3
- package/core/execution/PostmanUtils.js +2 -1
- package/core/execution/VariableUtils.js +10 -14
- package/execution/index.js +1 -1
- package/package.json +1 -1
- package/trainer/generation/saveGeneratedTest.js +3 -1
- package/trainer/generation/test-save/saveTest.js +9 -1
- package/trainer/generation/toolExecutors/CreateMablMailboxExecutor.js +3 -3
- package/trainer/generation/toolExecutors/RecordSnippetExecutor.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/AccessibilityCheckStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/AssertStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/AssertVariableStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/AwaitTabStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/AwaitUploadStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/ClearCookiesStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/ClickAndHoldStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/ClickStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/CreateVariableStep.js +8 -6
- package/trainer/sharedUtils/mablscript/canonical/DatabaseQueryStep.js +4 -4
- package/trainer/sharedUtils/mablscript/canonical/DoubleClickStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/DownloadBaseStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/DownloadPdfStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/EchoStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/ElseStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/EndStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/EnterAuthCodeStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/EnterTextStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/EvaluateJSStep.js +3 -3
- package/trainer/sharedUtils/mablscript/canonical/HoverStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/KeyPressStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/MablStepAdapter.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/NavigationStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/OpenEmailStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/ReleaseStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/RemoveCookieStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/RightClickStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/SelectStep.js +4 -2
- package/trainer/sharedUtils/mablscript/canonical/SendHttpRequestStep.js +4 -4
- package/trainer/sharedUtils/mablscript/canonical/SetCookieStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/SetFilesStep.js +2 -1
- package/trainer/sharedUtils/mablscript/canonical/StepWithFind.js +1 -3
- package/trainer/sharedUtils/mablscript/canonical/SwitchContextToStep.js +3 -2
- package/trainer/sharedUtils/mablscript/canonical/ViewportStep.js +2 -2
- package/trainer/sharedUtils/mablscript/canonical/VisitUrlStep.js +3 -3
- package/trainer/sharedUtils/mablscript/canonical/WaitStep.js +2 -2
- package/trainer/sharedUtils/mablscript/extended/ExecuteFlowStep.js +3 -3
- package/trainer/sharedUtils/mablscript/extended/ExecuteStepGroupStep.js +2 -2
- package/trainer/sharedUtils/variable-utils.js +1 -3
- package/upload/index.js +1 -1
|
@@ -38,6 +38,7 @@ exports.rightClickStepToAIString = rightClickStepToAIString;
|
|
|
38
38
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
39
39
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
40
40
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
41
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
41
42
|
class RightClickStep extends StepWithFind_1.default {
|
|
42
43
|
static getStepType() {
|
|
43
44
|
return mablscript_step_types_1.StepType.RIGHT_CLICK;
|
|
@@ -65,7 +66,7 @@ function humanizeRightClickStep(step) {
|
|
|
65
66
|
return `Right click on ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
66
67
|
}
|
|
67
68
|
function rightClickStepToAIString(step) {
|
|
68
|
-
return (0,
|
|
69
|
+
return (0, yaml_utils_1.toYaml)({
|
|
69
70
|
stepType: step.stepType,
|
|
70
71
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
71
72
|
});
|
|
@@ -38,9 +38,11 @@ exports.getSpecifiedAttribute = getSpecifiedAttribute;
|
|
|
38
38
|
exports.humanizeSelectStep = humanizeSelectStep;
|
|
39
39
|
exports.selectStepToAIString = selectStepToAIString;
|
|
40
40
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
41
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
41
42
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
42
43
|
const type_utils_1 = require("../../type-utils");
|
|
43
44
|
const variable_utils_1 = require("../../variable-utils");
|
|
45
|
+
const variable_constants_1 = require("../../variable-constants");
|
|
44
46
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
45
47
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
46
48
|
var SelectorAttribute;
|
|
@@ -140,7 +142,7 @@ class SelectStep extends StepWithFind_1.default {
|
|
|
140
142
|
const newVar = {
|
|
141
143
|
name: variableName,
|
|
142
144
|
humanizedName,
|
|
143
|
-
value:
|
|
145
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
144
146
|
};
|
|
145
147
|
variables[variableName] = newVar;
|
|
146
148
|
}
|
|
@@ -228,5 +230,5 @@ function selectStepToAIString(step) {
|
|
|
228
230
|
else if (step.selectionSelector.index !== undefined) {
|
|
229
231
|
result.option_index = step.selectionSelector.index;
|
|
230
232
|
}
|
|
231
|
-
return (0,
|
|
233
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
232
234
|
}
|
|
@@ -12,8 +12,8 @@ const common_1 = require("../../common");
|
|
|
12
12
|
const type_utils_1 = require("../../type-utils");
|
|
13
13
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
14
14
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const variable_constants_1 = require("../../variable-constants");
|
|
16
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
17
17
|
const BASIC_AUTH = { value: 'basic', label: 'Basic' };
|
|
18
18
|
const BEARER_AUTH = { value: 'bearer', label: 'Bearer' };
|
|
19
19
|
exports.API_STEPS_FEATURE = Object.freeze({
|
|
@@ -121,7 +121,7 @@ class SendHttpRequestStep extends BaseStep_1.default {
|
|
|
121
121
|
name: userScopedVariableName,
|
|
122
122
|
humanizedName: variableName,
|
|
123
123
|
variableType: 'api',
|
|
124
|
-
value:
|
|
124
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
125
125
|
};
|
|
126
126
|
importer.variables[userScopedVariableName] = { ...variable };
|
|
127
127
|
return variable;
|
|
@@ -227,5 +227,5 @@ function sendHttpRequestStepToAIString(step) {
|
|
|
227
227
|
name: v.name,
|
|
228
228
|
}));
|
|
229
229
|
}
|
|
230
|
-
return (0,
|
|
230
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
231
231
|
}
|
|
@@ -10,7 +10,7 @@ const type_utils_1 = require("../../type-utils");
|
|
|
10
10
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
11
11
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
12
12
|
const domUtil_1 = require("../../../../domUtil");
|
|
13
|
-
const
|
|
13
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
14
14
|
class SetCookieStep extends BaseStep_1.default {
|
|
15
15
|
static getStepType() {
|
|
16
16
|
return mablscript_step_types_1.StepType.SET_COOKIE;
|
|
@@ -93,7 +93,7 @@ function humanizeSetCookieStep(step) {
|
|
|
93
93
|
return humanizedString;
|
|
94
94
|
}
|
|
95
95
|
function setCookieStepToAIString(step) {
|
|
96
|
-
return (0,
|
|
96
|
+
return (0, yaml_utils_1.toYaml)({
|
|
97
97
|
stepType: step.stepType,
|
|
98
98
|
name: step.cookie?.name,
|
|
99
99
|
value: step.cookie?.value,
|
|
@@ -38,6 +38,7 @@ exports.setFilesStepToAIString = setFilesStepToAIString;
|
|
|
38
38
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
39
39
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
40
40
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
41
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
41
42
|
class SetFilesStep extends StepWithFind_1.default {
|
|
42
43
|
static getStepType() {
|
|
43
44
|
return mablscript_step_types_1.StepType.SET_FILES;
|
|
@@ -100,7 +101,7 @@ function setFilesStepToAIString(step) {
|
|
|
100
101
|
mime_type: file.type,
|
|
101
102
|
size: file.size,
|
|
102
103
|
}));
|
|
103
|
-
return (0,
|
|
104
|
+
return (0, yaml_utils_1.toYaml)({
|
|
104
105
|
stepType: step.stepType,
|
|
105
106
|
files,
|
|
106
107
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.STARTING_TAB_SELECTOR = exports.MAILBOX_FEATURE =
|
|
6
|
+
exports.STARTING_TAB_SELECTOR = exports.MAILBOX_FEATURE = void 0;
|
|
7
7
|
exports.isFindTabDescriptor = isFindTabDescriptor;
|
|
8
8
|
exports.humanizeFind = humanizeFind;
|
|
9
9
|
exports.humanizeCustomFind = humanizeCustomFind;
|
|
@@ -24,8 +24,6 @@ const MablscriptImporterUtil_1 = require("../MablscriptImporterUtil");
|
|
|
24
24
|
const stepUtil_1 = require("../../../../mablscript/mobile/steps/stepUtil");
|
|
25
25
|
const mobile_constants_1 = require("../../mobile-constants");
|
|
26
26
|
const yaml_utils_1 = require("../yaml-utils");
|
|
27
|
-
var yaml_utils_2 = require("../yaml-utils");
|
|
28
|
-
Object.defineProperty(exports, "toYaml", { enumerable: true, get: function () { return yaml_utils_2.toYaml; } });
|
|
29
27
|
exports.MAILBOX_FEATURE = Object.freeze({
|
|
30
28
|
id: 'mailbox',
|
|
31
29
|
label: 'mabl Mailbox',
|
|
@@ -39,6 +39,7 @@ exports.switchContextToStepToAIString = switchContextToStepToAIString;
|
|
|
39
39
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
40
40
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
41
41
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
42
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
42
43
|
const SwitchContextStepDescriptor_1 = require("../../../../mablscript/types/SwitchContextStepDescriptor");
|
|
43
44
|
class SwitchContextToStep extends StepWithFind_1.default {
|
|
44
45
|
static getStepType() {
|
|
@@ -116,12 +117,12 @@ function humanizeSwitchContextStep(step) {
|
|
|
116
117
|
}
|
|
117
118
|
function switchContextToStepToAIString(step) {
|
|
118
119
|
if (!step.hasFrameOrTabTarget()) {
|
|
119
|
-
return (0,
|
|
120
|
+
return (0, yaml_utils_1.toYaml)({
|
|
120
121
|
stepType: step.stepType,
|
|
121
122
|
target: 'root',
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
|
-
return (0,
|
|
125
|
+
return (0, yaml_utils_1.toYaml)({
|
|
125
126
|
stepType: step.stepType,
|
|
126
127
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
127
128
|
});
|
|
@@ -8,7 +8,7 @@ exports.humanizeViewportStep = humanizeViewportStep;
|
|
|
8
8
|
exports.viewportStepToAIString = viewportStepToAIString;
|
|
9
9
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
10
10
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
11
|
-
const
|
|
11
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
12
12
|
exports.DEFAULT_VIEWPORT_SIZE = {
|
|
13
13
|
width: 1080,
|
|
14
14
|
height: 1440,
|
|
@@ -75,7 +75,7 @@ function humanizeViewportStep(step) {
|
|
|
75
75
|
throw new Error('Invalid step; humanized description cannot be generated.');
|
|
76
76
|
}
|
|
77
77
|
function viewportStepToAIString(step) {
|
|
78
|
-
return (0,
|
|
78
|
+
return (0, yaml_utils_1.toYaml)({
|
|
79
79
|
stepType: step.stepType,
|
|
80
80
|
width: step.size?.width,
|
|
81
81
|
height: step.size?.height,
|
|
@@ -11,7 +11,7 @@ const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
|
11
11
|
const type_utils_1 = require("../../type-utils");
|
|
12
12
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
13
13
|
const MablAction_1 = require("../../../../mablscript/MablAction");
|
|
14
|
-
const
|
|
14
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
15
15
|
class VisitUrlStep extends BaseStep_1.default {
|
|
16
16
|
static getStepType() {
|
|
17
17
|
return mablscript_step_types_1.StepType.VISIT_URL;
|
|
@@ -66,12 +66,12 @@ function humanizeVisitUrlStep(step) {
|
|
|
66
66
|
}
|
|
67
67
|
function visitUrlStepToAIString(step) {
|
|
68
68
|
if (step.variable) {
|
|
69
|
-
return (0,
|
|
69
|
+
return (0, yaml_utils_1.toYaml)({
|
|
70
70
|
stepType: step.stepType,
|
|
71
71
|
variable: step.variable.humanizedName || step.variable.name,
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
return (0,
|
|
74
|
+
return (0, yaml_utils_1.toYaml)({
|
|
75
75
|
stepType: step.stepType,
|
|
76
76
|
url: step.url,
|
|
77
77
|
});
|
|
@@ -7,7 +7,7 @@ exports.humanizeWaitStep = humanizeWaitStep;
|
|
|
7
7
|
exports.waitStepToAIString = waitStepToAIString;
|
|
8
8
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
9
9
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
10
|
-
const
|
|
10
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
11
11
|
class WaitStep extends BaseStep_1.default {
|
|
12
12
|
static getStepType() {
|
|
13
13
|
return mablscript_step_types_1.StepType.WAIT;
|
|
@@ -40,7 +40,7 @@ function humanizeWaitStep(step) {
|
|
|
40
40
|
return `Wait for ${step.waitTimeMilliSeconds / 1000} seconds`;
|
|
41
41
|
}
|
|
42
42
|
function waitStepToAIString(step) {
|
|
43
|
-
return (0,
|
|
43
|
+
return (0, yaml_utils_1.toYaml)({
|
|
44
44
|
stepType: step.stepType,
|
|
45
45
|
duration_ms: step.waitTimeMilliSeconds,
|
|
46
46
|
});
|
|
@@ -8,7 +8,7 @@ exports.humanizeExecuteFlow = humanizeExecuteFlow;
|
|
|
8
8
|
exports.executeFlowStepToAIString = executeFlowStepToAIString;
|
|
9
9
|
const BaseStep_1 = __importDefault(require("../canonical/BaseStep"));
|
|
10
10
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
11
|
-
const
|
|
11
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
12
12
|
const EvaluateFlowStep_1 = require("../../../../mablscript/steps/EvaluateFlowStep");
|
|
13
13
|
let FLOW_STEP_INSTANCE_ID_INCREMENTER = 0;
|
|
14
14
|
function resetFlowInstanceIdIncrementer() {
|
|
@@ -97,13 +97,13 @@ function humanizeExecuteFlow(step) {
|
|
|
97
97
|
}
|
|
98
98
|
function executeFlowStepToAIString(step) {
|
|
99
99
|
if (step.flowError) {
|
|
100
|
-
return (0,
|
|
100
|
+
return (0, yaml_utils_1.toYaml)({
|
|
101
101
|
stepType: step.stepType,
|
|
102
102
|
error: 'missing_flow',
|
|
103
103
|
flow_id: step.flowInvariantId,
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
return (0,
|
|
106
|
+
return (0, yaml_utils_1.toYaml)({
|
|
107
107
|
stepType: step.stepType,
|
|
108
108
|
flow_name: step.flow?.description,
|
|
109
109
|
flow_id: step.flowInvariantId,
|
|
@@ -8,7 +8,7 @@ exports.executeStepGroupStepToAIString = executeStepGroupStepToAIString;
|
|
|
8
8
|
const BaseStep_1 = __importDefault(require("../canonical/BaseStep"));
|
|
9
9
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
10
10
|
const StepGroupStep_1 = require("../../../../mablscript/steps/StepGroupStep");
|
|
11
|
-
const
|
|
11
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
12
12
|
class ExecuteStepGroupStep extends BaseStep_1.default {
|
|
13
13
|
static getStepType() {
|
|
14
14
|
return mablscript_step_types_1.StepType.EXECUTE_STEP_GROUP;
|
|
@@ -61,7 +61,7 @@ function humanizeExecuteStepGroupStep(step) {
|
|
|
61
61
|
return `Start group: ${step.description}`;
|
|
62
62
|
}
|
|
63
63
|
function executeStepGroupStepToAIString(step) {
|
|
64
|
-
return (0,
|
|
64
|
+
return (0, yaml_utils_1.toYaml)({
|
|
65
65
|
stepType: step.stepType,
|
|
66
66
|
description: step.description || 'Unnamed Step Group',
|
|
67
67
|
step_count: step.stepsInGroup.length,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEmptyNamespace = exports.isVariableDescriptor =
|
|
3
|
+
exports.isEmptyNamespace = exports.isVariableDescriptor = void 0;
|
|
4
4
|
exports.isVariableOnImport = isVariableOnImport;
|
|
5
5
|
exports.flattenVariables = flattenVariables;
|
|
6
6
|
exports.humanizeVariablePattern = humanizeVariablePattern;
|
|
@@ -24,8 +24,6 @@ const largeJsDependencyUtil_1 = require("../../domUtil/largeJsDependencyUtil");
|
|
|
24
24
|
const domUtil_1 = require("../../domUtil");
|
|
25
25
|
const type_utils_1 = require("./type-utils");
|
|
26
26
|
const mablscript_step_types_1 = require("./mablscript-step-types");
|
|
27
|
-
var variable_constants_1 = require("./variable-constants");
|
|
28
|
-
Object.defineProperty(exports, "EMPTY_VARIABLE_VALUE_PLACEHOLDER", { enumerable: true, get: function () { return variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER; } });
|
|
29
27
|
function getByPath(obj, path) {
|
|
30
28
|
if ((0, type_utils_1.isNullOrUndefined)(obj) || !path) {
|
|
31
29
|
return undefined;
|