Skip to content

Commit

Permalink
Improve browser test instructions and execution
Browse files Browse the repository at this point in the history
  • Loading branch information
cmfcmf committed Jun 8, 2018
1 parent 7d990c4 commit 0f0aefe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions scripts/prepare-browser-tests.sh
Expand Up @@ -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.
Expand All @@ -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 &
2 changes: 1 addition & 1 deletion tests/Browser/NewAdventureTest.php
Expand Up @@ -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';

Expand Down

0 comments on commit 0f0aefe

Please sign in to comment.