mediawiki-extensions-Cite/tests/selenium
WMDE-Fisch 7e8cf11648 Increase stability of backlink browser tests
Adding a step to wait for loaded modules. This was manily taken from
the Popups-extension browser test, but with a fixed chain for the
results.

Let's hope we do not need to pause with this.

See as well I274bdee0b3c39c418a2b61881d56f89889c53485

Bug: T220318
Change-Id: I5bdc1951a23a51e9a4deea69af2bfc96843f5a1d
2019-04-08 17:42:48 +00:00
..
pageobjects Increase stability of backlink browser tests 2019-04-08 17:42:48 +00:00
specs Increase stability of backlink browser tests 2019-04-08 17:42:48 +00:00
.eslintrc.json Increase stability of backlink browser tests 2019-04-08 17:42:48 +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.