File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,14 @@ trap killServer EXIT
71
71
# If --saucelabs option is passed, forward it to the protractor command adding
72
72
# the second argument that is required for local SauceLabs test run.
73
73
if [[ $1 = " --saucelabs" ]]; then
74
- seleniumStarted=false
75
- sleep 2
76
- echo " Using SauceLabs."
77
- # $2 contains the tunnelIdentifier argument if specified, otherwise is empty.
78
- $PROTRACTOR_BIN_PATH /protractor protractor.conf.js --saucelabs $2
74
+ # Enable saucelabs tests only when running locally or when Travis enviroment vars are accessible.
75
+ if [[ ( " $TRAVIS " = true && " $TRAVIS_SECURE_ENV_VARS " = true ) || ( -z " $TRAVIS " ) ]]; then
76
+ seleniumStarted=false
77
+ sleep 2
78
+ echo " Using SauceLabs."
79
+ # $2 contains the tunnelIdentifier argument if specified, otherwise is empty.
80
+ $PROTRACTOR_BIN_PATH /protractor protractor.conf.js --saucelabs $2
81
+ fi
79
82
else
80
83
echo " Using Headless Chrome."
81
84
# Updates Selenium Webdriver.
You can’t perform that action at this time.
0 commit comments