Skip to content

Commit 6f5c86c

Browse files
committed
Merge branch 'master' of ssh://github.com/browserstack/browserstack-cypress-cli into modify_cypress_geolocation_regex
2 parents 4fa3884 + da4a96e commit 6f5c86c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bin/testObservability/helper/helper.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,9 @@ exports.setTestObservabilityFlags = (bsConfig) => {
741741
/* testObservability */
742742
let isTestObservabilitySession = false;
743743
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+
744747
if(!utils.isUndefined(bsConfig["testObservability"])) isTestObservabilitySession = ( bsConfig["testObservability"] == true || bsConfig["testObservability"] == 1 );
745748
if(!utils.isUndefined(process.env.BROWSERSTACK_TEST_OBSERVABILITY)) isTestObservabilitySession = ( process.env.BROWSERSTACK_TEST_OBSERVABILITY == "true" || process.env.BROWSERSTACK_TEST_OBSERVABILITY == "1" );
746749
if(process.argv.includes('--disable-test-observability')) isTestObservabilitySession = false;
@@ -750,7 +753,6 @@ exports.setTestObservabilityFlags = (bsConfig) => {
750753
exports.debug(`EXCEPTION while parsing testObservability capability with error ${e}`, true, e);
751754
}
752755

753-
754756
/* browserstackAutomation */
755757
let isBrowserstackInfra = true;
756758
try {
@@ -762,6 +764,7 @@ exports.setTestObservabilityFlags = (bsConfig) => {
762764
exports.debug(`EXCEPTION while parsing browserstackAutomation capability with error ${e}`, true, e);
763765
}
764766

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");
765768

766769
process.env.BROWSERSTACK_TEST_OBSERVABILITY = isTestObservabilitySession;
767770
process.env.BROWSERSTACK_AUTOMATION = isBrowserstackInfra;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "browserstack-cypress-cli",
3-
"version": "1.24.2",
3+
"version": "1.24.3",
44
"description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)