@testomatio/reporter 1.6.3 → 1.6.4

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.
@@ -105,37 +105,37 @@ class PlaywrightReporter {
105
105
 
106
106
  await Promise.all(reportTestPromises);
107
107
 
108
- if (!this.uploads.length) return;
108
+ if (this.uploads.length) {
109
+ if (this.client.uploader.isEnabled) console.log(APP_PREFIX, `🎞️ Uploading ${this.uploads.length} files...`);
109
110
 
110
- if (this.client.uploader.isEnabled) console.log(APP_PREFIX, `🎞️ Uploading ${this.uploads.length} files...`);
111
+ const promises = [];
111
112
 
112
- const promises = [];
113
+ // ? possible move to addTestRun (needs investigation if files are ready)
114
+ for (const upload of this.uploads) {
115
+ const { rid, file, title } = upload;
113
116
 
114
- // ? possible move to addTestRun (needs investigation if files are ready)
115
- for (const upload of this.uploads) {
116
- const { rid, file, title } = upload;
117
-
118
- const files = upload.files.map(attachment => ({
119
- path: this.#getArtifactPath(attachment),
120
- title,
121
- type: attachment.contentType,
122
- }));
123
-
124
- if (!this.client.uploader.isEnabled) {
125
- files.forEach(f => this.client.uploader.storeUploadedFile(f, this.client.runId, rid, false));
126
- continue;
127
- }
128
-
129
- promises.push(
130
- this.client.addTestRun(undefined, {
131
- rid,
117
+ const files = upload.files.map(attachment => ({
118
+ path: this.#getArtifactPath(attachment),
132
119
  title,
133
- files,
134
- file,
135
- }),
136
- );
120
+ type: attachment.contentType,
121
+ }));
122
+
123
+ if (!this.client.uploader.isEnabled) {
124
+ files.forEach(f => this.client.uploader.storeUploadedFile(f, this.client.runId, rid, false));
125
+ continue;
126
+ }
127
+
128
+ promises.push(
129
+ this.client.addTestRun(undefined, {
130
+ rid,
131
+ title,
132
+ files,
133
+ file,
134
+ }),
135
+ );
136
+ }
137
+ await Promise.all(promises);
137
138
  }
138
- await Promise.all(promises);
139
139
 
140
140
  await this.client.updateRunStatus(checkStatus(result.status));
141
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",