cucumberjs-qase-reporter 2.1.0 → 2.1.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.
package/changelog.md CHANGED
@@ -1,3 +1,11 @@
1
+ # qase-cucumberjs@2.1.1
2
+
3
+ ## What's new
4
+
5
+ - Improved attachment handling with proper base64 content detection and decoding
6
+ - Fixed issues with corrupted image uploads
7
+ - Enhanced MIME type handling for attachments
8
+
1
9
  # qase-cucumberjs@2.1.0
2
10
 
3
11
  ## What's new
package/dist/storage.js CHANGED
@@ -89,6 +89,19 @@ class Storage {
89
89
  id: (0, uuid_1.v4)(),
90
90
  });
91
91
  }
92
+ if (attachment.testCaseStartedId) {
93
+ if (!this.attachments[attachment.testCaseStartedId]) {
94
+ this.attachments[attachment.testCaseStartedId] = [];
95
+ }
96
+ this.attachments[attachment.testCaseStartedId]?.push({
97
+ file_name: this.getFileNameFromMediaType(attachment.mediaType),
98
+ mime_type: attachment.mediaType,
99
+ file_path: null,
100
+ content: attachment.body,
101
+ size: 0,
102
+ id: (0, uuid_1.v4)(),
103
+ });
104
+ }
92
105
  }
93
106
  /**
94
107
  * Add test case to storage
@@ -170,7 +183,7 @@ class Storage {
170
183
  };
171
184
  }
172
185
  return {
173
- attachments: [],
186
+ attachments: this.attachments[testCase.testCaseStartedId] ?? [],
174
187
  author: null,
175
188
  execution: {
176
189
  status: this.testCaseStartedResult[testCase.testCaseStartedId] ?? qase_javascript_commons_1.TestStatusEnum.passed,
@@ -301,13 +314,7 @@ class Storage {
301
314
  * @private
302
315
  */
303
316
  getSignature(pickle, ids) {
304
- let signature = pickle.uri.split('/').join('::')
305
- + '::'
306
- + pickle.name.toLowerCase().replace(/\s/g, '_');
307
- if (ids.length > 0) {
308
- signature += '::' + ids.join('::');
309
- }
310
- return signature;
317
+ return (0, qase_javascript_commons_1.generateSignature)(ids, [...pickle.uri.split('/'), pickle.name], {});
311
318
  }
312
319
  getError(testCaseId) {
313
320
  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.0",
3
+ "version": "2.1.2",
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": "Parviz Khavari <havaripa@gmail.com>",
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.0"
43
+ "qase-javascript-commons": "~2.3.3"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@cucumber/cucumber": ">=7.0.0"