cucumberjs-qase-reporter 2.1.4 → 2.1.6

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 CHANGED
@@ -1,3 +1,16 @@
1
+ # qase-cucumberjs@2.1.6
2
+
3
+ ## Bug fixes
4
+
5
+ Fixed issue where cucumber-specific statuses like `AMBIGUOUS` were incorrectly mapped using generic status mapping instead of cucumber-specific mapping. Now cucumber-specific statuses are properly mapped according to cucumberjs conventions.
6
+
7
+ # qase-cucumberjs@2.1.5
8
+
9
+ ## What's new
10
+
11
+ - Added support for status filter in the test run.
12
+ - Improved error handling.
13
+
1
14
  # qase-cucumberjs@2.1.3
2
15
 
3
16
  ## What's new
package/dist/storage.js CHANGED
@@ -145,7 +145,13 @@ class Storage {
145
145
  */
146
146
  addTestCaseStep(testCaseStep) {
147
147
  const oldStatus = this.testCaseStartedResult[testCaseStep.testCaseStartedId];
148
- const newStatus = Storage.statusMap[testCaseStep.testStepResult.status];
148
+ // Create error object for status determination
149
+ let error = null;
150
+ if (testCaseStep.testStepResult.message) {
151
+ error = new Error(testCaseStep.testStepResult.message);
152
+ }
153
+ // Determine status based on error type
154
+ const newStatus = (0, qase_javascript_commons_1.determineTestStatus)(error, Storage.statusMap[testCaseStep.testStepResult.status]);
149
155
  this.testCaseSteps[testCaseStep.testStepId] = testCaseStep;
150
156
  if (newStatus !== qase_javascript_commons_1.TestStatusEnum.passed) {
151
157
  if (testCaseStep.testStepResult.message) {
@@ -155,7 +161,7 @@ class Storage {
155
161
  this.testCaseStartedErrors[testCaseStep.testCaseStartedId]?.push(testCaseStep.testStepResult.message);
156
162
  }
157
163
  if (oldStatus) {
158
- if (oldStatus !== qase_javascript_commons_1.TestStatusEnum.failed) {
164
+ if (oldStatus !== qase_javascript_commons_1.TestStatusEnum.failed && oldStatus !== qase_javascript_commons_1.TestStatusEnum.invalid) {
159
165
  this.testCaseStartedResult[testCaseStep.testCaseStartedId] = newStatus;
160
166
  }
161
167
  }
@@ -207,6 +213,7 @@ class Storage {
207
213
  }
208
214
  }
209
215
  }
216
+ const steps = this.convertSteps(pickle.steps, tc);
210
217
  return {
211
218
  attachments: this.attachments[testCase.testCaseStartedId] ?? [],
212
219
  author: null,
@@ -226,7 +233,7 @@ class Storage {
226
233
  relations: relations,
227
234
  run_id: null,
228
235
  signature: this.getSignature(pickle, metadata.ids),
229
- steps: this.convertSteps(pickle.steps, tc),
236
+ steps: steps,
230
237
  testops_id: metadata.ids.length > 0 ? metadata.ids : null,
231
238
  id: tcs.id,
232
239
  title: metadata.title ?? pickle.name,
@@ -279,7 +286,7 @@ class Storage {
279
286
  [cucumber_1.Status.PASSED]: qase_javascript_commons_1.TestStatusEnum.passed,
280
287
  [cucumber_1.Status.FAILED]: qase_javascript_commons_1.TestStatusEnum.failed,
281
288
  [cucumber_1.Status.SKIPPED]: qase_javascript_commons_1.TestStatusEnum.skipped,
282
- [cucumber_1.Status.AMBIGUOUS]: qase_javascript_commons_1.TestStatusEnum.failed,
289
+ [cucumber_1.Status.AMBIGUOUS]: qase_javascript_commons_1.TestStatusEnum.invalid,
283
290
  [cucumber_1.Status.PENDING]: qase_javascript_commons_1.TestStatusEnum.skipped,
284
291
  [cucumber_1.Status.UNDEFINED]: qase_javascript_commons_1.TestStatusEnum.skipped,
285
292
  [cucumber_1.Status.UNKNOWN]: qase_javascript_commons_1.TestStatusEnum.skipped,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cucumberjs-qase-reporter",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "Qase TMS CucumberJS Reporter",
5
5
  "homepage": "https://github.com/qase-tms/qase-javascript",
6
6
  "main": "./dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "license": "Apache-2.0",
41
41
  "dependencies": {
42
42
  "@cucumber/messages": "^22.0.0",
43
- "qase-javascript-commons": "~2.4.1"
43
+ "qase-javascript-commons": "~2.4.8"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@cucumber/cucumber": ">=7.0.0"