cucumberjs-qase-reporter 2.1.1 → 2.1.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/changelog.md +6 -0
- package/dist/models.d.ts +4 -0
- package/dist/storage.js +30 -11
- package/package.json +3 -3
package/changelog.md
CHANGED
package/dist/models.d.ts
CHANGED
package/dist/storage.js
CHANGED
|
@@ -66,7 +66,26 @@ class Storage {
|
|
|
66
66
|
const { children, name } = document.feature;
|
|
67
67
|
children.forEach(({ scenario }) => {
|
|
68
68
|
if (scenario) {
|
|
69
|
-
|
|
69
|
+
const parameters = {};
|
|
70
|
+
scenario.examples?.forEach((example) => {
|
|
71
|
+
if (example.tableHeader && example.tableBody) {
|
|
72
|
+
const columnNames = example.tableHeader.cells.map(cell => cell.value);
|
|
73
|
+
example.tableBody.forEach((row) => {
|
|
74
|
+
const rowParams = {};
|
|
75
|
+
row.cells.forEach((cell, index) => {
|
|
76
|
+
const columnName = columnNames[index];
|
|
77
|
+
if (columnName) {
|
|
78
|
+
rowParams[columnName] = cell.value;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
parameters[row.id] = rowParams;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
this.scenarios[scenario.id] = {
|
|
86
|
+
name: name,
|
|
87
|
+
parameters: parameters,
|
|
88
|
+
};
|
|
70
89
|
}
|
|
71
90
|
});
|
|
72
91
|
}
|
|
@@ -169,18 +188,24 @@ class Storage {
|
|
|
169
188
|
}
|
|
170
189
|
const error = this.getError(tcs.id);
|
|
171
190
|
let relations = null;
|
|
172
|
-
|
|
191
|
+
let params = {};
|
|
192
|
+
const nodeId = pickle.astNodeIds[0];
|
|
173
193
|
if (nodeId != undefined && this.scenarios[nodeId] != undefined) {
|
|
174
194
|
relations = {
|
|
175
195
|
suite: {
|
|
176
196
|
data: [
|
|
177
197
|
{
|
|
178
|
-
title: this.scenarios[nodeId] ?? '',
|
|
198
|
+
title: this.scenarios[nodeId]?.name ?? '',
|
|
179
199
|
public_id: null,
|
|
180
200
|
},
|
|
181
201
|
],
|
|
182
202
|
},
|
|
183
203
|
};
|
|
204
|
+
for (const id of pickle.astNodeIds) {
|
|
205
|
+
if (this.scenarios[nodeId]?.parameters[id] != undefined) {
|
|
206
|
+
params = { ...params, ...this.scenarios[nodeId]?.parameters[id] };
|
|
207
|
+
}
|
|
208
|
+
}
|
|
184
209
|
}
|
|
185
210
|
return {
|
|
186
211
|
attachments: this.attachments[testCase.testCaseStartedId] ?? [],
|
|
@@ -196,7 +221,7 @@ class Storage {
|
|
|
196
221
|
fields: metadata.fields,
|
|
197
222
|
message: error?.message ?? null,
|
|
198
223
|
muted: false,
|
|
199
|
-
params:
|
|
224
|
+
params: params,
|
|
200
225
|
group_params: {},
|
|
201
226
|
relations: relations,
|
|
202
227
|
run_id: null,
|
|
@@ -314,13 +339,7 @@ class Storage {
|
|
|
314
339
|
* @private
|
|
315
340
|
*/
|
|
316
341
|
getSignature(pickle, ids) {
|
|
317
|
-
|
|
318
|
-
+ '::'
|
|
319
|
-
+ pickle.name.toLowerCase().replace(/\s/g, '_');
|
|
320
|
-
if (ids.length > 0) {
|
|
321
|
-
signature += '::' + ids.join('::');
|
|
322
|
-
}
|
|
323
|
-
return signature;
|
|
342
|
+
return (0, qase_javascript_commons_1.generateSignature)(ids, [...pickle.uri.split('/'), pickle.name], {});
|
|
324
343
|
}
|
|
325
344
|
getError(testCaseId) {
|
|
326
345
|
const testErrors = this.testCaseStartedErrors[testCaseId];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cucumberjs-qase-reporter",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Qase TMS CucumberJS Reporter",
|
|
5
5
|
"homepage": "https://github.com/qase-tms/qase-javascript",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"test": "jest --passWithNoTests",
|
|
37
37
|
"clean": "rm -rf dist"
|
|
38
38
|
},
|
|
39
|
-
"author": "
|
|
39
|
+
"author": "Qase Team <support@qase.io>",
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@cucumber/messages": "^22.0.0",
|
|
43
|
-
"qase-javascript-commons": "~2.3.
|
|
43
|
+
"qase-javascript-commons": "~2.3.5"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@cucumber/cucumber": ">=7.0.0"
|