browserstack-cypress-cli 1.24.2 → 1.24.4

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.
@@ -183,7 +183,7 @@ const validate = (bsConfig, args) => {
183
183
 
184
184
  if( Utils.searchForOption('--async') && ( !Utils.isUndefined(args.async) && bsConfig["connection_settings"]["local"])) reject(Constants.validationMessages.INVALID_LOCAL_ASYNC_ARGS);
185
185
 
186
- if (bsConfig.run_settings.userProvidedGeolocation && !bsConfig.run_settings.geolocation.match(/^[A-Z]{2}$/g)) reject(Constants.validationMessages.INVALID_GEO_LOCATION);
186
+ if (bsConfig.run_settings.userProvidedGeolocation && !bsConfig.run_settings.geolocation.match(/^[A-Z]{2}(-[A-Z0-9]{2,3})?$/g)) reject(Constants.validationMessages.INVALID_GEO_LOCATION);
187
187
 
188
188
  if (bsConfig["connection_settings"]["local"] && bsConfig.run_settings.userProvidedGeolocation) reject(Constants.validationMessages.NOT_ALLOWED_GEO_LOCATION_AND_LOCAL_MODE);
189
189
 
@@ -741,6 +741,9 @@ exports.setTestObservabilityFlags = (bsConfig) => {
741
741
  /* testObservability */
742
742
  let isTestObservabilitySession = false;
743
743
  try {
744
+ /* set default again but under try catch in case of wrong config */
745
+ isTestObservabilitySession = utils.nonEmptyArray(bsConfig.run_settings.downloads) ? false : true;
746
+
744
747
  if(!utils.isUndefined(bsConfig["testObservability"])) isTestObservabilitySession = ( bsConfig["testObservability"] == true || bsConfig["testObservability"] == 1 );
745
748
  if(!utils.isUndefined(process.env.BROWSERSTACK_TEST_OBSERVABILITY)) isTestObservabilitySession = ( process.env.BROWSERSTACK_TEST_OBSERVABILITY == "true" || process.env.BROWSERSTACK_TEST_OBSERVABILITY == "1" );
746
749
  if(process.argv.includes('--disable-test-observability')) isTestObservabilitySession = false;
@@ -750,7 +753,6 @@ exports.setTestObservabilityFlags = (bsConfig) => {
750
753
  exports.debug(`EXCEPTION while parsing testObservability capability with error ${e}`, true, e);
751
754
  }
752
755
 
753
-
754
756
  /* browserstackAutomation */
755
757
  let isBrowserstackInfra = true;
756
758
  try {
@@ -762,6 +764,7 @@ exports.setTestObservabilityFlags = (bsConfig) => {
762
764
  exports.debug(`EXCEPTION while parsing browserstackAutomation capability with error ${e}`, true, e);
763
765
  }
764
766
 
767
+ if(isTestObservabilitySession) logger.warn("testObservability is set to true. Other test reporters you are using will be automatically disabled. Learn more at browserstack.com/docs/test-observability/overview/what-is-test-observability");
765
768
 
766
769
  process.env.BROWSERSTACK_TEST_OBSERVABILITY = isTestObservabilitySession;
767
770
  process.env.BROWSERSTACK_AUTOMATION = isBrowserstackInfra;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserstack-cypress-cli",
3
- "version": "1.24.2",
3
+ "version": "1.24.4",
4
4
  "description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {