mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-22 11:32:38 +00:00
626d9d4188
This adds a test which checks if the extension appears on the Special:Version page. This is an initial step for adding more browser tests to check changes done in I26fe41c328157233cc5b06d38d2ba0f7b036a853 Change-Id: I9a9d1cd2a25277f2c430f4e80b51b72c1621f91b
39 lines
957 B
Markdown
39 lines
957 B
Markdown
# 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.
|