Skip to content

Commit c92ee5a

Browse files
committed
Fix: ats cypress exit code
1 parent 6b72ae6 commit c92ee5a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

bin/commands/runs.js

+5
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ module.exports = function run(args, rawArgs) {
326326
}
327327
let message = `${data.message}! ${Constants.userMessages.BUILD_CREATED} with build id: ${data.build_id}`;
328328
let dashboardLink = `${Constants.userMessages.VISIT_DASHBOARD} ${data.dashboard_url}`;
329+
if (turboScaleSession) {
330+
dashboardLink = `${Constants.userMessages.VISIT_ATS_DASHBOARD} ${data.dashboard_url}`;
331+
}
329332
buildReportData = { 'build_id': data.build_id, 'parallels': userSpecifiedParallels, ...buildReportData }
330333
utils.exportResults(data.build_id, `${config.dashboardUrl}${data.build_id}`);
331334
if ((utils.isUndefined(bsConfig.run_settings.parallels) && utils.isUndefined(args.parallels)) || (!utils.isUndefined(bsConfig.run_settings.parallels) && bsConfig.run_settings.parallels == Constants.cliMessages.RUN.DEFAULT_PARALLEL_MESSAGE)) {
@@ -388,6 +391,8 @@ module.exports = function run(args, rawArgs) {
388391
logger.info(Constants.userMessages.BUILD_FAILED_ERROR)
389392
process.exitCode = Constants.BUILD_FAILED_EXIT_CODE;
390393
});
394+
} else {
395+
utils.handleSyncExit(exitCode, data.dashboard_url);
391396
}
392397
});
393398
} else if (utils.nonEmptyArray(bsConfig.run_settings.downloads && !turboScaleSession)) {

bin/helpers/constants.js

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const userMessages = {
5757
FAILED_MD5_CHECK:
5858
"Something went wrong - you can retry running browserstack-cypress with ‘--force-upload’ parameter, or contact BrowserStack Support.",
5959
VISIT_DASHBOARD: "Visit the Automate dashboard for real-time test reporting:",
60+
VISIT_ATS_DASHBOARD: "Visit the Automate TurboScale dashboard for real-time test reporting:",
6061
CONFLICTING_INIT_ARGUMENTS:
6162
"Conflicting arguments given. You can use --path only with a file name, and not with a file path.",
6263
NO_PARALLELS:

0 commit comments

Comments
 (0)