2017-02-14 16:05:08 +00:00
|
|
|
# Selenium tests
|
|
|
|
|
|
|
|
Please see tests/selenium/README.md file in mediawiki/core repository.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Set up MediaWiki-Vagrant:
|
|
|
|
|
|
|
|
cd mediawiki/vagrant
|
|
|
|
vagrant up
|
|
|
|
vagrant roles enable mobilefrontend relatedarticles
|
|
|
|
vagrant provision
|
|
|
|
|
|
|
|
From mediawiki/core folder:
|
|
|
|
|
2017-12-19 12:46:47 +00:00
|
|
|
echo 'include_once "$IP/extensions/RelatedArticles/tests/selenium/LocalSettings.php";' >> LocalSettings.php
|
2017-02-14 16:05:08 +00:00
|
|
|
|
|
|
|
Run both mediawiki/core and RelatedArticles tests from mediawiki/core folder:
|
|
|
|
|
|
|
|
npm run selenium
|
|
|
|
|
|
|
|
To run only RelatedArticles tests in one terminal window or tab start Chromedriver:
|
|
|
|
|
|
|
|
chromedriver --url-base=/wd/hub --port=4444
|
|
|
|
|
|
|
|
In another terminal tab or window go to mediawiki/core folder:
|
|
|
|
|
|
|
|
./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/RelatedArticles/tests/selenium/specs/*.js
|
|
|
|
|
|
|
|
Run only one RelatedArticles test file from mediawiki/core:
|
|
|
|
|
|
|
|
./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/RelatedArticles/tests/selenium/specs/readmore.js
|