Multiple option env file (#4788)

* multi configuration file enabling

* improve ignore

* update i18n tool dep

* update webbpack bundle analyzer version

* fix ps cloud test wait setting

* fix script content

* remove use of testconfig for browser options

* convert protractor to ts

* download browser util fix
This commit is contained in:
Eugenio Romano
2019-05-30 11:15:15 +01:00
committed by GitHub
parent 9aafb80483
commit b91a942aa1
156 changed files with 1227 additions and 715 deletions

View File

@@ -405,7 +405,7 @@ Run a single test
if the test in a subfolder in e2e you need to add the subfolder in the path:
```shnpm in
```sh
./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin --spec ./core/filenam.e2e.ts
```

View File

@@ -14,6 +14,7 @@ DEBUG=false
show_help() {
echo "Usage: ./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin"
echo ""
echo "--env"
echo "-u or --username"
echo "-p or --password"
echo "-e or --email"
@@ -106,12 +107,16 @@ set_selenium(){
SELENIUM_SERVER=$1
}
set_env(){
export ENV_FILE=$1
}
lint(){
EXECLINT=true
}
debug(){
DEBUG=true
export DEBUG=true;
}
lite_server(){
@@ -148,6 +153,7 @@ while [[ $1 == -* ]]; do
-f|--folder) set_test_folder $2; shift 2;;
-timeout|--timeout) set_timeout $2; shift 2;;
-b|--browser) set_browser; shift;;
-env|--env) set_env $2; shift 2;;
-dev|--dev) set_development; shift;;
-s|--specs) set_specs $2; shift 2;;
-db|--debug) debug; shift;;
@@ -197,13 +203,13 @@ else
if [[ $LITESERVER == "true" ]]; then
echo "====== Run dist in lite-server ====="
ls demo-shell/dist
npm run lite-server-e2e>/dev/null & ./node_modules/protractor/bin/protractor protractor.conf.js || exit 1
else
if [[ $DEBUG == "true" ]]; then
npm run lite-server-e2e>/dev/null & ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
else
if [[ $DEBUG == "true" ]]; then
echo "====== DEBUG ====="
node --inspect-brk ./node_modules/protractor/bin/protractor protractor.conf.js || exit 1
node --inspect-brk ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
else
./node_modules/protractor/bin/protractor protractor.conf.js || exit 1
./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
fi
fi
fi

View File

@@ -5,9 +5,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
CONTEXT_ENV="content-services"
./scripts/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
RUN_CHECK=$(echo node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1)
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -b || exit 1)

View File

@@ -5,9 +5,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
CONTEXT_ENV="core"
./scripts/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
RUN_CHECK_PS=$(echo node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1 )
RUN_CHECK_CS=$(echo node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1 )
@@ -26,7 +28,8 @@ else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
if [[ $LIST_SPECS != "" ]];
then
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
$RUN_CHECK
$RUN_CHECK_PS
$RUN_CHECK_CS
$RUN_E2E --specs "$LIST_SPECS"
fi
fi

View File

@@ -4,7 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
./scripts/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $TRAVIS_PULL_REQUEST == "false" ]];
then

View File

@@ -5,9 +5,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
CONTEXT_ENV="process-services-cloud"
./scripts/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
RUN_CHECK=$(echo node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1 )
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" --use-dist )

View File

@@ -5,12 +5,14 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
CONTEXT_ENV="process-services"
./scripts/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV/")";
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV/")";
RUN_CHECK=$(echo node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1 )
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -b )
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -b -m 2 )
if [[ $AFFECTED_LIBS =~ "$CONTEXT_ENV$" || $TRAVIS_PULL_REQUEST == "false" ]];
then

View File

@@ -5,9 +5,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
CONTEXT_ENV="search"
./scripts/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
RUN_CHECK=$(echo node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1 )
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -save -b )