angular-cn/scripts/ci/test_e2e_js.sh

31 lines
673 B
Bash
Raw Normal View History

#!/bin/bash
set -e
echo =============================================================================
# go to project dir
SCRIPT_DIR=$(dirname $0)
cd $SCRIPT_DIR/../..
./node_modules/.bin/webdriver-manager update
function killServer () {
kill $serverPid
}
2015-02-13 17:59:29 -05:00
./node_modules/.bin/gulp serve.js.prod&
serverPid=$!
trap killServer EXIT
# wait for server to come up!
sleep 10
# Let protractor use default browser unless one is specified.
OPTIONS="";
if [[ -n "$E2E_BROWSERS" ]]; then
OPTIONS="--browsers=$E2E_BROWSERS";
fi
./node_modules/.bin/protractor protractor-js.conf.js $OPTIONS
./node_modules/.bin/protractor protractor-js.conf.js $OPTIONS --benchmark --dryrun