|
|
@ -9,6 +9,8 @@
|
|
|
|
# exit when any command fails
|
|
|
|
# exit when any command fails
|
|
|
|
set -e
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
|
|
|
|
|
|
|
|
find tests/test_*py -type f|while read test_name
|
|
|
|
find tests/test_*py -type f|while read test_name
|
|
|
|
do
|
|
|
|
do
|
|
|
|
echo "TEST RUNNING $test_name"
|
|
|
|
echo "TEST RUNNING $test_name"
|
|
|
@ -45,7 +47,9 @@ docker kill $$-test_selenium
|
|
|
|
|
|
|
|
|
|
|
|
echo "TESTING WEBDRIVER FETCH > PLAYWRIGHT/BROWSERLESS..."
|
|
|
|
echo "TESTING WEBDRIVER FETCH > PLAYWRIGHT/BROWSERLESS..."
|
|
|
|
# Not all platforms support playwright (not ARM/rPI), so it's not packaged in requirements.txt
|
|
|
|
# Not all platforms support playwright (not ARM/rPI), so it's not packaged in requirements.txt
|
|
|
|
pip3 install playwright~=1.24
|
|
|
|
PLAYWRIGHT_VERSION=$(grep -i -E "RUN pip install.+" "$SCRIPT_DIR/../Dockerfile" | grep --only-matching -i -E "playwright[=><~+]+[0-9\.]+")
|
|
|
|
|
|
|
|
echo "using $PLAYWRIGHT_VERSION"
|
|
|
|
|
|
|
|
pip3 install "$PLAYWRIGHT_VERSION"
|
|
|
|
docker run -d --name $$-test_browserless -e "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\"]" --rm -p 3000:3000 --shm-size="2g" browserless/chrome:1.53-chrome-stable
|
|
|
|
docker run -d --name $$-test_browserless -e "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\"]" --rm -p 3000:3000 --shm-size="2g" browserless/chrome:1.53-chrome-stable
|
|
|
|
# takes a while to spin up
|
|
|
|
# takes a while to spin up
|
|
|
|
sleep 5
|
|
|
|
sleep 5
|
|
|
|