Skip to content

Commit f930c9a

Browse files
Merge pull request #219 from contentstack/fix/slack-notification-envs
update notification with time stamp
2 parents 9cb1f00 + f5f7543 commit f930c9a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sanity-report-dev11.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const totalTests = mochawesomeReport.stats.tests;
1313
const passedTests = mochawesomeReport.stats.passes;
1414
const failedTests = mochawesomeReport.stats.failures;
1515

16+
let durationInSeconds = Math.floor(mochawesomeReport.stats.duration / 1000)
17+
const durationInMinutes = Math.floor(durationInSeconds / 60)
18+
durationInSeconds %= 60
19+
1620
const resultMessage =
1721
passedTests === totalTests
1822
? `:white_check_mark: Success (${passedTests} / ${totalTests} Passed)`
@@ -26,7 +30,7 @@ const reportUrl = `http://${goCdServer}/go/files/${pipelineName}/${pipelineCount
2630

2731
const slackMessage = {
2832
text: `Dev11, CMA SDK Full Sanity
29-
*Result:* ${resultMessage}
33+
*Result:* ${resultMessage}. ${durationInMinutes}m ${durationInSeconds}s
3034
*Failed Tests:* ${failedTests}
3135
<${reportUrl}|View Report>`,
3236
};

0 commit comments

Comments
 (0)