diff --git a/.travis.yml b/.travis.yml index 04a38c5156..a534c45b3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -300,7 +300,7 @@ jobs: before_script: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/e2e.sh "content-services" + script: ./scripts/travis/e2e/e2e.sh "content-services" "browser" after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: create: diff --git a/e2e/protractor.conf.js b/e2e/protractor.conf.js index a4ae1a9c46..099800939e 100644 --- a/e2e/protractor.conf.js +++ b/e2e/protractor.conf.js @@ -22,7 +22,7 @@ if (ENV_FILE) { } const HOST = process.env.URL_HOST_ADF; -const BROWSER_RUN = ([true, 'true'].includes(process.env.BROWSER_RUN)) +const BROWSER_RUN = [true, 'true'].includes(process.env.BROWSER_RUN); const FOLDER = process.env.FOLDER || ''; const SELENIUM_SERVER = process.env.SELENIUM_SERVER || ''; const MAXINSTANCES = process.env.MAXINSTANCES || 1; diff --git a/e2e/protractor.excludes.json b/e2e/protractor.excludes.json index 52717a9bfb..b4f75476e2 100644 --- a/e2e/protractor.excludes.json +++ b/e2e/protractor.excludes.json @@ -2,7 +2,5 @@ "C269081": "https://alfresco.atlassian.net/browse/ADF-5385", "C272819": "https://alfresco.atlassian.net/browse/ADF-5385", "C362241": "https://alfresco.atlassian.net/browse/ADF-5385", - "C260040": "https://alfresco.atlassian.net/browse/AAE-8041", - "C260125": "https://alfresco.atlassian.net/browse/AAE-10744", - "C274688": "https://alfresco.atlassian.net/browse/AAE-10744" + "C260040": "https://alfresco.atlassian.net/browse/AAE-8041" } diff --git a/scripts/test-e2e-lib.sh b/scripts/test-e2e-lib.sh index 14ce684a3a..53a7b59bc7 100755 --- a/scripts/test-e2e-lib.sh +++ b/scripts/test-e2e-lib.sh @@ -2,7 +2,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$DIR/../" -BROWSER_RUN=false +export BROWSER_RUN=false DEVELOPMENT=false LITESERVER=false EXEC_VERSION_JSAPI=false @@ -69,7 +69,6 @@ set_specs(){ } set_browser(){ - echo "====== BROWSER RUN =====" BROWSER_RUN=true export BROWSER_RUN=$BROWSER_RUN } @@ -141,7 +140,7 @@ done rm -rf ./e2e/downloads/ rm -rf ./e2e-output/ - +echo "====== BROWSER_RUN: $BROWSER_RUN ======" echo "====== Update webdriver-manager =====" if [ "$CI" = "true" ]; then export chrome=$(google-chrome --product-version) diff --git a/scripts/travis/e2e/e2e.sh b/scripts/travis/e2e/e2e.sh index 6646348422..40e7138c61 100755 --- a/scripts/travis/e2e/e2e.sh +++ b/scripts/travis/e2e/e2e.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - echo "Start e2e" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -8,6 +7,14 @@ cd $DIR/../../../ BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1) verifyLib=$1; + +# set test-e2e params +if [ ! -z "$2" ]; then + e2eParams="--$2" +else + e2eParams="" +fi + echo "Step1 - Verify if affected libs contains $verifyLib" AFFECTED_LIB="$(./scripts/travis/affected-contains.sh $verifyLib )"; @@ -29,7 +36,7 @@ if [ ${AFFECTED_LIB} == true ]; then if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$BASE_DIRECTORY" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" || "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then echo "Run all e2e $FOLDER" - ./scripts/test-e2e-lib.sh --use-dist + ./scripts/test-e2e-lib.sh --use-dist $e2eParams else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then echo "Run affected e2e" @@ -39,7 +46,7 @@ if [ ${AFFECTED_LIB} == true ]; then echo "Run $FOLDER e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS if [[ $LIST_SPECS != "" ]]; then - ./scripts/test-e2e-lib.sh --use-dist + ./scripts/test-e2e-lib.sh --use-dist $e2eParams fi fi fi;