Skip to content

Commit

Permalink
fix(reporter.ts): fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Nov 13, 2019
1 parent adfc543 commit ca8aef0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class CypressTestrailReporter extends reporters.Base {
console.log('\n', chalk.magenta.underline.bold('(TestRail Reporter)'));
console.warn(
'\n',
'No testcases were matched. Ensure that your tests are declared correctly and matches Cxxx',
'No test cases were matched. Ensure that your tests are declared correctly and matches CXXXX',
'\n',
);
return;
}

this.testRail.publish().catch(console.error);
this.testRail.publish();
};

private static validate(options: TestRailOptions) {
Expand Down
22 changes: 13 additions & 9 deletions src/testrail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,19 @@ export class TestRail {
return this.axiosInstance.post(`/add_results_for_cases/${runId}`, { results });
});

await Promise.all(addResultPromises);
console.log('\n', chalk.magenta.underline.bold('(TestRail Reporter)'));
console.log(
'\n',
` - Results are published to ${chalk.magenta(
`https://${this.options.domain}/index.php?/runs/plan/${this.planId}`,
)}`,
'\n',
);
try {
await Promise.all(addResultPromises);
console.log('\n', chalk.magenta.underline.bold('(TestRail Reporter)'));
console.log(
'\n',
` - Results are published to ${chalk.magenta(
`https://${this.options.domain}/index.php?/runs/plan/${this.planId}`,
)}`,
'\n',
);
} catch (e) {
console.error(e);
}
}

private constructTestResult(): ConstructedTestResult {
Expand Down

0 comments on commit ca8aef0

Please sign in to comment.