Merge pull request #22 from sakalaca/enable_ci_job_url_as_description

Adding an option to store CI job url as description of test run for easier debugging or artifacts finding
This commit is contained in:
Milutin Savovic
2021-07-19 12:05:19 +02:00
committed by GitHub
3 changed files with 12 additions and 3 deletions

View File

@@ -91,7 +91,12 @@ var CypressTestRailReporter = /** @class */ (function (_super) {
var description = '';
}
else {
var description = 'For the Cypress run visit https://dashboard.cypress.io/#/projects/runs';
if (process.env.CYPRESS_CI_JOB_URL) {
var description = process.env.CYPRESS_CI_JOB_URL;
}
else {
var description = 'For the Cypress run visit https://dashboard.cypress.io/#/projects/runs';
}
}
TestRailLogger.log("Creating TestRail Run with name: " + name_1);
_this.testRailApi.createRun(name_1, description, _this.suiteId);

File diff suppressed because one or more lines are too long

View File

@@ -85,7 +85,11 @@ export class CypressTestRailReporter extends reporters.Spec {
if (this.reporterOptions.disableDescription) {
var description = '';
} else {
var description = 'For the Cypress run visit https://dashboard.cypress.io/#/projects/runs';
if (process.env.CYPRESS_CI_JOB_URL) {
var description = process.env.CYPRESS_CI_JOB_URL;
} else {
var description = 'For the Cypress run visit https://dashboard.cypress.io/#/projects/runs';
}
}
TestRailLogger.log(`Creating TestRail Run with name: ${name}`);
this.testRailApi.createRun(name, description, this.suiteId);