@mablhq/mabl-cli 2.8.25 → 2.11.6
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 +24 -0
- package/commands/environments/environments_cmds/create.js +3 -2
- package/commands/environments/environments_cmds/update.js +1 -1
- package/commands/tests/testsUtil.js +1 -0
- package/core/execution/newman-types.js +2 -1
- package/execution/index.js +9 -9
- package/execution/index.js.LICENSE.txt +60 -0
- package/execution/runAppiumServer.js +16 -4
- package/index.d.ts +2 -0
- package/mablApi/index.js +1 -1
- package/mablscript/importer.js +6 -0
- package/mablscript/mobile/steps/InstallAppStep.js +22 -0
- package/mablscript/mobile/steps/PrepareSessionStep.js +19 -0
- package/mablscript/mobile/steps/ScrollStep.js +52 -8
- package/mablscript/mobile/steps/UninstallAppStep.js +22 -0
- package/mablscript/mobile/tests/TestMobileFindDescriptors.js +72 -1
- package/mablscript/mobile/tests/steps/InstallAppStep.mobiletest.js +20 -0
- package/mablscript/mobile/tests/steps/ScrollStep.mobiletest.js +289 -78
- package/mablscript/mobile/tests/steps/UninstallAppStep.mobiletest.js +20 -0
- package/mablscript/steps/AwaitTabStep.js +36 -8
- package/mablscript/types/mobile/InstallAppStepDescriptor.js +2 -0
- package/mablscript/types/mobile/PrepareSessionStepDescriptor.js +2 -0
- package/mablscript/types/mobile/ScrollStepDescriptor.js +14 -0
- package/mablscript/types/mobile/UninstallAppStepDescriptor.js +2 -0
- package/mablscriptFind/index.js +1 -1
- package/package.json +2 -6
- package/resources/mablFind.js +1 -1
- package/socketTunnel/index.js +2 -0
- package/socketTunnel/index.js.LICENSE.txt +66 -0
- package/upload/index.js +1 -1
package/api/mablApiClient.js
CHANGED
|
@@ -926,6 +926,30 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
|
926
926
|
throw toApiError(`Failed to delete mobile app file ${id}`, error);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
+
async createMobileTrainingSession(prototype) {
|
|
930
|
+
try {
|
|
931
|
+
return await this.makePostRequest(`${this.baseApiUrl}/mobile/training/sessions`, prototype);
|
|
932
|
+
}
|
|
933
|
+
catch (error) {
|
|
934
|
+
throw toApiError(`Failed to create mobile training session`, error);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
async getMobileTrainingSession(id) {
|
|
938
|
+
try {
|
|
939
|
+
return await this.makeGetRequest(`${this.baseApiUrl}/mobile/training/session/${id}`);
|
|
940
|
+
}
|
|
941
|
+
catch (error) {
|
|
942
|
+
throw toApiError(`Failed to get mobile training session ${id}`, error);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
async terminateMobileTrainingSession(id, reason) {
|
|
946
|
+
try {
|
|
947
|
+
return await this.makePostRequest(`${this.baseApiUrl}/mobile/training/session/${id}/terminate`, { termination_reason: reason });
|
|
948
|
+
}
|
|
949
|
+
catch (error) {
|
|
950
|
+
throw toApiError(`Failed to terminate mobile training session ${id}`, error);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
929
953
|
}
|
|
930
954
|
exports.MablApiClient = MablApiClient;
|
|
931
955
|
function sortTemporallyAscending(entities) {
|
|
@@ -16,7 +16,7 @@ const environmentsValidation_1 = require("../../../core/entityValidation/environ
|
|
|
16
16
|
exports.command = 'create';
|
|
17
17
|
exports.describe = 'Create a new mabl environment';
|
|
18
18
|
exports.builder = (yargs) => {
|
|
19
|
-
addUpdateEnvCommands((0, add_1.addEnvironmentUrlOptions)(yargs))
|
|
19
|
+
addUpdateEnvCommands((0, add_1.addEnvironmentUrlOptions)(yargs), true)
|
|
20
20
|
.option(constants_1.CommandArgWorkspaceId, {
|
|
21
21
|
alias: constants_1.CommandArgAliases.WorkspaceId,
|
|
22
22
|
describe: 'Workspace containing to create environment in',
|
|
@@ -38,10 +38,11 @@ exports.builder = (yargs) => {
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
exports.handler = (0, util_1.failWrapper)(createEnvironment);
|
|
41
|
-
function addUpdateEnvCommands(argv) {
|
|
41
|
+
function addUpdateEnvCommands(argv, isCreate) {
|
|
42
42
|
return argv
|
|
43
43
|
.option(constants_1.CommandArgName, {
|
|
44
44
|
alias: constants_1.CommandArgAliases.Name,
|
|
45
|
+
demandOption: isCreate,
|
|
45
46
|
describe: 'Name of the environment',
|
|
46
47
|
nargs: 1,
|
|
47
48
|
type: 'string',
|
|
@@ -12,7 +12,7 @@ const create_1 = require("./create");
|
|
|
12
12
|
exports.command = 'update <id>';
|
|
13
13
|
exports.describe = 'Update a mabl environment';
|
|
14
14
|
exports.builder = (yargs) => {
|
|
15
|
-
(0, create_1.addUpdateEnvCommands)(yargs).positional(constants_1.CommandArgId, {
|
|
15
|
+
(0, create_1.addUpdateEnvCommands)(yargs, false).positional(constants_1.CommandArgId, {
|
|
16
16
|
describe: 'ID of environment to update',
|
|
17
17
|
type: 'string',
|
|
18
18
|
nargs: 1,
|
|
@@ -468,6 +468,7 @@ async function extractTestRunConfig(executionMessage, apiClient) {
|
|
|
468
468
|
if (executionMessage.test_type === mablApi_1.TestTypeEnum.Mobile) {
|
|
469
469
|
const mobileMessage = executionMessage;
|
|
470
470
|
config.mobileConfig = {
|
|
471
|
+
...config.mobileConfig,
|
|
471
472
|
platformName: mobileMessage.mobile_device.platform,
|
|
472
473
|
mobileAppFileId: mobileMessage.mobile_app_file_id,
|
|
473
474
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BodyMode = exports.MablSupportedPostmanAuthTypes = exports.AssertionType = exports.AssertionTarget = void 0;
|
|
3
|
+
exports.BodyMode = exports.MablSupportedPostmanAuthTypes = exports.SUPPORTED_COLLECTION_SCHEMA = exports.AssertionType = exports.AssertionTarget = void 0;
|
|
4
4
|
var AssertionTarget;
|
|
5
5
|
(function (AssertionTarget) {
|
|
6
6
|
AssertionTarget["Header"] = "Header";
|
|
@@ -17,6 +17,7 @@ var AssertionType;
|
|
|
17
17
|
AssertionType["NotPresent"] = "NotPresent";
|
|
18
18
|
AssertionType["Present"] = "Present";
|
|
19
19
|
})(AssertionType = exports.AssertionType || (exports.AssertionType = {}));
|
|
20
|
+
exports.SUPPORTED_COLLECTION_SCHEMA = 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json';
|
|
20
21
|
exports.MablSupportedPostmanAuthTypes = [
|
|
21
22
|
'apikey',
|
|
22
23
|
'basic',
|