@testomatio/reporter 1.4.13-beta-bitbucket-pipe → 1.5.0
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.
|
@@ -147,6 +147,9 @@ function checkStatus(status) {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
function appendStep(step, shift = 0) {
|
|
150
|
+
// nesting too deep, ignore those steps
|
|
151
|
+
if (shift >= 10) return;
|
|
152
|
+
|
|
150
153
|
let newCategory = step.category;
|
|
151
154
|
switch (newCategory) {
|
|
152
155
|
case 'test.step':
|
|
@@ -176,7 +179,7 @@ function appendStep(step, shift = 0) {
|
|
|
176
179
|
};
|
|
177
180
|
|
|
178
181
|
if (formattedSteps.length) {
|
|
179
|
-
resultStep.steps = formattedSteps;
|
|
182
|
+
resultStep.steps = formattedSteps.filter(s => !!s);
|
|
180
183
|
}
|
|
181
184
|
|
|
182
185
|
if (step.error !== undefined) {
|
package/lib/bin/startTest.js
CHANGED
|
@@ -45,7 +45,7 @@ program
|
|
|
45
45
|
|
|
46
46
|
const client = new TestomatClient({ apiKey });
|
|
47
47
|
|
|
48
|
-
client.updateRunStatus(STATUS.FINISHED
|
|
48
|
+
client.updateRunStatus(STATUS.FINISHED).then(() => {
|
|
49
49
|
console.log(chalk.yellow(`Run ${process.env.TESTOMATIO_RUN} was finished`));
|
|
50
50
|
process.exit(0);
|
|
51
51
|
});
|
package/lib/pipe/testomatio.js
CHANGED
|
@@ -50,6 +50,7 @@ class TestomatioPipe {
|
|
|
50
50
|
this.store = store || {};
|
|
51
51
|
this.title = params.title || process.env.TESTOMATIO_TITLE;
|
|
52
52
|
this.sharedRun = !!process.env.TESTOMATIO_SHARED_RUN;
|
|
53
|
+
this.sharedRunTimeout = !!process.env.TESTOMATIO_SHARED_RUN_TIMEOUT;
|
|
53
54
|
this.groupTitle = params.groupTitle || process.env.TESTOMATIO_RUNGROUP_TITLE;
|
|
54
55
|
this.env = process.env.TESTOMATIO_ENV;
|
|
55
56
|
this.label = process.env.TESTOMATIO_LABEL;
|
|
@@ -184,6 +185,7 @@ class TestomatioPipe {
|
|
|
184
185
|
title: this.title,
|
|
185
186
|
label: this.label,
|
|
186
187
|
shared_run: this.sharedRun,
|
|
188
|
+
shared_run_timeout: this.sharedRunTimeout,
|
|
187
189
|
}).filter(([, value]) => !!value),
|
|
188
190
|
);
|
|
189
191
|
debug('Run params', JSON.stringify(runParams, null, 2));
|
|
@@ -296,7 +298,7 @@ class TestomatioPipe {
|
|
|
296
298
|
}
|
|
297
299
|
});
|
|
298
300
|
};
|
|
299
|
-
|
|
301
|
+
|
|
300
302
|
|
|
301
303
|
/**
|
|
302
304
|
* Uploads tests as a batch (multiple tests at once). Intended to be used with a setInterval
|
|
@@ -310,6 +312,8 @@ class TestomatioPipe {
|
|
|
310
312
|
const testsToSend = this.batch.tests.splice(0);
|
|
311
313
|
debug('📨 Batch upload', testsToSend.length, 'tests');
|
|
312
314
|
|
|
315
|
+
testsToSend.forEach(debug);
|
|
316
|
+
|
|
313
317
|
return this.axios
|
|
314
318
|
.post(
|
|
315
319
|
`/api/reporter/${this.runId}/testrun`,
|
|
@@ -367,7 +371,7 @@ class TestomatioPipe {
|
|
|
367
371
|
*/
|
|
368
372
|
async finishRun(params) {
|
|
369
373
|
if (!this.isEnabled) return;
|
|
370
|
-
|
|
374
|
+
|
|
371
375
|
await this.#batchUpload();
|
|
372
376
|
if (this.batch.intervalFunction) clearInterval(this.batch.intervalFunction);
|
|
373
377
|
|