mediawiki-extensions-AbuseF.../tests/selenium/README.md
Daimona Eaytoy 0646b4fe7d Add config for Selenium and basic tests
This is some sort of Hello World for selenium. This patch adds the
config files and a couple of very basic tests.

Bug: T214478
Change-Id: I8193b4edb40332bea1d08e24ec020bf36004320d
2019-09-17 16:23:07 +00:00

769 B

Selenium tests

For more information see https://www.mediawiki.org/wiki/Selenium/Node.js and [PATH]/mediawiki/vagrant/mediawiki/tests/selenium/README.md.

Setup

Set up MediaWiki-Vagrant:

cd [PATH]/mediawiki/vagrant/mediawiki/extensions/AbuseFilter
vagrant up
vagrant roles enable abusefilter
vagrant provision
npm install

Chromedriver has to run in one terminal window:

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

Run all specs

In another terminal window:

npm run selenium-test

Run specific tests

Filter by file name:

npm run selenium-test -- --spec tests/selenium/specs/[FILE-NAME]

Filter by file name and test name:

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