mediawiki-extensions-Cite/tests/selenium
Ed Sanders fdde5b71af Update eslint-config-wikimedia to 0.9.0
Change-Id: I7883af1f56c7f2f3eeff1f7a51b640a303bcab78
2018-11-27 22:23:57 +00:00
..
pageobjects Add browser tests for linking the main backlink 2018-11-20 13:21:30 +01:00
specs Add browser tests for linking the main backlink 2018-11-20 13:21:30 +01:00
.eslintrc.json Update eslint-config-wikimedia to 0.9.0 2018-11-27 22:23:57 +00:00
README.md Add first browser test 2018-11-19 16:08:42 +00:00
wdio.conf.js Add first browser test 2018-11-19 16:08:42 +00:00

Selenium tests

Please see tests/selenium/README.md file in mediawiki/core repository, usually at mediawiki/vagrant/mediawiki folder.

Setup

Set up MediaWiki-Vagrant:

cd mediawiki/vagrant
vagrant up
vagrant roles enable cite
vagrant provision
cd mediawiki
npm install

Run all specs

Run test specs from both mediawiki/core and installed extensions:

cd mediawiki
npm run selenium

Run specific tests

To run only some tests, you first have to start Chromedriver in one terminal window:

chromedriver --url-base=wd/hub --port=4444

Then, in another terminal window run this the current extension directory:

npm install
npm run selenium-test -- --spec tests/selenium/specs/FILE-NAME.js

You can also filter specific test(s) by name:

npm run selenium-test -- --spec tests/selenium/specs/FILE-NAME.js --mochaOpts.grep TEST-NAME

Make sure Chromedriver is running when executing the above command.