@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.
- package/lib/adapter/playwright.js +26 -26
- package/package.json +1 -1
|
@@ -105,37 +105,37 @@ class PlaywrightReporter {
|
|
|
105
105
|
|
|
106
106
|
await Promise.all(reportTestPromises);
|
|
107
107
|
|
|
108
|
-
if (
|
|
108
|
+
if (this.uploads.length) {
|
|
109
|
+
if (this.client.uploader.isEnabled) console.log(APP_PREFIX, `🎞️ Uploading ${this.uploads.length} files...`);
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
const promises = [];
|
|
111
112
|
|
|
112
|
-
|
|
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
|
-
|
|
115
|
-
|
|
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
|
-
|
|
134
|
-
|
|
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
|
}
|