@reportportal/client-javascript 5.5.7 → 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 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
- | token | Deprecated | Not set | Use `apiKey` or `oauth` instead. |
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.8-SNAPSHOT
1
+ 5.5.9-SNAPSHOT
@@ -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
@@ -202,6 +202,14 @@ class RPClient {
202
202
  this.launchUuid = launchDataRQ.id;
203
203
  } else {
204
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
+ }
205
213
  const attributes = Array.isArray(launchDataRQ.attributes)
206
214
  ? launchDataRQ.attributes.concat(systemAttr)
207
215
  : systemAttr;
@@ -612,6 +620,13 @@ class RPClient {
612
620
  ...finishTestItemRQ,
613
621
  };
614
622
 
623
+ if (
624
+ finishTestItemData.status === RP_STATUSES.SKIPPED &&
625
+ this.config.skippedIsNotIssue === true
626
+ ) {
627
+ finishTestItemData.issue = { issueType: 'NOT_ISSUE' };
628
+ }
629
+
615
630
  itemObj.finishSend = true;
616
631
  this.logDebug(`Finish all children for test item with tempId ${itemTempId}`);
617
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.debug) {
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.7",
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/**/* ./__tests__/**/*",
9
+ "lint": "eslint ./statistics/**/* ./lib/**/*",
10
10
  "format": "npm run lint -- --fix",
11
11
  "test": "jest",
12
12
  "test:coverage": "jest --coverage"