Skip to content

fix: use dashboard url markdown syntax #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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