@midscene/test 1.17.2 → 1.17.3
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/dist/es/cli/index.mjs +5 -1
- package/dist/es/cli/index.mjs.map +1 -1
- package/dist/es/test-cli.mjs +6 -2
- package/dist/es/test-cli.mjs.map +1 -1
- package/dist/lib/cli/index.js +5 -1
- package/dist/lib/cli/index.js.map +1 -1
- package/dist/lib/test-cli.js +6 -2
- package/dist/lib/test-cli.js.map +1 -1
- package/dist/types/cli/index.d.ts +3 -0
- package/package.json +13 -13
package/dist/lib/cli/index.js
CHANGED
|
@@ -285,9 +285,12 @@ const validateOutput = (value)=>{
|
|
|
285
285
|
if (void 0 !== value && !isRecord(value)) throw new TypeError('Midscene config output must be an object.');
|
|
286
286
|
const candidate = value ?? {};
|
|
287
287
|
rejectUnknownKeys(candidate, [
|
|
288
|
-
'reportDir'
|
|
288
|
+
'reportDir',
|
|
289
|
+
'reportFormat'
|
|
289
290
|
], 'output');
|
|
291
|
+
if (void 0 !== candidate.reportFormat && 'single-html' !== candidate.reportFormat && 'html-and-external-assets' !== candidate.reportFormat) throw new TypeError('Midscene config output.reportFormat must be single-html or html-and-external-assets.');
|
|
290
292
|
return Object.freeze({
|
|
293
|
+
reportFormat: candidate.reportFormat ?? 'single-html',
|
|
291
294
|
reportDir: validateOutputPath(candidate.reportDir, './midscene_run/report', 'output.reportDir')
|
|
292
295
|
});
|
|
293
296
|
};
|
|
@@ -2127,6 +2130,7 @@ async function runPreparedTestProject(plan) {
|
|
|
2127
2130
|
if (!plan.reportEnabled) return;
|
|
2128
2131
|
const reportPath = await new report_namespaceObject.TestRunReportAssembler().assembleAsync({
|
|
2129
2132
|
outputDir: reportDir,
|
|
2133
|
+
outputFormat: plan.definition.output.reportFormat,
|
|
2130
2134
|
reportFileName: `midscene-e2e-${runId}`,
|
|
2131
2135
|
overwrite: false,
|
|
2132
2136
|
sources: (0, test_runner_namespaceObject.collectTestRunReportSources)(completedResult),
|