diff --git a/core/phpunit.xml.dist b/core/phpunit.xml.dist index 963d921a7e..2a55d680f3 100644 --- a/core/phpunit.xml.dist +++ b/core/phpunit.xml.dist @@ -30,8 +30,10 @@ + + diff --git a/core/tests/README.md b/core/tests/README.md index ea42929058..fcaa5cc2c2 100644 --- a/core/tests/README.md +++ b/core/tests/README.md @@ -40,7 +40,7 @@ For help installing and starting selenium, see http://mink.behat.org/en/latest/d * Make sure you have a recent version of chrome installed -* Perform the required installs +* Install selenium-server-standalone and chromedriver Example for Mac: @@ -60,13 +60,20 @@ export MINK_DRIVER_ARGS_WEBDRIVER='["chrome", null, "http://localhost:4444/wd/hu ./vendor/bin/phpunit -c core --testsuite functional-javascript ``` -* Set an additional environment parameter to tell the test to use firefox: +* It is possible to use alternate browsers if the required dependencies are +installed. For example to use Firefox: + ``` -export MINK_DRIVER_ARGS='["firefox", null, "http://localhost:4444/wd/hub"]' +export MINK_DRIVER_ARGS_WEBDRIVER='["firefox", null, "http://localhost:4444/wd/hub"]' +./vendor/bin/phpunit -c core --testsuite functional-javascript ``` -* Run the tests as before, now a firefox window should appear. + +* To force all BrowserTestBase (including legacy JavascriptTestBase) tests to use +webdriver: + ``` - ./vendor/bin/phpunit -c core --testsuite functional-javascript +export MINK_DRIVER_CLASS='Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' +./vendor/bin/phpunit -c core --testsuite functional-javascript ``` ## Running legacy javascript tests