@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
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ exports.saveGeneratedTest = saveGeneratedTest;
|
|
|
4
4
|
const saveTest_1 = require("./test-save/saveTest");
|
|
5
5
|
const env_1 = require("../../env/env");
|
|
6
6
|
async function saveGeneratedTest(options) {
|
|
7
|
-
const { apiClient, workspaceId, applicationId, url, testName, testDescription, labels, rawSteps, stepDescriptions, credentialsId, } = options;
|
|
7
|
+
const { apiClient, workspaceId, applicationId, url, testName, testDescription, labels, rawSteps, stepDescriptions, credentialsId, enabled, testIntent, } = options;
|
|
8
8
|
if (rawSteps.length === 0) {
|
|
9
9
|
return { success: false, error: 'No steps to save' };
|
|
10
10
|
}
|
|
@@ -20,6 +20,8 @@ async function saveGeneratedTest(options) {
|
|
|
20
20
|
steps: rawSteps,
|
|
21
21
|
scriptDescription: stepDescriptions.join('\n'),
|
|
22
22
|
credentialsId,
|
|
23
|
+
enabled,
|
|
24
|
+
testIntent,
|
|
23
25
|
});
|
|
24
26
|
if (!result.success) {
|
|
25
27
|
return {
|
|
@@ -7,7 +7,7 @@ const stepProcessing_1 = require("./stepProcessing");
|
|
|
7
7
|
const builders_1 = require("./builders");
|
|
8
8
|
const systemVariables_1 = require("../../../shared/systemVariables");
|
|
9
9
|
async function saveTest(options) {
|
|
10
|
-
const { apiClient, workspaceId, steps, url, testName, applicationId, testDescription, labels, credentialsId, existingTest, branch, mobileTrainingInfo, flowIterations, flowConfigurations, appVersion, scriptDescription, } = options;
|
|
10
|
+
const { apiClient, workspaceId, steps, url, testName, applicationId, testDescription, labels, credentialsId, existingTest, branch, mobileTrainingInfo, flowIterations, flowConfigurations, appVersion, scriptDescription, enabled, testIntent, } = options;
|
|
11
11
|
try {
|
|
12
12
|
const savedFlow = await createFlow(apiClient, buildFlowForSave(steps, {
|
|
13
13
|
workspaceId,
|
|
@@ -30,6 +30,8 @@ async function saveTest(options) {
|
|
|
30
30
|
flowConfigurations,
|
|
31
31
|
mobileTrainingInfo,
|
|
32
32
|
appVersion,
|
|
33
|
+
enabled,
|
|
34
|
+
testIntent,
|
|
33
35
|
});
|
|
34
36
|
return {
|
|
35
37
|
success: true,
|
|
@@ -83,6 +85,12 @@ async function saveJourney(flows, apiClient, options) {
|
|
|
83
85
|
mobileTrainingInfo: options.mobileTrainingInfo,
|
|
84
86
|
appVersion: options.appVersion,
|
|
85
87
|
});
|
|
88
|
+
if (options.enabled !== undefined) {
|
|
89
|
+
journey.enabled = options.enabled;
|
|
90
|
+
}
|
|
91
|
+
if (options.testIntent) {
|
|
92
|
+
journey.intent = options.testIntent;
|
|
93
|
+
}
|
|
86
94
|
if (options.existingTest?.id) {
|
|
87
95
|
return apiClient.updateJourney(options.existingTest.id, journey);
|
|
88
96
|
}
|
|
@@ -5,7 +5,7 @@ const toolExecutors_1 = require("../toolExecutors");
|
|
|
5
5
|
const domUtil_1 = require("../../../domUtil");
|
|
6
6
|
const mablscriptFind_1 = require("../../../mablscriptFind");
|
|
7
7
|
const stepCapture_1 = require("../../background/capture/stepCapture");
|
|
8
|
-
const
|
|
8
|
+
const variable_constants_1 = require("../../sharedUtils/variable-constants");
|
|
9
9
|
exports.createMablMailboxExecutor = {
|
|
10
10
|
needsFind: () => false,
|
|
11
11
|
getStepType: () => 'create_mabl_mailbox',
|
|
@@ -22,7 +22,7 @@ exports.createMablMailboxExecutor = {
|
|
|
22
22
|
variableType: domUtil_1.VariableType.MABL_MAILBOX,
|
|
23
23
|
name: variableName,
|
|
24
24
|
humanizedName: toolParams.variableName,
|
|
25
|
-
value:
|
|
25
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
26
26
|
flowStepIndex: [],
|
|
27
27
|
source: mablscriptFind_1.LegacyVariableSource.TEMPLATE,
|
|
28
28
|
readOnly: false,
|
|
@@ -39,7 +39,7 @@ exports.createMablMailboxExecutor = {
|
|
|
39
39
|
return {
|
|
40
40
|
...result,
|
|
41
41
|
variable_name: toolParams.variableName,
|
|
42
|
-
variable_value:
|
|
42
|
+
variable_value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
43
43
|
};
|
|
44
44
|
},
|
|
45
45
|
};
|
|
@@ -9,7 +9,7 @@ const CreateVariableStep_1 = __importDefault(require("../../sharedUtils/mablscri
|
|
|
9
9
|
const EvaluateJSStep_1 = __importDefault(require("../../sharedUtils/mablscript/canonical/EvaluateJSStep"));
|
|
10
10
|
const domUtil_1 = require("../../../domUtil");
|
|
11
11
|
const mablApi_1 = require("../../../mablApi");
|
|
12
|
-
const
|
|
12
|
+
const variable_constants_1 = require("../../sharedUtils/variable-constants");
|
|
13
13
|
exports.recordSnippetExecutor = {
|
|
14
14
|
needsFind: () => false,
|
|
15
15
|
getStepType: () => mablApi_1.ExecuteToolName.Snippet,
|
|
@@ -63,7 +63,7 @@ exports.recordSnippetExecutor = {
|
|
|
63
63
|
variableType: domUtil_1.VariableType.JAVASCRIPT,
|
|
64
64
|
name: `user.${saveResultToVariable}`,
|
|
65
65
|
humanizedName: saveResultToVariable,
|
|
66
|
-
value:
|
|
66
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
67
67
|
javaScript: javaScriptDescriptor,
|
|
68
68
|
snippet,
|
|
69
69
|
};
|
|
@@ -38,6 +38,7 @@ exports.accessibilityCheckStepToAIString = accessibilityCheckStepToAIString;
|
|
|
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 AccessibilityCheckStep extends StepWithFind_1.default {
|
|
42
43
|
static getStepType() {
|
|
43
44
|
return mablscript_step_types_1.StepType.ACCESSIBILITY_CHECK;
|
|
@@ -107,5 +108,5 @@ function accessibilityCheckStepToAIString(step) {
|
|
|
107
108
|
if (step.checkConfig?.failOn?.severity) {
|
|
108
109
|
result.fail_on_severity = step.checkConfig.failOn.severity;
|
|
109
110
|
}
|
|
110
|
-
return (0,
|
|
111
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
111
112
|
}
|
|
@@ -43,6 +43,7 @@ exports.isMobileFindAssertStep = isMobileFindAssertStep;
|
|
|
43
43
|
exports.isAssertionStatus = isAssertionStatus;
|
|
44
44
|
exports.assertStepToAIString = assertStepToAIString;
|
|
45
45
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
46
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
46
47
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
47
48
|
const AssertStepTypes_1 = __importDefault(require("./AssertStepTypes"));
|
|
48
49
|
const location_1 = require("../location");
|
|
@@ -722,7 +723,7 @@ function assertStepToAIString(step) {
|
|
|
722
723
|
result.stepType = step.stepType;
|
|
723
724
|
Object.assign(result, buildConditionObject(step));
|
|
724
725
|
}
|
|
725
|
-
return (0,
|
|
726
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
726
727
|
}
|
|
727
728
|
function buildConditionObject(step) {
|
|
728
729
|
const condition = {};
|
|
@@ -16,7 +16,7 @@ const AssertStep_1 = require("../../../../mablscript/steps/AssertStep");
|
|
|
16
16
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
17
17
|
const assert_utils_1 = require("./assert-utils");
|
|
18
18
|
const ConditionDescriptor_1 = require("../../../../mablscript/types/ConditionDescriptor");
|
|
19
|
-
const
|
|
19
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
20
20
|
const CONDITIONAL_TYPE_ELSEIF = 'ELSEIF';
|
|
21
21
|
class AssertVariableStep extends BaseStep_1.default {
|
|
22
22
|
static getStepType() {
|
|
@@ -150,5 +150,5 @@ function assertVariableStepToAIString(step) {
|
|
|
150
150
|
result.on_failure = step.onFailure;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
return (0,
|
|
153
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
154
154
|
}
|
|
@@ -9,7 +9,7 @@ const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
|
9
9
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
10
10
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
11
11
|
const AwaitTabStep_1 = require("../../../../mablscript/steps/AwaitTabStep");
|
|
12
|
-
const
|
|
12
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
13
13
|
class AwaitTabStep extends BaseStep_1.default {
|
|
14
14
|
static getStepType() {
|
|
15
15
|
return mablscript_step_types_1.StepType.AWAIT_TAB;
|
|
@@ -52,7 +52,7 @@ function awaitTabStepToAIString(step) {
|
|
|
52
52
|
if (step.tabSelector.url) {
|
|
53
53
|
target.url = step.tabSelector.url;
|
|
54
54
|
}
|
|
55
|
-
return (0,
|
|
55
|
+
return (0, yaml_utils_1.toYaml)({
|
|
56
56
|
stepType: step.stepType,
|
|
57
57
|
target,
|
|
58
58
|
});
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.awaitUploadStepToAIString = awaitUploadStepToAIString;
|
|
7
7
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
8
8
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
9
|
-
const
|
|
9
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
10
10
|
class AwaitUploadStep extends BaseStep_1.default {
|
|
11
11
|
static getStepType() {
|
|
12
12
|
return mablscript_step_types_1.StepType.AWAIT_UPLOAD;
|
|
@@ -38,7 +38,7 @@ class AwaitUploadStep extends BaseStep_1.default {
|
|
|
38
38
|
}
|
|
39
39
|
exports.default = AwaitUploadStep;
|
|
40
40
|
function awaitUploadStepToAIString(step) {
|
|
41
|
-
return (0,
|
|
41
|
+
return (0, yaml_utils_1.toYaml)({
|
|
42
42
|
stepType: step.stepType,
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -7,7 +7,7 @@ exports.humanizeClearCookiesStep = humanizeClearCookiesStep;
|
|
|
7
7
|
exports.clearCookiesStepToAIString = clearCookiesStepToAIString;
|
|
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 ClearCookiesStep extends BaseStep_1.default {
|
|
12
12
|
static getStepType() {
|
|
13
13
|
return mablscript_step_types_1.StepType.CLEAR_COOKIES;
|
|
@@ -36,7 +36,7 @@ function humanizeClearCookiesStep() {
|
|
|
36
36
|
return `Clear cookies from the current domain`;
|
|
37
37
|
}
|
|
38
38
|
function clearCookiesStepToAIString(step) {
|
|
39
|
-
return (0,
|
|
39
|
+
return (0, yaml_utils_1.toYaml)({
|
|
40
40
|
stepType: step.stepType,
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -37,6 +37,7 @@ exports.isClickAndHoldStep = isClickAndHoldStep;
|
|
|
37
37
|
exports.humanizeClickAndHoldStep = humanizeClickAndHoldStep;
|
|
38
38
|
exports.clickAndHoldStepToAIString = clickAndHoldStepToAIString;
|
|
39
39
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
40
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
40
41
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
41
42
|
const domUtil_1 = require("../../../../domUtil");
|
|
42
43
|
function isClickAndHoldStep(step) {
|
|
@@ -77,7 +78,7 @@ function humanizeClickAndHoldStep(step) {
|
|
|
77
78
|
return `${actionPrefix} on ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
78
79
|
}
|
|
79
80
|
function clickAndHoldStepToAIString(step) {
|
|
80
|
-
return (0,
|
|
81
|
+
return (0, yaml_utils_1.toYaml)({
|
|
81
82
|
stepType: step.stepType,
|
|
82
83
|
is_html5_drag: step.isHtml5,
|
|
83
84
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
@@ -37,6 +37,7 @@ exports.humanizeClickStep = humanizeClickStep;
|
|
|
37
37
|
exports.clickStepToAIString = clickStepToAIString;
|
|
38
38
|
const domUtil_1 = require("../../../../domUtil");
|
|
39
39
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
40
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
40
41
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
41
42
|
class ClickStep extends StepWithFind_1.default {
|
|
42
43
|
static getStepType() {
|
|
@@ -65,7 +66,7 @@ function humanizeClickStep(step) {
|
|
|
65
66
|
return `Click on ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
66
67
|
}
|
|
67
68
|
function clickStepToAIString(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
|
});
|
|
@@ -44,8 +44,10 @@ const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
|
44
44
|
const snippetUtils_1 = require("../snippetUtils");
|
|
45
45
|
const type_utils_1 = require("../../type-utils");
|
|
46
46
|
const variable_utils_1 = require("../../variable-utils");
|
|
47
|
+
const variable_constants_1 = require("../../variable-constants");
|
|
47
48
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
48
49
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
50
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
49
51
|
const CreateVariableMobileStep_1 = require("../../../../mablscript/mobile/steps/CreateVariableMobileStep");
|
|
50
52
|
const CreateVariableStepDescriptor_1 = require("../../../../mablscript/types/CreateVariableStepDescriptor");
|
|
51
53
|
const FindAction_1 = require("../../../../mablscript/actions/FindAction");
|
|
@@ -230,7 +232,7 @@ class CreateVariableStep extends StepWithFind_1.default {
|
|
|
230
232
|
const elementPropertyVariable = {
|
|
231
233
|
property: stepDescriptor.generator.attribute,
|
|
232
234
|
variableType: mablscriptFind_1.VariableType.ELEMENT_PROPERTY,
|
|
233
|
-
value:
|
|
235
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
234
236
|
name: variableName,
|
|
235
237
|
humanizedName,
|
|
236
238
|
};
|
|
@@ -245,7 +247,7 @@ class CreateVariableStep extends StepWithFind_1.default {
|
|
|
245
247
|
const recordedVariable = {
|
|
246
248
|
property: 'count',
|
|
247
249
|
variableType: mablscriptFind_1.VariableType.ELEMENT_COUNT,
|
|
248
|
-
value:
|
|
250
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
249
251
|
name: variableName,
|
|
250
252
|
humanizedName,
|
|
251
253
|
};
|
|
@@ -260,7 +262,7 @@ class CreateVariableStep extends StepWithFind_1.default {
|
|
|
260
262
|
throw new Error('Unexpected first action for generating variable from element count');
|
|
261
263
|
case CreateVariableStepDescriptor_1.VariableGenerator.EMAIL:
|
|
262
264
|
const emailVariable = {
|
|
263
|
-
value:
|
|
265
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
264
266
|
variableType: mablscriptFind_1.VariableType.MABL_MAILBOX,
|
|
265
267
|
name: variableName,
|
|
266
268
|
humanizedName,
|
|
@@ -312,7 +314,7 @@ class CreateVariableStep extends StepWithFind_1.default {
|
|
|
312
314
|
snippetVal = importer.snippets[javascriptVal.snippetInvariantId];
|
|
313
315
|
}
|
|
314
316
|
const recordedVariable = {
|
|
315
|
-
value:
|
|
317
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
316
318
|
variableType: mablscriptFind_1.VariableType.JAVASCRIPT,
|
|
317
319
|
javaScript: jsVal,
|
|
318
320
|
snippet: snippetVal,
|
|
@@ -351,7 +353,7 @@ class CreateVariableStep extends StepWithFind_1.default {
|
|
|
351
353
|
const cookieVariable = {
|
|
352
354
|
name: variableName,
|
|
353
355
|
variableType: mablscriptFind_1.VariableType.COOKIE,
|
|
354
|
-
value:
|
|
356
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
355
357
|
humanizedName,
|
|
356
358
|
readOnly: false,
|
|
357
359
|
property: extractAction.extractionAttribute,
|
|
@@ -468,5 +470,5 @@ function createVariableStepToAIString(step) {
|
|
|
468
470
|
}
|
|
469
471
|
break;
|
|
470
472
|
}
|
|
471
|
-
return (0,
|
|
473
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
472
474
|
}
|
|
@@ -11,11 +11,11 @@ const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
|
11
11
|
const type_utils_1 = require("../../type-utils");
|
|
12
12
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
13
13
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
14
|
-
const
|
|
14
|
+
const variable_constants_1 = require("../../variable-constants");
|
|
15
15
|
const SnippetsDescriptor_1 = require("../../../../mablscript/types/SnippetsDescriptor");
|
|
16
16
|
const snippetUtils_1 = require("../snippetUtils");
|
|
17
17
|
const domUtil_1 = require("../../../../domUtil");
|
|
18
|
-
const
|
|
18
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
19
19
|
class DatabaseQueryStep extends BaseStep_1.default {
|
|
20
20
|
static getStepType() {
|
|
21
21
|
return mablscript_step_types_1.StepType.DATABASE_QUERY;
|
|
@@ -79,7 +79,7 @@ class DatabaseQueryStep extends BaseStep_1.default {
|
|
|
79
79
|
name: userScopedVariableName,
|
|
80
80
|
humanizedName: variableName,
|
|
81
81
|
variableType: domUtil_1.VariableType.DATABASE,
|
|
82
|
-
value:
|
|
82
|
+
value: variable_constants_1.EMPTY_VARIABLE_VALUE_PLACEHOLDER,
|
|
83
83
|
query: mablDatabaseQueryStep.descriptor,
|
|
84
84
|
};
|
|
85
85
|
importer.variables[userScopedVariableName] = { ...variable };
|
|
@@ -199,5 +199,5 @@ function databaseQueryStepToAIString(step) {
|
|
|
199
199
|
name: v.name,
|
|
200
200
|
}));
|
|
201
201
|
}
|
|
202
|
-
return (0,
|
|
202
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
203
203
|
}
|
|
@@ -38,6 +38,7 @@ exports.doubleClickStepToAIString = doubleClickStepToAIString;
|
|
|
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 DoubleClickStep extends StepWithFind_1.default {
|
|
42
43
|
static getStepType() {
|
|
43
44
|
return mablscript_step_types_1.StepType.DOUBLE_CLICK;
|
|
@@ -65,7 +66,7 @@ function humanizeDoubleClickStep(step) {
|
|
|
65
66
|
return `Double-click on ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
66
67
|
}
|
|
67
68
|
function doubleClickStepToAIString(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
|
});
|
|
@@ -16,7 +16,7 @@ const type_utils_1 = require("../../type-utils");
|
|
|
16
16
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
17
17
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
18
18
|
const DownloadStep_1 = require("../../../../mablscript/steps/DownloadStep");
|
|
19
|
-
const
|
|
19
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
20
20
|
exports.DOWNLOAD_COMPLETE_POLLING_INTERVAL_MILLISECONDS = 200;
|
|
21
21
|
const MISSING_DATA_STATUS = 'MISSING DATA';
|
|
22
22
|
exports.SUCCESS_STATUS = 'OK';
|
|
@@ -318,5 +318,5 @@ function downloadBaseStepToAIString(step) {
|
|
|
318
318
|
if (step.aiPrompt?.userPrompt) {
|
|
319
319
|
result.ai_prompt = step.aiPrompt.userPrompt;
|
|
320
320
|
}
|
|
321
|
-
return (0,
|
|
321
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
322
322
|
}
|
|
@@ -39,7 +39,7 @@ exports.downloadPdfStepToAIString = downloadPdfStepToAIString;
|
|
|
39
39
|
const DownloadBaseStep_1 = __importStar(require("./DownloadBaseStep"));
|
|
40
40
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
41
41
|
const DownloadStep_1 = require("../../../../mablscript/steps/DownloadStep");
|
|
42
|
-
const
|
|
42
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
43
43
|
const PDF_STEPS_FEATURE = Object.freeze({ id: 'pdf_steps', label: 'PDF Steps' });
|
|
44
44
|
class DownloadPdfStep extends DownloadBaseStep_1.default {
|
|
45
45
|
static getStepType() {
|
|
@@ -126,5 +126,5 @@ function downloadPdfStepToAIString(step) {
|
|
|
126
126
|
if (step.aiPrompt?.userPrompt) {
|
|
127
127
|
result.ai_prompt = step.aiPrompt.userPrompt;
|
|
128
128
|
}
|
|
129
|
-
return (0,
|
|
129
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
130
130
|
}
|
|
@@ -10,7 +10,7 @@ const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
|
10
10
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
11
11
|
const type_utils_1 = require("../../type-utils");
|
|
12
12
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
13
|
-
const
|
|
13
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
14
14
|
class EchoStep extends BaseStep_1.default {
|
|
15
15
|
static getStepType() {
|
|
16
16
|
return mablscript_step_types_1.StepType.ECHO;
|
|
@@ -42,7 +42,7 @@ function humanizeEchoStep(step) {
|
|
|
42
42
|
return `Echo: "${step.message}"`;
|
|
43
43
|
}
|
|
44
44
|
function echoStepToAIString(step) {
|
|
45
|
-
return (0,
|
|
45
|
+
return (0, yaml_utils_1.toYaml)({
|
|
46
46
|
stepType: step.stepType,
|
|
47
47
|
message: step.message,
|
|
48
48
|
});
|
|
@@ -7,7 +7,7 @@ exports.humanizeElseStep = humanizeElseStep;
|
|
|
7
7
|
exports.elseStepToAIString = elseStepToAIString;
|
|
8
8
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
9
9
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
10
|
-
const
|
|
10
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
11
11
|
class ElseStep extends BaseStep_1.default {
|
|
12
12
|
static getStepType() {
|
|
13
13
|
return mablscript_step_types_1.StepType.CONDITIONAL_ELSE;
|
|
@@ -39,7 +39,7 @@ function humanizeElseStep() {
|
|
|
39
39
|
return 'ELSE';
|
|
40
40
|
}
|
|
41
41
|
function elseStepToAIString(step) {
|
|
42
|
-
return (0,
|
|
42
|
+
return (0, yaml_utils_1.toYaml)({
|
|
43
43
|
stepType: step.stepType,
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -7,7 +7,7 @@ exports.humanizeEndStep = humanizeEndStep;
|
|
|
7
7
|
exports.endStepToAIString = endStepToAIString;
|
|
8
8
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
9
9
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
10
|
-
const
|
|
10
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
11
11
|
class EndStep extends BaseStep_1.default {
|
|
12
12
|
static getStepType() {
|
|
13
13
|
return mablscript_step_types_1.StepType.CONDITIONAL_END;
|
|
@@ -39,7 +39,7 @@ function humanizeEndStep() {
|
|
|
39
39
|
return 'END';
|
|
40
40
|
}
|
|
41
41
|
function endStepToAIString(step) {
|
|
42
|
-
return (0,
|
|
42
|
+
return (0, yaml_utils_1.toYaml)({
|
|
43
43
|
stepType: step.stepType,
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -37,6 +37,7 @@ exports.humanizeEnterAuthCodeStep = humanizeEnterAuthCodeStep;
|
|
|
37
37
|
exports.enterAuthCodeStepToAIString = enterAuthCodeStepToAIString;
|
|
38
38
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
39
39
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
40
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
40
41
|
const domUtil_1 = require("../../../../domUtil");
|
|
41
42
|
class EnterAuthCodeStep extends StepWithFind_1.default {
|
|
42
43
|
static getStepType() {
|
|
@@ -65,7 +66,7 @@ function humanizeEnterAuthCodeStep(step) {
|
|
|
65
66
|
return `Enter authentication code into ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
66
67
|
}
|
|
67
68
|
function enterAuthCodeStepToAIString(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
|
});
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.humanizeEnterTextStep = humanizeEnterTextStep;
|
|
37
37
|
exports.enterTextStepToAIString = enterTextStepToAIString;
|
|
38
38
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
39
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
39
40
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
40
41
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
41
42
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
@@ -160,5 +161,5 @@ function enterTextStepToAIString(step) {
|
|
|
160
161
|
else {
|
|
161
162
|
result.text = step.inputValue?.toString();
|
|
162
163
|
}
|
|
163
|
-
return (0,
|
|
164
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
164
165
|
}
|
|
@@ -17,7 +17,7 @@ const mablApi_1 = require("../../../../mablApi");
|
|
|
17
17
|
const snippetUtils_1 = require("../snippetUtils");
|
|
18
18
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
19
19
|
const assert_utils_1 = require("./assert-utils");
|
|
20
|
-
const
|
|
20
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
21
21
|
const MablStepV2_1 = require("../../../../mablscript/MablStepV2");
|
|
22
22
|
class EvaluateJSStep extends BaseStep_1.default {
|
|
23
23
|
static getStepType() {
|
|
@@ -158,7 +158,7 @@ function evaluateJSStepToAIString(step) {
|
|
|
158
158
|
const isReusable = (0, SnippetsDescriptor_1.isReusableSnippetDescriptor)(step.javaScript) ||
|
|
159
159
|
(0, SnippetsDescriptor_1.isLegacyReusableSnippetDescriptor)(step.javaScript);
|
|
160
160
|
if (step.wrapInConditional) {
|
|
161
|
-
return (0,
|
|
161
|
+
return (0, yaml_utils_1.toYaml)({
|
|
162
162
|
stepType: step.wrapInConditionalType === mablscript_step_types_1.ConditionalType.ELSEIF
|
|
163
163
|
? 'else_if'
|
|
164
164
|
: 'if',
|
|
@@ -169,7 +169,7 @@ function evaluateJSStepToAIString(step) {
|
|
|
169
169
|
},
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
return (0,
|
|
172
|
+
return (0, yaml_utils_1.toYaml)({
|
|
173
173
|
stepType: step.stepType,
|
|
174
174
|
snippet_name: snippetName,
|
|
175
175
|
snippet_type: isReusable ? 'reusable' : 'one_time',
|
|
@@ -37,6 +37,7 @@ exports.humanizeHoverStep = humanizeHoverStep;
|
|
|
37
37
|
exports.hoverStepToAIString = hoverStepToAIString;
|
|
38
38
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
39
39
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
40
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
40
41
|
const domUtil_1 = require("../../../../domUtil");
|
|
41
42
|
class HoverStep extends StepWithFind_1.default {
|
|
42
43
|
static getStepType() {
|
|
@@ -70,7 +71,7 @@ function humanizeHoverStep(step) {
|
|
|
70
71
|
return `Hover over ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
71
72
|
}
|
|
72
73
|
function hoverStepToAIString(step) {
|
|
73
|
-
return (0,
|
|
74
|
+
return (0, yaml_utils_1.toYaml)({
|
|
74
75
|
stepType: step.stepType,
|
|
75
76
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
76
77
|
});
|
|
@@ -38,6 +38,7 @@ exports.generateHumanizedKeys = generateHumanizedKeys;
|
|
|
38
38
|
exports.humanizeKeyInfo = humanizeKeyInfo;
|
|
39
39
|
exports.keyPressStepToAIString = keyPressStepToAIString;
|
|
40
40
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
41
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
41
42
|
const keyUtils_1 = require("../../keyUtils");
|
|
42
43
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
43
44
|
const BaseStep_1 = require("./BaseStep");
|
|
@@ -165,5 +166,5 @@ function keyPressStepToAIString(step) {
|
|
|
165
166
|
keys,
|
|
166
167
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
167
168
|
};
|
|
168
|
-
return (0,
|
|
169
|
+
return (0, yaml_utils_1.toYaml)(result);
|
|
169
170
|
}
|
|
@@ -17,7 +17,7 @@ const OpenLinkStep_1 = require("../../../../mablscript/mobile/steps/OpenLinkStep
|
|
|
17
17
|
const HideKeyboardStep_1 = require("../../../../mablscript/mobile/steps/HideKeyboardStep");
|
|
18
18
|
const OpenAppStep_1 = require("../../../../mablscript/mobile/steps/OpenAppStep");
|
|
19
19
|
const StepGroupStep_1 = require("../../../../mablscript/steps/StepGroupStep");
|
|
20
|
-
const
|
|
20
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
21
21
|
class MablStepAdapter {
|
|
22
22
|
constructor(mablStep) {
|
|
23
23
|
this.sourceEventIdentifiers = [];
|
|
@@ -113,7 +113,7 @@ function isMablStepV2StepDescriptionCompatible(value) {
|
|
|
113
113
|
return !!value.stepDescription;
|
|
114
114
|
}
|
|
115
115
|
function mablStepAdapterToAIString(step) {
|
|
116
|
-
return (0,
|
|
116
|
+
return (0, yaml_utils_1.toYaml)({
|
|
117
117
|
action: step.mablStep.getStepName(),
|
|
118
118
|
description: step.description,
|
|
119
119
|
});
|
|
@@ -7,7 +7,7 @@ exports.humanizeNavigationStep = humanizeNavigationStep;
|
|
|
7
7
|
exports.navigationStepToAIString = navigationStepToAIString;
|
|
8
8
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
9
9
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
10
|
-
const
|
|
10
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
11
11
|
class NavigationStep extends BaseStep_1.default {
|
|
12
12
|
static getStepType() {
|
|
13
13
|
return mablscript_step_types_1.StepType.NAVIGATION;
|
|
@@ -43,7 +43,7 @@ function humanizeNavigationStep(step) {
|
|
|
43
43
|
throw new Error('Invalid step; humanized description cannot be generated.');
|
|
44
44
|
}
|
|
45
45
|
function navigationStepToAIString(step) {
|
|
46
|
-
return (0,
|
|
46
|
+
return (0, yaml_utils_1.toYaml)({
|
|
47
47
|
stepType: step.stepType,
|
|
48
48
|
type: step.navigationType,
|
|
49
49
|
});
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.humanizeOpenEmailStep = humanizeOpenEmailStep;
|
|
37
37
|
exports.openEmailStepToAIString = openEmailStepToAIString;
|
|
38
38
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
39
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
39
40
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
40
41
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
41
42
|
class OpenEmailStep extends StepWithFind_1.default {
|
|
@@ -69,7 +70,7 @@ function humanizeOpenEmailStep(step) {
|
|
|
69
70
|
return `Open ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
70
71
|
}
|
|
71
72
|
function openEmailStepToAIString(step) {
|
|
72
|
-
return (0,
|
|
73
|
+
return (0, yaml_utils_1.toYaml)({
|
|
73
74
|
stepType: step.stepType,
|
|
74
75
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
75
76
|
});
|
|
@@ -41,6 +41,7 @@ exports.releaseStepToAIString = releaseStepToAIString;
|
|
|
41
41
|
const mablscriptFind_1 = require("../../../../mablscriptFind");
|
|
42
42
|
const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
43
43
|
const StepWithFind_1 = __importStar(require("./StepWithFind"));
|
|
44
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
44
45
|
const domUtil_1 = require("../../../../domUtil");
|
|
45
46
|
const ClickAndHoldStep_1 = require("./ClickAndHoldStep");
|
|
46
47
|
exports.DEFAULT_RELEASE_STEPS = 20;
|
|
@@ -91,7 +92,7 @@ function humanizeReleaseStep(step) {
|
|
|
91
92
|
return `${actionPrefix} on ${(0, StepWithFind_1.humanizeFind)(step)}`;
|
|
92
93
|
}
|
|
93
94
|
function releaseStepToAIString(step) {
|
|
94
|
-
return (0,
|
|
95
|
+
return (0, yaml_utils_1.toYaml)({
|
|
95
96
|
stepType: step.stepType,
|
|
96
97
|
is_html5_drop: step.releaseArgs.isHtml5,
|
|
97
98
|
target: (0, StepWithFind_1.findDescriptorToAIObject)(step.findDescriptor, step.findOptions),
|
|
@@ -10,7 +10,7 @@ const mablscript_step_types_1 = require("../../mablscript-step-types");
|
|
|
10
10
|
const type_utils_1 = require("../../type-utils");
|
|
11
11
|
const variable_names_util_1 = require("../../variable-names-util");
|
|
12
12
|
const BaseStep_1 = __importDefault(require("./BaseStep"));
|
|
13
|
-
const
|
|
13
|
+
const yaml_utils_1 = require("../yaml-utils");
|
|
14
14
|
class RemoveCookieStep extends BaseStep_1.default {
|
|
15
15
|
static getStepType() {
|
|
16
16
|
return mablscript_step_types_1.StepType.REMOVE_COOKIE;
|
|
@@ -47,7 +47,7 @@ function humanizeRemoveCookieStep(step) {
|
|
|
47
47
|
throw new Error('Invalid step; humanized description cannot be generated.');
|
|
48
48
|
}
|
|
49
49
|
function removeCookieStepToAIString(step) {
|
|
50
|
-
return (0,
|
|
50
|
+
return (0, yaml_utils_1.toYaml)({
|
|
51
51
|
stepType: step.stepType,
|
|
52
52
|
name: step.cookie.name,
|
|
53
53
|
});
|