Skip to content

Commit

Permalink
fix(ci): fixing md formatting with linebreak in detail
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanl17 committed Aug 16, 2024
1 parent 4d01018 commit b68e058
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/sanity/playwright-ct/scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ function generateMarkdownTable(rows: SummaryRow[]) {
}

function generateTestingSummary(rows: SummaryRow[]) {
const hasFailedTests = rows.some((row) => row.totalFailed > 0)
const failedTestCount = sumBy(rows, 'totalFailed')

return `${hasFailedTests ? '❌ Failed Tests' : '✅ All Tests Passed'} -- open for details`
return `${failedTestCount > 0 ? `❌ Failed Tests (${failedTestCount})` : '✅ All Tests Passed'} -- expand for details`
}

function formatAsCollapsable(summary: string, detail: string) {
return `<details><summary>${summary}</summary>${detail}</details>`
return `<details>\n<summary>${summary}</summary>\n\n${detail}\n</details>`
}

/**
Expand Down

0 comments on commit b68e058

Please sign in to comment.