testomatio-reporter-cli 2.11.0 → 2.12.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.
- package/package.json +1 -1
- package/src/bin/cli.js +5 -0
- package/src/client.js +1 -1
- package/src/pipe/html.js +1 -1
- package/src/pipe/markdown.js +1 -1
- package/src/pipe/testomatio.js +6 -2
- package/src/utils/pipe_utils.js +1 -0
- package/types/types.d.ts +2 -0
package/package.json
CHANGED
package/src/bin/cli.js
CHANGED
|
@@ -87,6 +87,11 @@ program
|
|
|
87
87
|
process.exit(1);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
// tests are executed later, so report the run as pending with the tests it was scoped to:
|
|
91
|
+
// pipes add their report now and replace it when the run is finished
|
|
92
|
+
const plannedTests = (client.pipeStore.preparedTestIds || []).map(id => ({ test_id: id, title: id }));
|
|
93
|
+
await client.updateRunStatus('pending', { tests: plannedTests });
|
|
94
|
+
|
|
90
95
|
// stdout carries ONLY the run id so it can be captured: RUN_ID=$(reporter start)
|
|
91
96
|
console.log(runId);
|
|
92
97
|
process.exit(0);
|
package/src/client.js
CHANGED
|
@@ -371,7 +371,7 @@ class Client {
|
|
|
371
371
|
/**
|
|
372
372
|
*
|
|
373
373
|
* Updates the status of the current test run and finishes the run.
|
|
374
|
-
* @param {'passed' | 'failed' | 'skipped' | 'finished'} status - The status of the current test run.
|
|
374
|
+
* @param {'passed' | 'failed' | 'skipped' | 'finished' | 'pending'} status - The status of the current test run.
|
|
375
375
|
* @param {Partial<import('../types/types.js').RunData>} [params] - Additional run params (e.g. duration).
|
|
376
376
|
* Must be one of "passed", "failed", or "finished"
|
|
377
377
|
* @returns {Promise<any>} - A Promise that resolves when finishes the run.
|
package/src/pipe/html.js
CHANGED
|
@@ -268,7 +268,7 @@ class HtmlPipe {
|
|
|
268
268
|
executionTime: testExecutionSumTime(aggregatedTests),
|
|
269
269
|
executionDate: getCurrentDateTimeFormatted(),
|
|
270
270
|
description:
|
|
271
|
-
[runParams.description || this.store.coverageDescription || this.store.description
|
|
271
|
+
[this.description, runParams.description || this.store.coverageDescription || this.store.description]
|
|
272
272
|
.filter(Boolean)
|
|
273
273
|
.join('\n\n') || '',
|
|
274
274
|
configuration: buildDisplayConfiguration(
|
package/src/pipe/markdown.js
CHANGED
|
@@ -140,7 +140,7 @@ class MarkdownPipe {
|
|
|
140
140
|
executionTime: testExecutionSumTime(aggregated),
|
|
141
141
|
executionDate: getCurrentDateTimeFormatted(),
|
|
142
142
|
description:
|
|
143
|
-
[runParams?.description || this.store.coverageDescription || this.store.description
|
|
143
|
+
[this.description, runParams?.description || this.store.coverageDescription || this.store.description]
|
|
144
144
|
.filter(Boolean)
|
|
145
145
|
.join('\n\n') || '',
|
|
146
146
|
configuration: this.configuration || this.store.configuration || runParams?.configuration || null,
|
package/src/pipe/testomatio.js
CHANGED
|
@@ -279,8 +279,9 @@ class TestomatioPipe {
|
|
|
279
279
|
suites: coverageConfiguration.suites?.map(id => id.replace(/^S/, '')) || [],
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
-
// Run description:
|
|
283
|
-
|
|
282
|
+
// Run description: the user-provided TESTOMATIO_DESCRIPTION with the coverage-derived block
|
|
283
|
+
// (if any) added after it. Neither overrides the other.
|
|
284
|
+
const description = [this.description, coverageDescription].filter(Boolean).join('\n\n') || null;
|
|
284
285
|
|
|
285
286
|
// Merge caller-supplied configuration (e.g. { exploratory: true }) into runParams.configuration.
|
|
286
287
|
// Caller values win on key conflict; coverage-derived tests/suites lists are preserved when not overridden.
|
|
@@ -558,6 +559,9 @@ class TestomatioPipe {
|
|
|
558
559
|
|
|
559
560
|
const { status } = params;
|
|
560
561
|
|
|
562
|
+
// a pending run was just created: nothing to update here, only other pipes report it
|
|
563
|
+
if (status === 'pending') return;
|
|
564
|
+
|
|
561
565
|
let status_event;
|
|
562
566
|
|
|
563
567
|
if (status === STATUS.FINISHED) status_event = 'finish';
|
package/src/utils/pipe_utils.js
CHANGED
package/types/types.d.ts
CHANGED