mediawiki-extensions-Popups/tests/selenium
Stephen Niedzielski deffae141c Hygiene: improve ESLint globals readability
- Drop unused moment, Redux, and ReduxThunk globals.

- Instead of using a confusing and deprecated boolean, specify that
  globals are "readable" / "writable"
  https://eslint.org/docs/user-guide/configuring#specifying-globals

Change-Id: I711a4ea7c51c9a560f20fc28bc99bd932c7e1e25
2019-02-21 07:59:56 -07:00
..
fixtures Merge "QA: Test page in Selenium needs a lead section" 2019-02-04 13:48:25 +00:00
pageobjects Merge "Adapt Popups browser tests to recent breaking change" 2019-02-02 01:04:43 +00:00
specs Minor fix-ups to type hints in JavaScript code 2019-02-14 11:15:01 +01:00
.eslintrc.json Hygiene: improve ESLint globals readability 2019-02-21 07:59:56 -07:00
README.md Update README file for Selenium tests 2018-02-27 14:04:39 +01:00
wdio.conf.js Selenium: add selenium-daily NPM script 2018-09-05 19:16:12 +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 popups
vagrant provision
cd mediawiki
npm install
echo 'include_once "$IP/extensions/Popups/tests/selenium/LocalSettings.php";' >> LocalSettings.php

Start Chromedriver and run all tests

Run both mediawiki/core and extension tests from mediawiki/core repository (usually at mediawiki/vagrant/mediawiki folder):

npm run selenium

Start Chromedriver

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

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

Run test(s) from one file

Then, in another terminal tab (or window) run this from mediawiki/core repository (usually at mediawiki/vagrant/mediawiki folder):

./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/EXTENSION-NAME/tests/selenium/specs/FILE-NAME.js

wdio is a dependency of mediawiki/core that you have installed with npm install.

Run specific test(s)

To run only test(s) which name contains string TEST-NAME, run this from mediawiki/core repository (usually at mediawiki/vagrant/mediawiki folder):

./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/EXTENSION-NAME/tests/selenium/specs/FILE-NAME.js --mochaOpts.grep TEST-NAME

Make sure Chromedriver is running when executing the above command.