wiki.techinc.nl/tests/selenium
Željko Filipin 9ce486e380 Run Selenium tests for skins
So far, only extension had Selenium tests, but now MinervaNeue skin also has them.

Bug: T174018
Change-Id: I6bac14f44e677cb0b1fdefc6474d08fb17a0b911
2017-08-25 16:51:05 +02:00
..
pageobjects Create users and pages for Selenium tests using action API 2017-07-07 04:59:14 +00:00
specs Disable VisualEditor welcome dialog when running Selenium tests 2017-07-07 11:54:46 +02:00
.eslintrc.json Create users and pages for Selenium tests using action API 2017-07-07 04:59:14 +00:00
README.md Create users and pages for Selenium tests using action API 2017-07-07 04:59:14 +00:00
wdio.conf.jenkins.js Use consistent spaces at start and end of comments 2017-03-30 22:06:40 +02:00
wdio.conf.js Run Selenium tests for skins 2017-08-25 16:51:05 +02:00

Selenium tests

Prerequisites

Set up MediaWiki-Vagrant:

cd mediawiki/vagrant
vagrant up

Installation

cd mediawiki
npm install

Usage

npm run selenium

To run only one file (for example page.js), you first need to spawn the chromedriver:

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

Then in another terminal:

cd tests/selenium
../../node_modules/.bin/wdio --spec specs/page.js

The runner reads the config file wdio.conf.js and runs the spec listed in page.js.

The defaults in the configuration files aim are targetting a MediaWiki-Vagrant installation on installation on http://127.0.0.1:8080 with a user Admin and password 'vagrant'. Those settings can be overriden using environment variables:

MW_SERVER: to be set to the value of your $wgServer MW_SCRIPT_PATH: ditto with $wgScriptPath MEDIAWIKI_USER: username of an account that can create users on the wiki. MEDIAWIKI_PASSWORD: password for above user

Example:

MW_SERVER=http://example.org MW_SCRIPT_PATH=/dev/w npm run selenium