@mablhq/mabl-cli 2.61.11 → 2.61.17
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/commands/environments/environments_cmds/update.js +2 -1
- package/commands/test-runs/test-runs_cmds/export.js +2 -1
- package/commands/tests/tests_cmds/create.js +1 -1
- package/commands/tests/tests_cmds/edit.js +3 -3
- package/commands/tests/tests_cmds/export.js +1 -1
- package/core/execution/ApiTestUtils.js +14 -13
- package/execution/index.js +2 -2
- package/package.json +2 -2
- package/reporters/reporter.js +1 -1
- package/socketTunnel/index.js +1 -1
|
@@ -10,7 +10,8 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
10
10
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
11
11
|
const create_1 = require("./create");
|
|
12
12
|
exports.command = 'update <id>';
|
|
13
|
-
exports.describe =
|
|
13
|
+
exports.describe =
|
|
14
|
+
'Update a mabl environment. Note: This overwrites all existing environment variables set for the environment.';
|
|
14
15
|
exports.builder = (yargs) => {
|
|
15
16
|
(0, create_1.addUpdateEnvCommands)(yargs, false).positional(constants_1.CommandArgId, {
|
|
16
17
|
describe: 'ID of environment to update',
|
|
@@ -7,7 +7,8 @@ const util_1 = require("../../commandUtil/util");
|
|
|
7
7
|
const mablApi_1 = require("../../../mablApi");
|
|
8
8
|
const typesAllFlag = 'all';
|
|
9
9
|
exports.command = `export <id> [options]`;
|
|
10
|
-
exports.describe =
|
|
10
|
+
exports.describe =
|
|
11
|
+
'Export browser test run artifacts. Defaults to screenshots only.';
|
|
11
12
|
exports.builder = (yargs) => {
|
|
12
13
|
yargs
|
|
13
14
|
.positional(constants_1.CommandArgId, {
|
|
@@ -8,7 +8,7 @@ const trainingSessions_1 = require("../../../core/trainer/trainingSessions");
|
|
|
8
8
|
exports.createTestNameKey = 'test-name';
|
|
9
9
|
exports.createTestDescriptionKey = 'test-description';
|
|
10
10
|
exports.command = `create <${constants_1.CommandArgUrl}> <${exports.createTestNameKey}>`;
|
|
11
|
-
exports.describe = 'Create a test using the mabl Trainer';
|
|
11
|
+
exports.describe = 'Create a browser test using the mabl Trainer';
|
|
12
12
|
exports.builder = (yargs) => {
|
|
13
13
|
yargs
|
|
14
14
|
.positional(constants_1.CommandArgUrl, {
|
|
@@ -5,11 +5,11 @@ const testsUtil_1 = require("../testsUtil");
|
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
const trainingSessions_1 = require("../../../core/trainer/trainingSessions");
|
|
7
7
|
exports.command = 'edit';
|
|
8
|
-
exports.describe = 'Edit a test
|
|
8
|
+
exports.describe = 'Edit a browser test in the Trainer';
|
|
9
9
|
exports.builder = (yargs) => {
|
|
10
10
|
yargs
|
|
11
|
-
.example('$0 tests edit --id <id>', 'edit test
|
|
12
|
-
.example('$0 tests edit --run-id <test-run-id>', 'edit a test
|
|
11
|
+
.example('$0 tests edit --id <id>', 'edit test in the Trainer by id')
|
|
12
|
+
.example('$0 tests edit --run-id <test-run-id>', 'edit a browser test in the Trainer in the context of a test configuration from a cloud run')
|
|
13
13
|
.option(constants_1.CommandArgId, {
|
|
14
14
|
describe: 'the id of the test to edit',
|
|
15
15
|
type: 'string',
|
|
@@ -12,7 +12,7 @@ const chalk = require('chalk');
|
|
|
12
12
|
const os = require('os');
|
|
13
13
|
const JSON_REPLACER = null;
|
|
14
14
|
exports.command = `export <${constants_1.CommandArgId}>`;
|
|
15
|
-
exports.describe = 'Export a mabl test in a specified file format';
|
|
15
|
+
exports.describe = 'Export a mabl browser test in a specified file format';
|
|
16
16
|
exports.builder = (yargs) => {
|
|
17
17
|
yargs
|
|
18
18
|
.positional(constants_1.CommandArgId, {
|
|
@@ -288,7 +288,15 @@ function findFirstMatchingEvent(eventDefinition, listen) {
|
|
|
288
288
|
}
|
|
289
289
|
return { eventIndex, eventValue };
|
|
290
290
|
}
|
|
291
|
-
function createEmptyRequestEvent() {
|
|
291
|
+
function createEmptyRequestEvent(includeDefaultAssertion = true) {
|
|
292
|
+
const defaultAssertion = [
|
|
293
|
+
{
|
|
294
|
+
id: (0, uuid_1.v4)(),
|
|
295
|
+
assertTarget: newman_types_1.AssertionTarget.Status,
|
|
296
|
+
assertType: newman_types_1.AssertionType.Equals,
|
|
297
|
+
value: '200',
|
|
298
|
+
},
|
|
299
|
+
];
|
|
292
300
|
return {
|
|
293
301
|
listen: exports.TEST_LISTEN,
|
|
294
302
|
id: (0, exports.uuid)(),
|
|
@@ -297,14 +305,7 @@ function createEmptyRequestEvent() {
|
|
|
297
305
|
raw: '',
|
|
298
306
|
type: 'text/javascript',
|
|
299
307
|
},
|
|
300
|
-
mablAssertions: [
|
|
301
|
-
{
|
|
302
|
-
id: (0, uuid_1.v4)(),
|
|
303
|
-
assertTarget: newman_types_1.AssertionTarget.Status,
|
|
304
|
-
assertType: newman_types_1.AssertionType.Equals,
|
|
305
|
-
value: '200',
|
|
306
|
-
},
|
|
307
|
-
],
|
|
308
|
+
mablAssertions: includeDefaultAssertion ? defaultAssertion : [],
|
|
308
309
|
mablVariables: [],
|
|
309
310
|
mablSnippets: [],
|
|
310
311
|
};
|
|
@@ -795,10 +796,10 @@ exports.PRE_REQUEST_LISTEN = 'prerequest';
|
|
|
795
796
|
function splitLines(value) {
|
|
796
797
|
return value.length ? value.split(/\r?\n/) : [];
|
|
797
798
|
}
|
|
798
|
-
function createEmptyRequestEventArray() {
|
|
799
|
-
return [createEmptyRequestEvent()];
|
|
799
|
+
function createEmptyRequestEventArray(includeDefaultAssertion = true) {
|
|
800
|
+
return [createEmptyRequestEvent(includeDefaultAssertion)];
|
|
800
801
|
}
|
|
801
|
-
const createEmptyRequest = (id = (0, uuid_1.v4)()) => ({
|
|
802
|
+
const createEmptyRequest = (id = (0, uuid_1.v4)(), includeDefaultAssertion = true) => ({
|
|
802
803
|
id,
|
|
803
804
|
name: '',
|
|
804
805
|
request: {
|
|
@@ -817,7 +818,7 @@ const createEmptyRequest = (id = (0, uuid_1.v4)()) => ({
|
|
|
817
818
|
method: 'GET',
|
|
818
819
|
url: '',
|
|
819
820
|
},
|
|
820
|
-
event: createEmptyRequestEventArray(),
|
|
821
|
+
event: createEmptyRequestEventArray(includeDefaultAssertion),
|
|
821
822
|
});
|
|
822
823
|
exports.createEmptyRequest = createEmptyRequest;
|
|
823
824
|
function processPostmanItems(items, handleItem, handleFolder) {
|