Skip to content

Commit

Permalink
Fix: ats cypress exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
nagpalkaran95 committed Sep 18, 2024
1 parent 6b72ae6 commit c92ee5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/commands/runs.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ module.exports = function run(args, rawArgs) {
}
let message = `${data.message}! ${Constants.userMessages.BUILD_CREATED} with build id: ${data.build_id}`;
let dashboardLink = `${Constants.userMessages.VISIT_DASHBOARD} ${data.dashboard_url}`;
if (turboScaleSession) {
dashboardLink = `${Constants.userMessages.VISIT_ATS_DASHBOARD} ${data.dashboard_url}`;
}
buildReportData = { 'build_id': data.build_id, 'parallels': userSpecifiedParallels, ...buildReportData }
utils.exportResults(data.build_id, `${config.dashboardUrl}${data.build_id}`);
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)) {
Expand Down Expand Up @@ -388,6 +391,8 @@ module.exports = function run(args, rawArgs) {
logger.info(Constants.userMessages.BUILD_FAILED_ERROR)
process.exitCode = Constants.BUILD_FAILED_EXIT_CODE;
});
} else {
utils.handleSyncExit(exitCode, data.dashboard_url);
}
});
} else if (utils.nonEmptyArray(bsConfig.run_settings.downloads && !turboScaleSession)) {
Expand Down
1 change: 1 addition & 0 deletions bin/helpers/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const userMessages = {
FAILED_MD5_CHECK:
"Something went wrong - you can retry running browserstack-cypress with ‘--force-upload’ parameter, or contact BrowserStack Support.",
VISIT_DASHBOARD: "Visit the Automate dashboard for real-time test reporting:",
VISIT_ATS_DASHBOARD: "Visit the Automate TurboScale dashboard for real-time test reporting:",
CONFLICTING_INIT_ARGUMENTS:
"Conflicting arguments given. You can use --path only with a file name, and not with a file path.",
NO_PARALLELS:
Expand Down

0 comments on commit c92ee5a

Please sign in to comment.