Return links to summary report

This commit is contained in:
Oles Galatsan 2025-05-20 10:32:39 +03:00 committed by Jozef Izso
parent d56352b96c
commit b522d19cac
Failed to extract signature
20 changed files with 130 additions and 426 deletions

View file

@ -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(