@mablhq/mabl-cli 2.8.18 → 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 +41 -1
- package/commands/commandUtil/fileUtil.js +8 -7
- package/commands/config/config_cmds/install.js +2 -2
- 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
|
@@ -248,6 +248,14 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
|
248
248
|
return undefined;
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
+
async evaluateFindCandidatesText(workspaceId, request) {
|
|
252
|
+
try {
|
|
253
|
+
return await this.makePostRequest(`${this.baseApiUrl}/find/${workspaceId}/evaluate/textSimilarity`, request);
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
return undefined;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
251
259
|
async getTestFindSummaries(testId, environmentId) {
|
|
252
260
|
try {
|
|
253
261
|
return await this.makeGetRequest(`${this.baseApiUrl}/findSummary?journey_id=${testId}&environment_id=${environmentId}`).then((result) => { var _a; return (_a = result.findsummaries) !== null && _a !== void 0 ? _a : []; });
|
|
@@ -893,7 +901,15 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
|
893
901
|
workspace_id: workspaceId,
|
|
894
902
|
limit,
|
|
895
903
|
});
|
|
896
|
-
const mobileAppFiles = await this.
|
|
904
|
+
const mobileAppFiles = await this.makePostRequest(`${this.baseApiUrl}/mobile/apps/files/queryFiles?${query}`, {
|
|
905
|
+
filter_conditions: [],
|
|
906
|
+
sort_columns: [
|
|
907
|
+
{
|
|
908
|
+
column_name: 'created_time',
|
|
909
|
+
sort_direction: 'DESC',
|
|
910
|
+
},
|
|
911
|
+
],
|
|
912
|
+
}).then((result) => { var _a; return (_a = result.mobile_app_files) !== null && _a !== void 0 ? _a : []; });
|
|
897
913
|
sortTemporallyDescending(mobileAppFiles);
|
|
898
914
|
return mobileAppFiles;
|
|
899
915
|
}
|
|
@@ -910,6 +926,30 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
|
|
|
910
926
|
throw toApiError(`Failed to delete mobile app file ${id}`, error);
|
|
911
927
|
}
|
|
912
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
|
+
}
|
|
913
953
|
}
|
|
914
954
|
exports.MablApiClient = MablApiClient;
|
|
915
955
|
function sortTemporallyAscending(entities) {
|
|
@@ -35,13 +35,14 @@ function writeExportedEntityToFile(output, fileExtension, entityId, fileName) {
|
|
|
35
35
|
fileName = fileName !== null && fileName !== void 0 ? fileName : `${entityId}.mabl.${fileExtension}`.replace(':', '-');
|
|
36
36
|
const filePath = path_1.default.resolve(fileName);
|
|
37
37
|
const dirname = path_1.default.dirname(filePath);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
try {
|
|
39
|
+
fs.mkdirSync(dirname, { recursive: true });
|
|
40
|
+
fs.writeFileSync(filePath, output);
|
|
41
|
+
loggingProvider_1.logger.info(`Created file: ${fileName}`);
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
loggingProvider_1.logger.info(chalk.red.bold(`Error exporting flow to filesystem: ${err}`));
|
|
45
|
+
}
|
|
45
46
|
return fileName;
|
|
46
47
|
}
|
|
47
48
|
exports.writeExportedEntityToFile = writeExportedEntityToFile;
|
|
@@ -30,8 +30,8 @@ const fs = __importStar(require("fs"));
|
|
|
30
30
|
const path = __importStar(require("path"));
|
|
31
31
|
const resourceUtil_1 = require("../../../util/resourceUtil");
|
|
32
32
|
const OperatingSystemDescriptor_1 = require("../../../mablscript/types/OperatingSystemDescriptor");
|
|
33
|
-
const UI_AUTOMATOR_VERSION = '2.
|
|
34
|
-
const XCUITEST_VERSION = '
|
|
33
|
+
const UI_AUTOMATOR_VERSION = '2.35.0';
|
|
34
|
+
const XCUITEST_VERSION = '5.12.2';
|
|
35
35
|
const addOnConfigKey = 'add-on';
|
|
36
36
|
var AddOnOptions;
|
|
37
37
|
(function (AddOnOptions) {
|
|
@@ -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',
|