alfresco-ng2-components/scripts/travis/e2e/process-services-e2e.sh
Eugenio Romano a630cfb390
Fix e2e (#6087)
* fix protractor conf

* remove update env

* fix cli error script cs

* change screenshot plugin

* remove unused param

* fix

* fix

* fix

* moment comment nvm

* fix

* fix

* fix

* fix

* remove adf redirect

* fix

* fix

* save remote report

* report fix

* improve save result

* fix folder save

* fix folder save

* fix placeholder pointer , they needs refactor later

* fix

* fix lint

* fix

* remove test already covered by unit
fix the test in core needed
exclude the one impossible to make it works without APS basic support

* lint

* fix some logout missing

* fix

* Fix the custom-tasks-filters.e2e

* fix lint

* fix

* fix

* fix

* Fix wait on start process  and on process definition options

* Fix logout before login again

* fix uplaod test

* fix

* Fix infodrawer with check detail and sleep

* lint

* increase list of excluded test

* fix

* fix lint

* change wait method datatable

* fix

* fix

* revert check value

* fix

* fix

* change tag test

Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
2020-09-04 13:27:55 +01:00

43 lines
1.7 KiB
Bash
Executable File

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
export CONTEXT_ENV="process-services"
export PROVIDER='BPM'
export AUTH_TYPE="OAUTH"
echo "Start process services e2e"
if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
echo "Calculate affected e2e $BASE_HASH $HEAD_HASH"
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
echo "Affected libs ${AFFECTED_LIBS}"
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
echo "Affected e2e ${AFFECTED_E2E}"
fi;
#./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1 TODO chanvge login check SSO
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -host_sso "$HOST_SSO" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist -m 2 -b || exit 1)
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
echo "Run all e2e $CONTEXT_ENV"
$RUN_E2E --folder $CONTEXT_ENV
else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then
echo "Run affected e2e"
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)"
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
if [[ $LIST_SPECS != "" ]];
then
$RUN_E2E --specs "$LIST_SPECS"
fi
fi
fi;