@reportportal/client-javascript 5.5.6 → 5.5.8
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/README.md +1 -1
- package/VERSION +1 -1
- package/lib/commons/config.js +1 -0
- package/lib/report-portal-client.js +17 -1
- package/lib/rest.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ rpClient.checkConnect().then(() => {
|
|
|
122
122
|
| restClientConfig | Optional | Not set | Check the details in the [HTTP client config](#http-client-options). |
|
|
123
123
|
| launchUuidPrint | Optional | false | Whether to print the current launch UUID. |
|
|
124
124
|
| launchUuidPrintOutput | Optional | 'STDOUT' | Launch UUID printing output. Possible values: 'STDOUT', 'STDERR', 'FILE', 'ENVIRONMENT'. Works only if `launchUuidPrint` set to `true`. File format: `rp-launch-uuid-${launch_uuid}.tmp`. Env variable: `RP_LAUNCH_UUID`. |
|
|
125
|
-
|
|
|
125
|
+
| skippedIsNotIssue | Optional | False | ReportPortal provides feature to mark skipped tests as not 'To Investigate'. Option could be equal boolean values: `true` - skipped tests will not be marked as 'To Investigate' on application. `false` - skipped tests considered as issues and will be marked as 'To Investigate' on application. |
|
|
126
126
|
|
|
127
127
|
### HTTP client options
|
|
128
128
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.5.
|
|
1
|
+
5.5.9-SNAPSHOT
|
package/lib/commons/config.js
CHANGED
|
@@ -115,6 +115,7 @@ const getClientConfig = (options) => {
|
|
|
115
115
|
description: options.description,
|
|
116
116
|
launchUuidPrint: options.launchUuidPrint,
|
|
117
117
|
launchUuidPrintOutput,
|
|
118
|
+
skippedIsNotIssue: !!options.skippedIsNotIssue,
|
|
118
119
|
};
|
|
119
120
|
} catch (error) {
|
|
120
121
|
// don't throw the error up to not break the entire process
|
|
@@ -196,11 +196,20 @@ class RPClient {
|
|
|
196
196
|
const tempId = this.getUniqId();
|
|
197
197
|
|
|
198
198
|
if (launchDataRQ.id) {
|
|
199
|
+
this.logDebug(`Use existing launch with tempId ${tempId}`, launchDataRQ);
|
|
199
200
|
this.map[tempId] = this.getNewItemObj((resolve) => resolve(launchDataRQ));
|
|
200
201
|
this.map[tempId].realId = launchDataRQ.id;
|
|
201
202
|
this.launchUuid = launchDataRQ.id;
|
|
202
203
|
} else {
|
|
203
204
|
const systemAttr = helpers.getSystemAttribute();
|
|
205
|
+
if (this.config.skippedIsNotIssue === true) {
|
|
206
|
+
const skippedIsNotIssueAttribute = {
|
|
207
|
+
key: 'skippedIssue',
|
|
208
|
+
value: 'false',
|
|
209
|
+
system: true,
|
|
210
|
+
};
|
|
211
|
+
systemAttr.push(skippedIsNotIssueAttribute);
|
|
212
|
+
}
|
|
204
213
|
const attributes = Array.isArray(launchDataRQ.attributes)
|
|
205
214
|
? launchDataRQ.attributes.concat(systemAttr)
|
|
206
215
|
: systemAttr;
|
|
@@ -213,7 +222,7 @@ class RPClient {
|
|
|
213
222
|
|
|
214
223
|
this.map[tempId] = this.getNewItemObj((resolve, reject) => {
|
|
215
224
|
const url = 'launch';
|
|
216
|
-
this.logDebug(`Start launch with tempId ${tempId}`,
|
|
225
|
+
this.logDebug(`Start launch with tempId ${tempId}`, launchData);
|
|
217
226
|
this.restClient.create(url, launchData).then(
|
|
218
227
|
(response) => {
|
|
219
228
|
this.map[tempId].realId = response.id;
|
|
@@ -611,6 +620,13 @@ class RPClient {
|
|
|
611
620
|
...finishTestItemRQ,
|
|
612
621
|
};
|
|
613
622
|
|
|
623
|
+
if (
|
|
624
|
+
finishTestItemData.status === RP_STATUSES.SKIPPED &&
|
|
625
|
+
this.config.skippedIsNotIssue === true
|
|
626
|
+
) {
|
|
627
|
+
finishTestItemData.issue = { issueType: 'NOT_ISSUE' };
|
|
628
|
+
}
|
|
629
|
+
|
|
614
630
|
itemObj.finishSend = true;
|
|
615
631
|
this.logDebug(`Finish all children for test item with tempId ${itemTempId}`);
|
|
616
632
|
Promise.allSettled(
|
package/lib/rest.js
CHANGED
|
@@ -150,7 +150,7 @@ method: ${method}`,
|
|
|
150
150
|
getRetryConfig() {
|
|
151
151
|
const retryOption = this.restClientConfig?.retry;
|
|
152
152
|
const onRetry = (retryCount, error, requestConfig) => {
|
|
153
|
-
if (this.restClientConfig
|
|
153
|
+
if (this.restClientConfig?.debug) {
|
|
154
154
|
console.log(`[retry #${retryCount}] ${requestConfig.method?.toUpperCase()} ${requestConfig.url} -> ${error.code || error.message}`);
|
|
155
155
|
}
|
|
156
156
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reportportal/client-javascript",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.8",
|
|
4
4
|
"description": "ReportPortal client for Node.js",
|
|
5
5
|
"author": "ReportPortal.io",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npm run clean && tsc",
|
|
8
8
|
"clean": "rimraf ./build",
|
|
9
|
-
"lint": "eslint ./statistics/**/* ./lib/**/*
|
|
9
|
+
"lint": "eslint ./statistics/**/* ./lib/**/*",
|
|
10
10
|
"format": "npm run lint -- --fix",
|
|
11
11
|
"test": "jest",
|
|
12
12
|
"test:coverage": "jest --coverage"
|