@testomatio/reporter 2.3.7-beta.10-stack-artifacts → 2.3.7-beta.11-stack-artifacts
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/client.js +4 -6
- package/package.json +1 -1
- package/src/client.js +11 -13
package/lib/client.js
CHANGED
|
@@ -173,7 +173,7 @@ class Client {
|
|
|
173
173
|
* @type {TestData}
|
|
174
174
|
*/
|
|
175
175
|
const { rid, error = null, steps: originalSteps, title, suite_title, } = testData;
|
|
176
|
-
|
|
176
|
+
let steps = originalSteps;
|
|
177
177
|
const uploadedFiles = [];
|
|
178
178
|
const stackArtifactsEnabled = (0, utils_js_1.transformEnvVarToBoolean)(process.env.TESTOMATIO_STACK_ARTIFACTS);
|
|
179
179
|
const { time = 0, example = null, files = [], filesBuffers = [], code = null, file, suite_id, test_id, timestamp, links, manuallyAttachedArtifacts, overwrite, tags, } = testData;
|
|
@@ -192,12 +192,10 @@ class Client {
|
|
|
192
192
|
message = error?.message;
|
|
193
193
|
}
|
|
194
194
|
let fullLogs = this.formatLogs({ error: errorFormatted, steps, logs: testData.logs });
|
|
195
|
-
if (stackArtifactsEnabled &&
|
|
196
|
-
|
|
197
|
-
if (fullLogs && fullLogs.trim().length > 0) {
|
|
198
|
-
uploadedFiles.push(this.uploader.uploadFileAsBuffer(Buffer.from(stripColors(fullLogs), 'utf8'), [this.runId, rid, `logs_${timestamp}.txt`]));
|
|
199
|
-
}
|
|
195
|
+
if (stackArtifactsEnabled && fullLogs?.trim()?.length > 0) {
|
|
196
|
+
uploadedFiles.push(this.uploader.uploadFileAsBuffer(Buffer.from(stripColors(fullLogs), 'utf8'), [this.runId, rid, `logs_${+new Date}.log`]));
|
|
200
197
|
fullLogs = '';
|
|
198
|
+
steps = null;
|
|
201
199
|
}
|
|
202
200
|
if (!this.pipes || !this.pipes.length)
|
|
203
201
|
this.pipes = await (0, index_js_1.pipesFactory)(this.paramsForPipesFactory || {}, this.pipeStore);
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -170,12 +170,12 @@ class Client {
|
|
|
170
170
|
title,
|
|
171
171
|
suite_title,
|
|
172
172
|
} = testData;
|
|
173
|
-
|
|
173
|
+
let steps = originalSteps;
|
|
174
174
|
|
|
175
175
|
const uploadedFiles = [];
|
|
176
176
|
const stackArtifactsEnabled = transformEnvVarToBoolean(process.env.TESTOMATIO_STACK_ARTIFACTS);
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
|
|
179
179
|
const {
|
|
180
180
|
time = 0,
|
|
181
181
|
example = null,
|
|
@@ -210,20 +210,18 @@ class Client {
|
|
|
210
210
|
|
|
211
211
|
let fullLogs = this.formatLogs({ error: errorFormatted, steps, logs: testData.logs });
|
|
212
212
|
|
|
213
|
-
if (stackArtifactsEnabled &&
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
this.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
)
|
|
221
|
-
);
|
|
222
|
-
}
|
|
213
|
+
if (stackArtifactsEnabled && fullLogs?.trim()?.length > 0) {
|
|
214
|
+
uploadedFiles.push(
|
|
215
|
+
this.uploader.uploadFileAsBuffer(
|
|
216
|
+
Buffer.from(stripColors(fullLogs), 'utf8'),
|
|
217
|
+
[this.runId, rid, `logs_${+new Date}.log`]
|
|
218
|
+
)
|
|
219
|
+
);
|
|
223
220
|
fullLogs = '';
|
|
221
|
+
steps = null;
|
|
224
222
|
}
|
|
225
223
|
|
|
226
|
-
|
|
224
|
+
|
|
227
225
|
if (!this.pipes || !this.pipes.length)
|
|
228
226
|
this.pipes = await pipesFactory(this.paramsForPipesFactory || {}, this.pipeStore);
|
|
229
227
|
|