test CI e2e browser run [ci:force] (#7864)

* test CI e2e browser run [ci:force]

* hardcoded browser run test [ci:force]

* run only 1 job in browser mode [ci:force]

* reset browser run global

* trigger travis [ci:force]

* restore false/true assign [ci:force]
This commit is contained in:
Rafal Szmit
2022-09-30 17:35:32 +02:00
committed by GitHub
parent 46da01fe18
commit 287299bf8e
5 changed files with 15 additions and 11 deletions

View File

@@ -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)

View File

@@ -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;