mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
Return links to summary report
This commit is contained in:
parent
d56352b96c
commit
b522d19cac
20 changed files with 130 additions and 426 deletions
|
|
@ -159,14 +159,17 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s
|
|||
|
||||
if (testRuns.length > 0 || options.onlySummary) {
|
||||
const tableData = testRuns
|
||||
.filter(tr => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)
|
||||
.map(tr => {
|
||||
.map((tr, originalIndex) => ({tr, originalIndex}))
|
||||
.filter(({tr}) => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)
|
||||
.map(({tr, originalIndex}) => {
|
||||
const time = formatTime(tr.time)
|
||||
const name = tr.path
|
||||
const addr = options.baseUrl + makeRunSlug(originalIndex, options).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 [name, passed, failed, skipped, time]
|
||||
return [nameLink, passed, failed, skipped, time]
|
||||
})
|
||||
|
||||
const resultsTable = table(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue