Skip to content

Commit

Permalink
fix: use dashboard url markdown syntax (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Feb 11, 2021
1 parent d137c17 commit 733d47b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"supportFile": false,
"pluginsFile": false,
"fixturesFolder": false,
"baseUrl": "http://localhost:5000"
"baseUrl": "http://localhost:5000",
"projectId": "ixroqc"
}
28 changes: 16 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,24 +194,28 @@ const processCypressResults = (results, errorCallback, summaryCallback) => {
}
})

// Note: text looks nice with double space after the emoji
const summary = [
'tests:',
`✅ ${results.totalPassed}`,
`🔥 ${results.totalFailed}`,
`⭕️ ${results.totalPending}`,
`🚫 ${results.totalSkipped}`,
]

let text = stripIndent`
✅ Passed tests: ${results.totalPassed}
🔥 Failed tests: ${results.totalFailed}
⭕️ Pending tests: ${results.totalPending}
🚫 Skipped tests: ${results.totalSkipped}
Passed tests: ${results.totalPassed}
🔥 Failed tests: ${results.totalFailed}
⭕️ Pending tests: ${results.totalPending}
🚫 Skipped tests: ${results.totalSkipped}
`
if (results.runUrl) {
text += `\n🔗 Dashboard url: ${results.runUrl}`
summary.push(`🔗 [dashboard run](${results.runUrl})`)
text += `\n🔗 Cypress Dashboard url: [${results.runUrl}](${results.runUrl})`
}
summaryCallback({
title: PLUGIN_NAME,
summary: [
'tests:',
`✅ ${results.totalPassed}`,
`🔥 ${results.totalFailed}`,
`⭕️ ${results.totalPending}`,
`🚫 ${results.totalSkipped}`,
].join(' '),
summary: summary.join(' '),
text,
})

Expand Down

0 comments on commit 733d47b

Please sign in to comment.