mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 14:57:09 +01:00
Tweak report
This commit is contained in:
parent
670a1b828d
commit
b5fdf002c6
2 changed files with 13 additions and 11 deletions
|
|
@ -141,15 +141,16 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s
|
|||
const name = tr.path
|
||||
const addr = options.baseUrl + makeRunSlug(runIndex).link
|
||||
const nameLink = link(name, addr)
|
||||
const passed = tr.passed > 0 ? `${tr.passed}${Icon.success}` : ''
|
||||
const failed = tr.failed > 0 ? `${tr.failed}${Icon.fail}` : ''
|
||||
const skipped = tr.skipped > 0 ? `${tr.skipped}${Icon.skip}` : ''
|
||||
return [nameLink, passed, failed, skipped, time]
|
||||
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, nameLink, passed, failed, skipped, time]
|
||||
})
|
||||
|
||||
const resultsTable = table(
|
||||
['Report', 'Passed', 'Failed', 'Skipped', 'Time'],
|
||||
[Align.Left, Align.Right, Align.Right, Align.Right, Align.Right],
|
||||
['', 'Report', 'Passed', 'Failed', 'Skipped', 'Time'],
|
||||
[Align.Center, Align.Left, Align.Right, Align.Right, Align.Right, Align.Right],
|
||||
...tableData
|
||||
)
|
||||
sections.push(resultsTable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue