Skip to content

Commit 339936e

Browse files
committed
string to constant
1 parent ea510b2 commit 339936e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

bin/commands/runs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = function run(args) {
4040
// Create build
4141
return build.createBuild(bsConfig, zip).then(function (data) {
4242
let message = `${data.message}! ${Constants.userMessages.BUILD_CREATED} with build id: ${data.build_id}`;
43-
let dashboardLink = `Visit the Automate dashboard for test reporting: ${config.dashboardUrl}${data.build_id}`;
43+
let dashboardLink = `${Constants.userMessages.VISIT_DASHBOARD} ${config.dashboardUrl}${data.build_id}`;
4444
logger.info(message);
4545
logger.info(dashboardLink);
4646
utils.sendUsageReport(bsConfig, args, `${message}\n${dashboardLink}`, Constants.messageTypes.SUCCESS, null);

bin/helpers/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const userMessages = {
1010
ZIP_DELETE_FAILED: "Could not delete local file.",
1111
ZIP_DELETED: "Zip file deleted successfully.",
1212
API_DEPRECATED: "This version of API is deprecated, please use latest version of API.",
13-
FAILED_TO_ZIP: "Failed to zip files."
13+
FAILED_TO_ZIP: "Failed to zip files.",
14+
VISIT_DASHBOARD: "Visit the Automate dashboard for test reporting:"
1415
};
1516

1617
const validationMessages = {

test/unit/bin/commands/runs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ describe("runs", () => {
426426
let messageType = Constants.messageTypes.SUCCESS;
427427
let errorCode = null;
428428
let message = `Success! ${Constants.userMessages.BUILD_CREATED} with build id: random_build_id`;
429-
let dashboardLink = `Visit the Automate dashboard for test reporting: ${dashboardUrl}random_build_id`;
429+
let dashboardLink = `${Constants.userMessages.VISIT_DASHBOARD} ${dashboardUrl}random_build_id`;
430430

431431
const runs = proxyquire("../../../../bin/commands/runs", {
432432
"../helpers/utils": {

0 commit comments

Comments
 (0)