@mablhq/mabl-cli 2.60.2 → 2.60.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "2.60.
|
|
3
|
+
"version": "2.60.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@aws-crypto/crc32c": "5.1.0",
|
|
24
24
|
"@google-cloud/storage": "7.9.0",
|
|
25
25
|
"@mablhq/newman-reporter-mabl-console": "0.4.2",
|
|
26
|
-
"@mablhq/playwright-reporter": "0.5.
|
|
26
|
+
"@mablhq/playwright-reporter": "0.5.7",
|
|
27
27
|
"@plist/common": "1.1.0",
|
|
28
28
|
"@plist/parse": "1.1.0",
|
|
29
29
|
"@types/adm-zip": "0.5.5",
|
package/reporters/reporter.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.parseOutReportOptions = exports.handleReportingForTestsRun = void 0;
|
|
4
7
|
const constants_1 = require("../commands/constants");
|
|
@@ -6,7 +9,8 @@ const TestResult_1 = require("../core/execution/TestResult");
|
|
|
6
9
|
const loggingProvider_1 = require("../providers/logging/loggingProvider");
|
|
7
10
|
const mochAwesomeReporter_1 = require("./mochAwesome/mochAwesomeReporter");
|
|
8
11
|
const playwright_reporter_1 = require("@mablhq/playwright-reporter");
|
|
9
|
-
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
async function handleReportingForTestsRun(reporter, testResults, apiClient, workspaceId, reportOptions, browser, fromPlanId, environmentId, applicationId, verbose) {
|
|
10
14
|
let options;
|
|
11
15
|
try {
|
|
12
16
|
options = reportOptions ? parseOutReportOptions(reportOptions) : {};
|
|
@@ -26,7 +30,7 @@ async function handleReportingForTestsRun(reporter, testResults, apiClient, work
|
|
|
26
30
|
if (!browser) {
|
|
27
31
|
throw new Error('Browser is required for Mabl reporting');
|
|
28
32
|
}
|
|
29
|
-
await generateMablReportFromTestResults(workspaceId, testResults, options, apiClient, browser, fromPlanId, environmentId, applicationId);
|
|
33
|
+
await generateMablReportFromTestResults(workspaceId, testResults, options, apiClient, browser, fromPlanId, environmentId, applicationId, verbose);
|
|
30
34
|
break;
|
|
31
35
|
default:
|
|
32
36
|
throw new Error(`Unsupported reporter options supplied: ${reporter}`);
|
|
@@ -37,7 +41,7 @@ async function handleReportingForTestsRun(reporter, testResults, apiClient, work
|
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
exports.handleReportingForTestsRun = handleReportingForTestsRun;
|
|
40
|
-
async function generateMablReportFromTestResults(workspaceId, testResults, _options, apiClient, browser, fromPlanId, environmentId, applicationId) {
|
|
44
|
+
async function generateMablReportFromTestResults(workspaceId, testResults, _options, apiClient, browser, fromPlanId, environmentId, applicationId, verbose) {
|
|
41
45
|
const reporterApiClient = new playwright_reporter_1.MablApiClient({
|
|
42
46
|
httpClient: apiClient.httpClient,
|
|
43
47
|
apiUrl: apiClient.baseApiUrl,
|
|
@@ -53,6 +57,7 @@ async function generateMablReportFromTestResults(workspaceId, testResults, _opti
|
|
|
53
57
|
const uploadClient = new playwright_reporter_1.UploadClient({
|
|
54
58
|
uploadServiceUrl: new URL(apiClient.baseApiUrl),
|
|
55
59
|
httpClient: apiClient.httpClient,
|
|
60
|
+
debug: verbose,
|
|
56
61
|
});
|
|
57
62
|
const mablReporter = new playwright_reporter_1.MablReporter({
|
|
58
63
|
apiClient: reporterApiClient,
|
|
@@ -65,6 +70,7 @@ async function generateMablReportFromTestResults(workspaceId, testResults, _opti
|
|
|
65
70
|
},
|
|
66
71
|
workspaceId,
|
|
67
72
|
context: 'mabl_local',
|
|
73
|
+
outputDir: verbose ? path_1.default.join(process.cwd(), 'mabl-output') : undefined,
|
|
68
74
|
});
|
|
69
75
|
let planRunId;
|
|
70
76
|
if (fromPlanId) {
|