diff --git a/tests/protractor.conf.ts b/tests/protractor.conf.ts index d59668d71..9cd3957a5 100644 --- a/tests/protractor.conf.ts +++ b/tests/protractor.conf.ts @@ -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", diff --git a/tests/run.sh b/tests/run.sh index d38932917..234093f2c 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -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=$! } @@ -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:-""} @@ -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=$?