Skip to content

Commit 9554876

Browse files
committed
corrected status counts
1 parent d9a03a4 commit 9554876

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

bin/helpers/sync/failedSpecsDetails.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ let failedSpecsDetails = (data) => {
3838
if (spec.status && spec.status.toLowerCase() === 'failed' && !failedSpecs)
3939
failedSpecs = true;
4040

41-
let specStatus =
42-
spec.status && spec.status.toLowerCase() === 'failed'
43-
? chalk.red(spec.status)
44-
: chalk.yellow(spec.status);
41+
let specStatus = getSpecStatus(spec.status)
4542
specData.push([
4643
spec.specName,
4744
specStatus,
@@ -79,4 +76,16 @@ let failedSpecsDetails = (data) => {
7976
});
8077
}
8178

79+
let getSpecStatus = (specStatus) => {
80+
console.log(`roshan1: specStatus is ${specStatus} ::`)
81+
switch(specStatus.toLowerCase()) {
82+
case specStatus == 'failed': return chalk.red(specStatus);
83+
case specStatus == 'pending':
84+
case specStatus == 'passed_with_pending':
85+
case specStatus == 'skipped':
86+
case specStatus == 'passed_with_skipped': return chalk.blueBright(specStatus);
87+
default: chalk.yellow(specStatus);
88+
}
89+
}
90+
8291
exports.failedSpecsDetails = failedSpecsDetails;

bin/helpers/sync/specsSummary.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ let printSpecsRunSummary = (data, machines) => {
2222
total: 0,
2323
failed: 0,
2424
passed: 0,
25-
skipped: 0
25+
skipped: 0,
26+
pending: 0
2627
};
2728

2829
data.specs.forEach((spec) => {
2930
specSummaryCount(summary, spec.status.toLowerCase());
3031
});
3132

32-
logger.info(`Total tests: ${summary.total}, passed: ${summary.passed}, failed: ${summary.failed}, skipped: ${summary.skipped}`);
33+
logger.info(`Total tests: ${summary.total}, passed: ${summary.passed}, failed: ${summary.failed}, skipped: ${summary.skipped}, pending: ${summary.pending}`);
3334
logger.info(`Done in ${data.duration/1000} seconds using ${machines} machines\n`);
3435

3536
resolve(data.exitCode);
@@ -41,9 +42,14 @@ let specSummaryCount = (summary, status) => {
4142
case 'failed':
4243
summary.failed++;
4344
break;
45+
case "passed_with_skipped":
4446
case 'skipped':
4547
summary.skipped++;
4648
break;
49+
case "passed_with_pending":
50+
case "pending":
51+
summary.pending++;
52+
break;
4753
case 'passed':
4854
summary.passed++;
4955
break;

bin/helpers/sync/syncSpecsLogs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ let printInitialLog = () => {
192192
}
193193

194194
let printSpecData = (data) => {
195-
console.log(`roshan1: the printSpecData ${inspect(data)}`)
196195
let combination = getCombinationName(data["spec"]);
197196
let status = data["spec"]["status"];
198197
let statusMark = getStatus(status);

0 commit comments

Comments
 (0)