mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4957] Use Replace JS instead of sed to run e2e (#5160)
* use replace js * Update app-config-replace.js * update replace * update replace * fix folder
This commit is contained in:
committed by
Denys Vuika
parent
450b20eca4
commit
27fa7a4725
@@ -9,11 +9,6 @@ LITESERVER=false
|
||||
EXEC_VERSION_JSAPI=false
|
||||
TIMEOUT=120000
|
||||
DEBUG=false
|
||||
eval GNU=false
|
||||
|
||||
gnu_mode() {
|
||||
GNU=true
|
||||
}
|
||||
|
||||
show_help() {
|
||||
echo "Usage: ./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin"
|
||||
@@ -41,7 +36,6 @@ show_help() {
|
||||
echo "-log or --log print all the browser log"
|
||||
echo "-db or --debug run the debugger"
|
||||
echo "-vjsapi install different version from npm of JS-API defined in the package.json"
|
||||
echo "-gnu for gnu"
|
||||
echo "-h or --help"
|
||||
}
|
||||
|
||||
@@ -193,17 +187,10 @@ while [[ $1 == -* ]]; do
|
||||
-l|--lint) lint; shift;;
|
||||
-m|--maxInstances) max_instances $2; shift 2;;
|
||||
-vjsapi) version_js_api $2; shift 2;;
|
||||
-gnu) gnu_mode; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if $GNU; then
|
||||
sedi='-i'
|
||||
else
|
||||
sedi=('-i' '')
|
||||
fi
|
||||
|
||||
rm -rf ./e2e/downloads/
|
||||
rm -rf ./e2e-output/screenshots/
|
||||
|
||||
@@ -232,21 +219,10 @@ if [[ $DEVELOPMENT == "true" ]]; then
|
||||
else
|
||||
if [[ $LITESERVER == "true" ]]; then
|
||||
echo "====== Run dist in lite-server ====="
|
||||
ls demo-shell/dist
|
||||
|
||||
if [[ -n "${PROXY_HOST_ADF}" ]]
|
||||
then
|
||||
replace="\/"
|
||||
encoded=${PROXY_HOST_ADF//\//$replace}
|
||||
sed -e "s/\"bpmHost\": \".*\"/\"bpmHost\": \"${encoded}\"/g" "${sedi[@]}" demo-shell/dist/app.config.json
|
||||
fi
|
||||
ls demo-shell/dist/ || exit 1
|
||||
|
||||
if [[ -n "${PROXY_HOST_ADF}" ]]
|
||||
then
|
||||
replace="\/"
|
||||
encoded=${PROXY_HOST_ADF//\//$replace}
|
||||
sed -e "s/\"ecmHost\": \".*\"/\"ecmHost\": \"${encoded}\"/g" "${sedi[@]}" demo-shell/dist/app.config.json
|
||||
fi
|
||||
npm run postbuild:ci
|
||||
|
||||
npm run lite-server-e2e>/dev/null & $DEBUG_OPTION ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
||||
else
|
||||
|
Reference in New Issue
Block a user