Skip to content

Commit

Permalink
test report formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjennings committed Jun 24, 2024
1 parent c39007c commit aa5b0ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40111,6 +40111,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));

console.log(chalk.green("TestDriver:"), "Interpreting results...");

console.log('')
console.log('Test Report:')
if (conc === "failure") {
console.log(
chalk.yellow("Workflow:"),
Expand All @@ -40123,29 +40125,31 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
);
}


const isPassed = parseInt(exitcode) === 0;

if (!isPassed) {
core.setFailed(oiResult);
}

if (isPassed) {
console.log("Test:", chalk.green('Pass'));
console.log(chalk.yellow("Test:"), chalk.green('Pass'));
} else {
console.log("Test:", chalk.red('Fail'));
console.log(chalk.yellow("Test:"), chalk.red('Fail'));
}

let extractedFromMarkdown = extractLink(shareLink);

console.log('')
console.log(chalk.yellow("View Test Result on Dashcam.io:"));

if (extractedFromMarkdown) {
console.log(chalk.yellow("View Test Results on Dashcam.io"));
console.log(extractedFromMarkdown);
} else {
console.log(chalk.red("Something went wrong with Dashcam"));
console.log(shareLink);
}

console.log('')
console.log(chalk.yellow("TestDriver.ai Summary"));
console.log(oiResult);

Expand Down
12 changes: 8 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));

console.log(chalk.green("TestDriver:"), "Interpreting results...");

console.log('')
console.log('Test Report:')
if (conc === "failure") {
console.log(
chalk.yellow("Workflow:"),
Expand All @@ -166,29 +168,31 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
);
}


const isPassed = parseInt(exitcode) === 0;

if (!isPassed) {
core.setFailed(oiResult);
}

if (isPassed) {
console.log("Test:", chalk.green('Pass'));
console.log(chalk.yellow("Test:"), chalk.green('Pass'));
} else {
console.log("Test:", chalk.red('Fail'));
console.log(chalk.yellow("Test:"), chalk.red('Fail'));
}

let extractedFromMarkdown = extractLink(shareLink);

console.log('')
console.log(chalk.yellow("View Test Result on Dashcam.io:"));

if (extractedFromMarkdown) {
console.log(chalk.yellow("View Test Results on Dashcam.io"));
console.log(extractedFromMarkdown);
} else {
console.log(chalk.red("Something went wrong with Dashcam"));
console.log(shareLink);
}

console.log('')
console.log(chalk.yellow("TestDriver.ai Summary"));
console.log(oiResult);

Expand Down

0 comments on commit aa5b0ec

Please sign in to comment.