cucumberjs-qase-reporter 2.0.7 → 2.1.1

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,18 @@
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
+
9
+ # qase-cucumberjs@2.1.0
10
+
11
+ ## What's new
12
+
13
+ - Updated to the latest minor version of the common package for improved compatibility and features.
14
+ - Fixed all ESLint warnings across the project to ensure code quality and maintainability.
15
+
1
16
  # qase-cucumberjs@2.0.7
2
17
 
3
18
  ## What's new
package/dist/models.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- interface TestMetadata {
1
+ export interface TestMetadata {
2
2
  ids: number[];
3
3
  fields: Record<string, string>;
4
4
  title: string | null;
package/dist/models.js CHANGED
@@ -1 +1,2 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cucumberjs-qase-reporter",
3
- "version": "2.0.7",
3
+ "version": "2.1.1",
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.2.14"
43
+ "qase-javascript-commons": "~2.3.2"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@cucumber/cucumber": ">=7.0.0"