From 0f0aefefa29ad3b0eaea3c8709ebbc1f96ab719a Mon Sep 17 00:00:00 2001 From: Christian Flach Date: Fri, 8 Jun 2018 11:19:33 +0200 Subject: [PATCH] Improve browser test instructions and execution --- README.md | 1 + scripts/prepare-browser-tests.sh | 4 ++-- tests/Browser/NewAdventureTest.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 93b7eb39..6db5c56e 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ Browser tests require Google Chrome with remote debugging enabled as well as the To do that, execute `bash scripts/prepare-browser-tests.sh` *once* before executing the tests. There is no need to call the script again until you reboot. Then execute the following to run the browser tests: ``` +npm run prod php vendor/symfony/phpunit-bridge/bin/simple-phpunit --testsuite browser ``` diff --git a/scripts/prepare-browser-tests.sh b/scripts/prepare-browser-tests.sh index 097f830c..a5761d55 100644 --- a/scripts/prepare-browser-tests.sh +++ b/scripts/prepare-browser-tests.sh @@ -4,7 +4,7 @@ set -e php bin/console server:start 8003 --env test --pidfile /tmp/adl-test-server.pid # Start in headless mode -google-chrome-stable --no-sandbox --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 http://localhost:8003 & +google-chrome-stable --no-sandbox --headless --disable-infobars --disable-breakpad --no-default-browser-check --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 http://localhost:8003 & # # Alternatively, start Chrome in a virtual display with a VNC server. @@ -14,4 +14,4 @@ google-chrome-stable --no-sandbox --headless --remote-debugging-address=0.0.0.0 # Xvfb :42 -screen 0 1024x768x16 & # x11vnc -display :42 -bg -nopw -listen 0.0.0.0 -xkb # DISPLAY=:42 fluxbox & -# DISPLAY=:42 google-chrome-stable --no-sandbox --start-maximized --no-default-browser-check --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 http://localhost:8003 & +# DISPLAY=:42 google-chrome-stable --no-sandbox --start-maximized --disable-infobars --disable-breakpad --no-default-browser-check --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 http://localhost:8003 & diff --git a/tests/Browser/NewAdventureTest.php b/tests/Browser/NewAdventureTest.php index 0203ac3c..20e96c1d 100644 --- a/tests/Browser/NewAdventureTest.php +++ b/tests/Browser/NewAdventureTest.php @@ -27,7 +27,7 @@ class NewAdventureTest extends BrowserTestCase const FOUND_IN = 'Dugeon Magazine'; const PART_OF = 'Tales from another World'; const LINK = 'http://example.com'; - const THUMBNAIL_URL = 'http://lorempixel.com/130/160/'; + const THUMBNAIL_URL = 'http://localhost:8003/mstile-150x150.png'; const CREATE_ADVENTURE_PATH = '/adventure';