@mablhq/mabl-cli 2.28.3 → 2.29.7
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/browserEngines/chromiumBrowserEngine.js +0 -1
- package/commands/tests/tests_cmds/export.js +8 -1
- package/execution/index.js +2 -2
- package/mablscript/MablStepV2.js +4 -1
- package/mablscript/importer.js +4 -2
- package/mablscript/mobile/steps/HideKeyboardStep.js +20 -0
- package/mablscript/mobile/tests/steps/HideKeyboardStep.mobiletest.js +27 -0
- package/mablscript/steps/DatabaseQueryStep.js +24 -0
- package/mablscript/types/mobile/HideKeyboardStepDescriptor.js +2 -0
- package/package.json +1 -1
- package/resources/webdriver.js +1 -1
- package/webdriver/index.js +5 -2
- package/mablscript/steps/DatabaseCallStep.js +0 -24
package/mablscript/MablStepV2.js
CHANGED
|
@@ -26,7 +26,10 @@ class MablStepV2 extends MablStep_1.MablStep {
|
|
|
26
26
|
}
|
|
27
27
|
getFormattedStep(_fullLocatorsOn) {
|
|
28
28
|
return {
|
|
29
|
-
[this.getStepName()]:
|
|
29
|
+
[this.getStepName()]: {
|
|
30
|
+
description: this.stepDescription(),
|
|
31
|
+
...this.descriptor,
|
|
32
|
+
},
|
|
30
33
|
};
|
|
31
34
|
}
|
|
32
35
|
stepDescription() {
|
package/mablscript/importer.js
CHANGED
|
@@ -68,7 +68,8 @@ const InstallAppStep_1 = require("./mobile/steps/InstallAppStep");
|
|
|
68
68
|
const UninstallAppStep_1 = require("./mobile/steps/UninstallAppStep");
|
|
69
69
|
const PrepareSessionStep_1 = require("./mobile/steps/PrepareSessionStep");
|
|
70
70
|
const OpenLinkStep_1 = require("./mobile/steps/OpenLinkStep");
|
|
71
|
-
const
|
|
71
|
+
const DatabaseQueryStep_1 = require("./steps/DatabaseQueryStep");
|
|
72
|
+
const HideKeyboardStep_1 = require("./mobile/steps/HideKeyboardStep");
|
|
72
73
|
const ActionTypes = [
|
|
73
74
|
AwaitDownloadAction_1.AwaitDownloadAction,
|
|
74
75
|
AwaitPDFDownloadAction_1.AwaitPDFDownloadAction,
|
|
@@ -92,7 +93,7 @@ const StepTypes = [
|
|
|
92
93
|
ClickStep_1.ClickStep,
|
|
93
94
|
ClickAndHoldStep_1.ClickAndHoldStep,
|
|
94
95
|
CreateVariableStep_1.CreateVariableStep,
|
|
95
|
-
|
|
96
|
+
DatabaseQueryStep_1.DatabaseQueryStep,
|
|
96
97
|
DoubleClickStep_1.DoubleClickStep,
|
|
97
98
|
DownloadStep_1.DownloadStep,
|
|
98
99
|
EchoStep_1.EchoStep,
|
|
@@ -123,6 +124,7 @@ const StepTypes = [
|
|
|
123
124
|
const MobileStepTypes = [
|
|
124
125
|
AssertStep_1.AssertStep,
|
|
125
126
|
CreateVariableMobileStep_1.CreateVariableMobileStep,
|
|
127
|
+
HideKeyboardStep_1.HideKeyboardStep,
|
|
126
128
|
InstallAppStep_1.InstallAppStep,
|
|
127
129
|
NavigateBackStep_1.NavigateBackStep,
|
|
128
130
|
NavigateHomeStep_1.NavigateHomeStep,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HideKeyboardStep = void 0;
|
|
4
|
+
const MablStepV2_1 = require("../../MablStepV2");
|
|
5
|
+
const STEP_NAME = 'HideKeyboard';
|
|
6
|
+
class HideKeyboardStep extends MablStepV2_1.MablStepV2 {
|
|
7
|
+
constructor(descriptor) {
|
|
8
|
+
super(HideKeyboardStep.stepName, descriptor, 'hide_keyboard');
|
|
9
|
+
}
|
|
10
|
+
stepDescription() {
|
|
11
|
+
return `Hide keyboard if present`;
|
|
12
|
+
}
|
|
13
|
+
static fromYaml(_stepName, stepDescriptor) {
|
|
14
|
+
return new HideKeyboardStep(stepDescriptor);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.HideKeyboardStep = HideKeyboardStep;
|
|
18
|
+
HideKeyboardStep.stepName = STEP_NAME;
|
|
19
|
+
HideKeyboardStep.yamlMablScriptNames = [HideKeyboardStep.stepName];
|
|
20
|
+
HideKeyboardStep.stepVersion = 2;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const HideKeyboardStep_1 = require("../../steps/HideKeyboardStep");
|
|
4
|
+
const StepTestsUtil_1 = require("../StepTestsUtil");
|
|
5
|
+
describe('HideKeyboard steps parse correctly', () => {
|
|
6
|
+
it('Parses a HideKeyboard step', () => {
|
|
7
|
+
const hideKeyboardStepDescriptor = {
|
|
8
|
+
actionCode: 'hide_keyboard',
|
|
9
|
+
id: 'HideTheDangKeyboard',
|
|
10
|
+
};
|
|
11
|
+
const steps = [
|
|
12
|
+
{
|
|
13
|
+
HideKeyboard: hideKeyboardStepDescriptor,
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
(0, StepTestsUtil_1.parseAndValidateYamlConversion)(steps, HideKeyboardStep_1.HideKeyboardStep.stepName, hideKeyboardStepDescriptor);
|
|
17
|
+
const hideKeyboardStep = new HideKeyboardStep_1.HideKeyboardStep(hideKeyboardStepDescriptor);
|
|
18
|
+
expect(hideKeyboardStep.stepId()).toEqual(hideKeyboardStepDescriptor.id);
|
|
19
|
+
});
|
|
20
|
+
it('Humanizes a HideKeyboard step', () => {
|
|
21
|
+
const stepYaml = {
|
|
22
|
+
HideKeyboard: { actionCode: 'hide_keyboard' },
|
|
23
|
+
};
|
|
24
|
+
const step = (0, StepTestsUtil_1.loadRawStepIntoMablStep)(stepYaml);
|
|
25
|
+
expect(step.stepDescription()).toEqual(`Hide keyboard if present`);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DatabaseQueryVariableSource = exports.DatabaseQueryStep = void 0;
|
|
4
|
+
const AbstractAssertionsAndVariablesStep_1 = require("./AbstractAssertionsAndVariablesStep");
|
|
5
|
+
class DatabaseQueryStep extends AbstractAssertionsAndVariablesStep_1.AbstractAssertionsAndVariablesStep {
|
|
6
|
+
constructor(name, args, actions) {
|
|
7
|
+
super(name, args, actions, DatabaseQueryStep.mablScriptStepNames[0], DatabaseQueryStep.stepName, args[0]);
|
|
8
|
+
}
|
|
9
|
+
static fromYaml(_stepName, stepArgs) {
|
|
10
|
+
const formatted = stepArgs;
|
|
11
|
+
const step = new DatabaseQueryStep(DatabaseQueryStep.stepName, [formatted], []);
|
|
12
|
+
step.setStepId(stepArgs.id);
|
|
13
|
+
return step;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.DatabaseQueryStep = DatabaseQueryStep;
|
|
17
|
+
DatabaseQueryStep.stepName = 'DatabaseQuery';
|
|
18
|
+
DatabaseQueryStep.mablScriptStepNames = ['database_query'];
|
|
19
|
+
DatabaseQueryStep.yamlMablScriptNames = [DatabaseQueryStep.stepName];
|
|
20
|
+
var DatabaseQueryVariableSource;
|
|
21
|
+
(function (DatabaseQueryVariableSource) {
|
|
22
|
+
DatabaseQueryVariableSource["Metadata"] = "metadata";
|
|
23
|
+
DatabaseQueryVariableSource["Result"] = "result";
|
|
24
|
+
})(DatabaseQueryVariableSource || (exports.DatabaseQueryVariableSource = DatabaseQueryVariableSource = {}));
|