mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* library dialog * integrate with demo shell * update resources * fix license * auto focus for the first input * update e2e tests * try close the dialog between tests * fix afterEach * Revert "try close the dialog between tests" This reverts commit 63464f2b03c226c606d09b18c7d2782e3bb52c0a. * update code due to css lint issues * csslint settings for vs code * missing import lint fix remove not used import convert errorPage js to ts convert tasklistpage js to ts fix redirection creation folder in root fix lint issue fix e2e * e2e fix * fix PS tests * navigation import * fix tests tooltip convert paginapage to ts * fix lint * fix lock files e2e filterspage to ts * fix lint * fix cs cre git dept 3 and not 50 as default in travis * quiet log git download * add some delay and change the delete lock * fix node entry * convert searchDialog to typescript parallel protractor * disable browser execute * restote test * change search tests * move search in a separate e2e folder * experiment fix e2e * change util presence change protractor conf * fix unshare test * improve query viewerPage using css over xpath * waitForAngularEnabled before browser redirect * convert util to ts and more * convert other files to ts * convert to ts other files * trigger build * function fixes use arrow function * process service fixes * lint fix review timeout default * fix failing tests * restore timeout * share dialog fix * remove * use configuration admin * fix APS 2 login sso
178 lines
4.2 KiB
Bash
Executable File
178 lines
4.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
cd "$DIR/../"
|
|
BROWSER_RUN=false
|
|
DEVELOPMENT=false
|
|
EXECLINT=true
|
|
LITESERVER=false
|
|
EXEC_VERSION_JSAPI=false
|
|
TIMEOUT=7000
|
|
|
|
show_help() {
|
|
echo "Usage: ./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin"
|
|
echo ""
|
|
echo "-u or --username"
|
|
echo "-p or --password"
|
|
echo "-e or --email"
|
|
echo "-b or --browser run the test in the browsrwer (No headless mode)"
|
|
echo "-s or --spec run a single test file"
|
|
echo "-f or --folder run a single folder test"
|
|
echo "--seleniumServer configure a selenium server to use to run the e2e test"
|
|
echo "-proxy or --proxy proxy Back end URL to use only possibel to use with -dev option"
|
|
echo "-dev or --dev run it against local development environment it will deploy on localhost:4200 the current version of your branch"
|
|
echo "-host or --host URL of the Front end to test"
|
|
echo "-host_sso or --host URL of the Back end to test"
|
|
echo "-save save the error screenshot in the remote env"
|
|
echo "-timeout or --timeout override the timeout foe the wait utils"
|
|
echo "-sl --skip-lint skip lint"
|
|
echo "-m --maxInstances max instances parallel for tests"
|
|
echo "-vjsapi install different version from npm of JS-API defined in the package.json"
|
|
echo "-h or --help"
|
|
}
|
|
|
|
set_username(){
|
|
USERNAME=$1
|
|
}
|
|
set_password(){
|
|
PASSWORD=$1
|
|
}
|
|
set_email(){
|
|
EMAIL=$1
|
|
}
|
|
set_host(){
|
|
HOST=$1
|
|
}
|
|
|
|
set_host_sso(){
|
|
HOST_SSO=$1
|
|
}
|
|
|
|
set_test(){
|
|
SINGLE_TEST=true
|
|
NAME_TEST=$1
|
|
}
|
|
|
|
set_browser(){
|
|
echo "====== BROWSER RUN ====="
|
|
BROWSER_RUN=true
|
|
}
|
|
|
|
set_proxy(){
|
|
PROXY=$1
|
|
}
|
|
|
|
set_timeout(){
|
|
TIMEOUT=$1
|
|
}
|
|
|
|
set_save_screenshot(){
|
|
SAVE_SCREENSHOT=true
|
|
}
|
|
|
|
set_development(){
|
|
DEVELOPMENT=true
|
|
}
|
|
|
|
set_test_folder(){
|
|
FOLDER=$1
|
|
}
|
|
|
|
set_selenium(){
|
|
SELENIUM_SERVER=$1
|
|
}
|
|
|
|
skip_lint(){
|
|
EXECLINT=false
|
|
}
|
|
|
|
lite_server(){
|
|
LITESERVER=true
|
|
}
|
|
|
|
max_instances(){
|
|
MAXINSTANCES=$1
|
|
}
|
|
|
|
version_js_api() {
|
|
JSAPI_VERSION=$1
|
|
|
|
if [[ "${JSAPI_VERSION}" == "" ]]
|
|
then
|
|
echo "JSAPI version required with -vJSApi"
|
|
exit 0
|
|
fi
|
|
|
|
EXEC_VERSION_JSAPI=true
|
|
}
|
|
|
|
while [[ $1 == -* ]]; do
|
|
case "$1" in
|
|
-h|--help|-\?) show_help; exit 0;;
|
|
-u|--username) set_username $2; shift 2;;
|
|
-p|--password) set_password $2; shift 2;;
|
|
-e|--email) set_email $2; shift 2;;
|
|
-f|--folder) set_test_folder $2; shift 2;;
|
|
-timeout|--timeout) set_timeout $2; shift 2;;
|
|
-b|--browser) set_browser; shift;;
|
|
-dev|--dev) set_development; shift;;
|
|
-s|--spec) set_test $2; shift 2;;
|
|
-ud|--use-dist) lite_server; shift;;
|
|
-save) set_save_screenshot; shift;;
|
|
-proxy|--proxy) set_proxy $2; shift 2;;
|
|
-s|--seleniumServer) set_selenium $2; shift 2;;
|
|
-host|--host) set_host $2; shift 2;;
|
|
-host_sso|--host_sso) set_host_sso $2; shift 2;;
|
|
-sl|--skip-lint) skip_lint; shift;;
|
|
-m|--maxInstances) max_instances $2; shift 2;;
|
|
-vjsapi) version_js_api $2; shift 2;;
|
|
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
|
esac
|
|
done
|
|
|
|
rm -rf ./e2e/downloads/
|
|
rm -rf ./e2e-output/screenshots/
|
|
|
|
export URL_HOST_SSO_ADF=$HOST_SSO
|
|
export URL_HOST_ADF=$HOST
|
|
export USERNAME_ADF=$USERNAME
|
|
export PASSWORD_ADF=$PASSWORD
|
|
export EMAIL_ADF=$EMAIL
|
|
export BROWSER_RUN=$BROWSER_RUN
|
|
export PROXY_HOST_ADF=$PROXY
|
|
export SAVE_SCREENSHOT=$SAVE_SCREENSHOT
|
|
export TIMEOUT=$TIMEOUT
|
|
export FOLDER=$FOLDER'/'
|
|
export SELENIUM_SERVER=$SELENIUM_SERVER
|
|
export NAME_TEST=$NAME_TEST
|
|
export MAXINSTANCES=$MAXINSTANCES
|
|
|
|
|
|
if $EXEC_VERSION_JSAPI == true; then
|
|
echo "====== Use the alfresco JS-API '$JSAPI_VERSION'====="
|
|
npm install alfresco-js-api@${JSAPI_VERSION}
|
|
fi
|
|
|
|
if [[ EXECLINT == "true" ]]; then
|
|
npm run lint-e2e || exit 1
|
|
fi
|
|
|
|
if [[ $DEVELOPMENT == "true" ]]; then
|
|
echo "====== Run against local development ====="
|
|
npm run e2e-lib || exit 1
|
|
else
|
|
webdriver-manager update --gecko=false --versions.chrome=2.38
|
|
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
|
|
./node_modules/protractor/bin/protractor protractor.conf.js || exit 1
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
|