Skip to content

Commit

Permalink
fix(tests): Run webdriver:update in DIRECT_CONNECT mode also
Browse files Browse the repository at this point in the history
  • Loading branch information
jarifibrahim committed Mar 13, 2018
1 parent 8218571 commit 9e63e5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/protractor.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let conf: Config = {
defaultTimeoutInterval: 60 * 60 * 1000 // 60 mins for spec to run
},

directConnect: process.env.DIRECT_CONNECTION === "true",
directConnect: process.env.DIRECT_CONNECT === "true",
useAllAngular2AppRoots: true,
getPageTimeout: 3 * 60 * 1000, // must load within 3 min
seleniumAddress: "http://localhost:4444/wd/hub",
Expand Down
7 changes: 3 additions & 4 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ start_webdriver() {
# Start selenium server just for this test run
log.info "Starting Webdriver and Selenium..."
log.info "Webdriver will log to:$GREEN $log_file"
npm run webdriver:update
npm run webdriver:start >> "$log_file" 2>&1 &
webdriver_pid=$!
}
Expand Down Expand Up @@ -89,7 +88,6 @@ main() {
local specs_pattern=${SPECS_PATTERN:-"${temp_dir}/**/*.spec.js"}
local test_source_path=${TEST_SOURCE_PATH:-"../src/tests"}
local access_token=${ACCESS_TOKEN:-"{\"access_token\":\"somerandomtoken\",\"expires_in\":1800,\"refresh_expires_in\":1800,\"refresh_token\":\"somerandomtoken\",\"token_type\":\"bearer\"}"}
local protractor="$(npm bin)/protractor"
local typescript="$(npm bin)/tsc"
local suite=${1:-""}

Expand Down Expand Up @@ -125,13 +123,14 @@ main() {
echo "DIRECT_CONNECT is set; using direct connection (faster)"
echo
fi
# Update webdriver binary
npm run webdriver:update

if [[ ${HEADLES_MODE:-false} == true ]]; then
echo "HEADLESS_MODE is set. Chrome will run in headless mode"
echo
fi

$protractor --baseUrl "${base_url}" --specs "${specs_pattern}" --exclude "node_modules/**/*.spec.js" --params.accessToken "${access_token}" --suite "${suite}" "${temp_dir}/protractor.conf.js"
$(npm bin)/protractor --baseUrl "${base_url}" --specs "${specs_pattern}" --exclude "node_modules/**/*.spec.js" --params.accessToken "${access_token}" --suite "${suite}" "${temp_dir}/protractor.conf.js"

TEST_RESULT=$?

Expand Down

0 comments on commit 9e63e5c

Please sign in to comment.