From 5bbbf1619341eb398987763b95e5e72358f93808 Mon Sep 17 00:00:00 2001 From: Patrik Husfloen Date: Thu, 8 Jun 2023 15:51:16 +0200 Subject: [PATCH] Tweak report --- dist/index.js | 12 ++++++------ src/report/get-report.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/index.js b/dist/index.js index f55a0bb..3be7d90 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1635,7 +1635,7 @@ function getTestRunsReport(testRuns, options) { const passed = tr.passed; const failed = tr.failed; const skipped = tr.skipped; - return [statusIcon + nameLink, passed, failed, skipped, time]; + return [statusIcon + ' ' + nameLink, passed, failed, skipped, time]; }); const resultsTable = (0, markdown_utils_1.table)(['Report', 'Passed', 'Failed', 'Skipped', 'Time'], [markdown_utils_1.Align.Left, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right], ...tableData); sections.push(resultsTable); @@ -1665,11 +1665,11 @@ function getSuitesReport(tr, runIndex, options) { const skipLink = options.listTests === 'none' || (options.listTests === 'failed' && s.result !== 'failed'); const tsAddr = options.baseUrl + makeSuiteSlug(runIndex, suiteIndex).link; const tsNameLink = skipLink ? tsName : (0, markdown_utils_1.link)(tsName, tsAddr); - const statusIcon = tr.failed > 0 ? markdown_utils_1.Icon.fail : tr.passed > 0 ? markdown_utils_1.Icon.success : markdown_utils_1.Icon.skip; - const passed = tr.passed; - const failed = tr.failed; - const skipped = tr.skipped; - return [statusIcon + tsNameLink, passed, failed, skipped, tsTime]; + const statusIcon = s.failed > 0 ? markdown_utils_1.Icon.fail : s.passed > 0 ? markdown_utils_1.Icon.success : markdown_utils_1.Icon.skip; + const passed = s.passed; + const failed = s.failed; + const skipped = s.skipped; + return [statusIcon + ' ' + tsNameLink, passed, failed, skipped, tsTime]; })); sections.push(suitesTable); } diff --git a/src/report/get-report.ts b/src/report/get-report.ts index facbdd1..7ba3b5d 100644 --- a/src/report/get-report.ts +++ b/src/report/get-report.ts @@ -145,7 +145,7 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s const passed = tr.passed const failed = tr.failed const skipped = tr.skipped - return [statusIcon + nameLink, passed, failed, skipped, time] + return [statusIcon + ' ' + nameLink, passed, failed, skipped, time] }) const resultsTable = table( @@ -189,11 +189,11 @@ function getSuitesReport(tr: TestRunResult, runIndex: number, options: ReportOpt const skipLink = options.listTests === 'none' || (options.listTests === 'failed' && s.result !== 'failed') const tsAddr = options.baseUrl + makeSuiteSlug(runIndex, suiteIndex).link const tsNameLink = skipLink ? tsName : link(tsName, tsAddr) - const statusIcon = tr.failed > 0 ? Icon.fail : tr.passed > 0 ? Icon.success : Icon.skip - const passed = tr.passed - const failed = tr.failed - const skipped = tr.skipped - return [statusIcon + tsNameLink, passed, failed, skipped, tsTime] + const statusIcon = s.failed > 0 ? Icon.fail : s.passed > 0 ? Icon.success : Icon.skip + const passed = s.passed + const failed = s.failed + const skipped = s.skipped + return [statusIcon + ' ' + tsNameLink, passed, failed, skipped, tsTime] }) ) sections.push(suitesTable)