Fix e2e test (#4981)

* fix core viewer

* increase rendition retry

* sso refresh before test

* general fix test

* try use last proxy

* avoid use proxy

* remove proxy

* fix setting tests

* fix share and sso test

* fix lint exclude

* fix sso

* fix some process services cloud e2e

* fix sso download

* exclude sso test

* fix cloud

* add logout content service test

* add logout core

* add logout search

* redefine global before all

* separate protracotr method

* try

* try multiple attempt before all

* add prefix group and users

* add prefix group and users

* add prefix group and users

* rexecute sso test

* fix process service visibility e2e

* split SSO login test

* fix SSO download

* fix SSO download

* fix some cloud issues

* fix some cloud issues

* fix some cloud issues

* share file fix cs

* fix cloud test
This commit is contained in:
Eugenio Romano
2019-08-08 17:52:45 +02:00
committed by GitHub
parent b7b251fe72
commit f04c135377
181 changed files with 1136 additions and 668 deletions

View File

@@ -10,6 +10,11 @@ EXEC_VERSION_JSAPI=false
TIMEOUT=15000
SELENIUM_PROMISE_MANAGER=1
DEBUG=false
eval GNU=false
gnu_mode() {
GNU=true
}
show_help() {
echo "Usage: ./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin"
@@ -38,6 +43,7 @@ show_help() {
echo "-disable-control-flow disable control flow"
echo "-db or --debug run the debugger"
echo "-vjsapi install different version from npm of JS-API defined in the package.json"
echo "-gnu for gnu"
echo "-h or --help"
}
@@ -121,6 +127,7 @@ set_test_folder(){
set_selenium(){
SELENIUM_SERVER=$1
export SELENIUM_SERVER=$SELENIUM_SERVER
}
set_env(){
@@ -188,17 +195,22 @@ while [[ $1 == -* ]]; do
-m|--maxInstances) max_instances $2; shift 2;;
-vjsapi) version_js_api $2; shift 2;;
-disable-control-flow|--disable-control-flow) disable_control_flow; shift;;
-gnu) gnu_mode; shift;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac
done
if $GNU; then
sedi='-i'
else
sedi=('-i' '')
fi
rm -rf ./e2e/downloads/
rm -rf ./e2e-output/screenshots/
export TIMEOUT=$TIMEOUT
export SELENIUM_SERVER=$SELENIUM_SERVER
export SELENIUM_PROMISE_MANAGER=$SELENIUM_PROMISE_MANAGER
if $EXEC_VERSION_JSAPI == true; then
@@ -220,10 +232,26 @@ else
if [[ $LITESERVER == "true" ]]; then
echo "====== Run dist in lite-server ====="
ls demo-shell/dist
if [[ -n "${PROXY_HOST_ADF}" ]]
then
replace="\/"
encoded=${PROXY_HOST_ADF//\//$replace}
sed -e "s/\"bpmHost\": \".*\"/\"bpmHost\": \"${encoded}\"/g" "${sedi[@]}" demo-shell/dist/app.config.json
fi
if [[ -n "${PROXY_HOST_ADF}" ]]
then
replace="\/"
encoded=${PROXY_HOST_ADF//\//$replace}
sed -e "s/\"ecmHost\": \".*\"/\"ecmHost\": \"${encoded}\"/g" "${sedi[@]}" demo-shell/dist/app.config.json
fi
npm run lite-server-e2e>/dev/null & ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
else
if [[ $DEBUG == "true" ]]; then
echo "====== DEBUG ====="
echo "====== DEBUG npm run lite-server-e2e>/dev/null & ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
else====="
node --inspect-brk ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
else
./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1