browserstack-cypress-cli 1.32.2 → 1.32.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -333,6 +333,8 @@ afterEach(() => {
333
333
  let filePath = '';
334
334
  if (attributes.invocationDetails !== undefined && attributes.invocationDetails.relativeFile !== undefined) {
335
335
  filePath = attributes.invocationDetails.relativeFile;
336
+ } else if (attributes.prevAttempts && attributes.prevAttempts.length > 0) {
337
+ filePath = (attributes.prevAttempts[0].invocationDetails && attributes.prevAttempts[0].invocationDetails.relativeFile) || '';
336
338
  }
337
339
  const payloadToSend = {
338
340
  "saveResults": shouldScanTestForAccessibility,
@@ -365,10 +365,10 @@ module.exports = function run(args, rawArgs) {
365
365
  }
366
366
 
367
367
  // Generate custom report!
368
- reportGenerator(bsConfig, data.build_id, args, rawArgs, buildReportData, function(){
368
+ reportGenerator(bsConfig, data.build_id, args, rawArgs, buildReportData, function(modifiedExitCode=exitCode){
369
369
  utils.sendUsageReport(bsConfig, args, `${message}\n${dashboardLink}`, Constants.messageTypes.SUCCESS, null, buildReportData, rawArgs);
370
370
  markBlockEnd('postBuild');
371
- utils.handleSyncExit(exitCode, data.dashboard_url);
371
+ utils.handleSyncExit(modifiedExitCode, data.dashboard_url);
372
372
  });
373
373
  } else if(!turboScaleSession){
374
374
  let stacktraceUrl = getStackTraceUrl();
@@ -105,6 +105,9 @@ let reportGenerator = async (bsConfig, buildId, args, rawArgs, buildReportData,
105
105
  logger.error('Generating the build report failed.');
106
106
  logger.error(utils.formatRequest(error.response.statusText, error.response, error.response.data));
107
107
  utils.sendUsageReport(bsConfig, args, message, messageType, errorCode, buildReportData, rawArgs);
108
+ if (cb){
109
+ cb(Constants.ERROR_EXIT_CODE);
110
+ }
108
111
  return;
109
112
  }
110
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserstack-cypress-cli",
3
- "version": "1.32.2",
3
+ "version": "1.32.3",
4
4
  "description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {