browserstack-cypress-cli 1.36.16 → 1.36.17

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.
@@ -495,7 +495,10 @@ exports.setNodeVersion = (bsConfig, args) => {
495
495
  // command line args takes precedence over config
496
496
  exports.setUserSpecs = (bsConfig, args) => {
497
497
  if(o11yHelpers.isBrowserstackInfra() && o11yHelpers.isTestObservabilitySession() && o11yHelpers.shouldReRunObservabilityTests()) {
498
- bsConfig.run_settings.specs = process.env.BROWSERSTACK_RERUN_TESTS;
498
+ // BROWSERSTACK_RERUN_TESTS arrives comma+space separated (e.g. "a.ts, b.ts"); normalise
499
+ // like the other spec sources below, else sanitizeSpecsPattern builds "{a.ts, b.ts}" whose
500
+ // space-prefixed brace alternatives never match and the failed-spec filter collapses.
501
+ bsConfig.run_settings.specs = this.fixCommaSeparatedString(process.env.BROWSERSTACK_RERUN_TESTS);
499
502
  return;
500
503
  }
501
504
 
@@ -881,7 +881,10 @@ const getReRunSpecs = (rawArgs) => {
881
881
  }
882
882
  }
883
883
  if(startIdx != -1) rawArgs.splice(startIdx, numEle + 1);
884
- finalArgs = [...rawArgs, '--spec', process.env.BROWSERSTACK_RERUN_TESTS];
884
+ // Normalise the comma+space separated rerun list ("a.ts, b.ts") to comma-only before
885
+ // handing it to cypress --spec; a leading space makes cypress miss every spec but the first.
886
+ const reRunSpecs = process.env.BROWSERSTACK_RERUN_TESTS.split(",").map(spec => spec.trim()).filter(Boolean).join(",");
887
+ finalArgs = [...rawArgs, '--spec', reRunSpecs];
885
888
  }
886
889
  return finalArgs.filter(item => item !== '--disable-test-observability' && item !== '--disable-browserstack-automation');
887
890
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserstack-cypress-cli",
3
- "version": "1.36.16",
3
+ "version": "1.36.17",
4
4
  "description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {