Skip to content
Snippets Groups Projects
Commit cc0b19de authored by David Dorchies's avatar David Dorchies
Browse files

chore: improve run-e2e-tests.sh

- tune curl timeout
- fix stopping server issue

Refs #647
parent e930242e
No related branches found
No related tags found
1 merge request!252release: version 4.18.0
......@@ -11,7 +11,7 @@
"ng": "cd . && \"node_modules/.bin/ng\"",
"postinstall": "./node_modules/.bin/webdriver-manager update --gecko=false --versions.chrome=107.0.5304.110",
"lint": "eslint -c .eslintrc.js --ext .ts src",
"e2e": "bash scripts/run_e2e-tests.sh",
"e2e": "bash scripts/run-e2e-tests.sh",
"e2equick": "./node_modules/.bin/wdio run ./wdio.conf.ts",
"monkeytest": "npm run ng -- e2e --dev-server-target= --suite=monkeyTest --webdriver-update=false",
"mkdocs": "bash scripts/prepare_mkdocs.sh; cd build; python3 -m mkdocs build -f mkdocs-fr.yml && python3 -m mkdocs build -f mkdocs-en.yml && cd .. && node scripts/mkdocs-postprocess.js",
......
......@@ -7,19 +7,19 @@
npm start &
NG_SERVE_PID=$!
echo "**************************************************************************"
echo "Just in case... Use kill -9 -${NG_SERVE_PID} to kill the server if something goes wrong"
echo "**************************************************************************"
# Wait for http response 200 on port 4200
response=0
while [ "$response" != "200" ]; do
response=$(curl --write-out '%{http_code}' --silent --output /dev/null 127.0.0.1:4200 || echo 0)
response=$(curl --connect-timeout 5 --write-out '%{http_code}' --silent --output /dev/null 127.0.0.1:4200 || echo 0)
sleep 5;
done
echo "**************************************************************************"
echo "If something goes wrong, use 'pkill ng', to kill the server"
echo "**************************************************************************"
# Run wdio
npm run e2equick
# Cleanup daemon processes
kill -9 -$NG_SERVE_PID
pkill ng
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment