qase-javascript-commons 2.2.1 → 2.2.2
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.
|
@@ -63,13 +63,9 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
|
|
|
63
63
|
*/
|
|
64
64
|
async addTestResult(result) {
|
|
65
65
|
if (result.execution.status === models_1.TestStatusEnum.failed) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
this.showLink(result.testops_id, result.title);
|
|
66
|
+
const testOpsIds = Array.isArray(result.testops_id) ? result.testops_id : [result.testops_id];
|
|
67
|
+
for (const id of testOpsIds) {
|
|
68
|
+
this.showLink(id, result.title);
|
|
73
69
|
}
|
|
74
70
|
}
|
|
75
71
|
await super.addTestResult(result);
|
|
@@ -168,8 +164,15 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
|
|
|
168
164
|
this.logger.log((0, chalk_1.default) `{yellow No results to send to Qase}`);
|
|
169
165
|
return;
|
|
170
166
|
}
|
|
167
|
+
const remainingResults = this.results.slice(this.firstIndex);
|
|
171
168
|
if (this.firstIndex < this.results.length) {
|
|
172
|
-
|
|
169
|
+
if (remainingResults.length <= defaultChunkSize) {
|
|
170
|
+
await this.publishResults(remainingResults);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
for (let i = 0; i < remainingResults.length; i += defaultChunkSize) {
|
|
174
|
+
await this.publishResults(remainingResults.slice(i, i + defaultChunkSize));
|
|
175
|
+
}
|
|
173
176
|
}
|
|
174
177
|
// Clear results because we don't need to send them again then we use Cypress reporter
|
|
175
178
|
this.results.length = 0;
|
|
@@ -199,15 +202,37 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
|
|
|
199
202
|
async transformTestResult(result) {
|
|
200
203
|
const attachments = await this.uploadAttachments(result.attachments);
|
|
201
204
|
const steps = await this.transformSteps(result.steps, result.title);
|
|
205
|
+
const param = {};
|
|
206
|
+
for (const key in result.params) {
|
|
207
|
+
const value = result.params[key];
|
|
208
|
+
if (!value) {
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
param[key] = value;
|
|
212
|
+
}
|
|
213
|
+
const group_params = [];
|
|
214
|
+
const keys = Object.keys(result.group_params);
|
|
215
|
+
if (keys.length > 0) {
|
|
216
|
+
group_params.push(keys);
|
|
217
|
+
}
|
|
218
|
+
for (const key in result.group_params) {
|
|
219
|
+
const value = result.group_params[key];
|
|
220
|
+
if (!value) {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
param[key] = value;
|
|
224
|
+
}
|
|
202
225
|
const model = {
|
|
203
226
|
title: result.title,
|
|
204
227
|
execution: this.getExecution(result.execution),
|
|
205
228
|
testops_id: Array.isArray(result.testops_id) ? null : result.testops_id,
|
|
206
229
|
attachments: attachments,
|
|
207
230
|
steps: steps,
|
|
208
|
-
params:
|
|
231
|
+
params: param,
|
|
232
|
+
param_groups: group_params,
|
|
209
233
|
relations: this.getRelation(result.relations),
|
|
210
234
|
message: result.message,
|
|
235
|
+
fields: result.fields,
|
|
211
236
|
};
|
|
212
237
|
this.logger.logDebug(`Transformed result: ${JSON.stringify(model)}`);
|
|
213
238
|
return model;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qase-javascript-commons",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Qase JS Reporters",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"lodash.merge": "^4.6.2",
|
|
34
34
|
"lodash.mergewith": "^4.6.2",
|
|
35
35
|
"mime-types": "^2.1.33",
|
|
36
|
-
"qaseio": "~2.
|
|
36
|
+
"qaseio": "~2.4.0",
|
|
37
37
|
"strip-ansi": "^6.0.1",
|
|
38
38
|
"uuid": "^9.0.0"
|
|
39
39
|
},
|