Skip to content

Commit 4dce7a9

Browse files
authored
Merge pull request #84 from parthlambdatest/Dot-3538
[Dot-3538] feat: add new column for serial number in the summary table
2 parents 0c20ab5 + 92a0a1d commit 4dce7a9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

commands/utils/polling.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,18 @@ async function shortPolling(buildId, retries = 0, options) {
3232
import('chalk').then((chalk) => {
3333
const table = new Table({
3434
head: [
35+
{content: chalk.default.white('Sr. Number'), hAlign: 'center'},
3536
{content: chalk.default.white('Story'), hAlign: 'center'},
3637
{content: chalk.default.white('Mis-match %'), hAlign: 'center'},
3738
]
3839
});
39-
response.data.screenshots.forEach(screenshot => {
40-
let mismatch = screenshot.mismatchPercentage
40+
response.data.screenshots.forEach((screenshot, index) => {
41+
let mismatch = screenshot.mismatchPercentage;
4142
table.push([
43+
chalk.default.yellow(index + 1),
4244
chalk.default.yellow(screenshot.storyName),
4345
mismatch > 0 ? chalk.default.red(mismatch) : chalk.default.green(mismatch)
44-
])
46+
]);
4547
});
4648
console.log(table.toString());
4749

0 commit comments

Comments
 (0)