mediawiki-extensions-AbuseF.../tests/selenium
jaredblumer 12f9be5e69 eslint: Update to eslint-config-wikimedia 0.16.0
* Update ESLint config with Selenium WebdriverIO test suite
* Update modules and Selenium pageobjects and specs per ESLint
requirements
* Update grunt-eslint package to 23.0.0 as required by
eslint-config-wikimedia 0.16.0

Bug: T254495
Change-Id: Ibfcf9115adedf9f2c3e7dac1ac626b41fc97b7c4
2020-06-08 21:17:50 -04:00
..
pageobjects eslint: Update to eslint-config-wikimedia 0.16.0 2020-06-08 21:17:50 -04:00
specs eslint: Update to eslint-config-wikimedia 0.16.0 2020-06-08 21:17:50 -04:00
.eslintrc.json eslint: Update to eslint-config-wikimedia 0.16.0 2020-06-08 21:17:50 -04:00
README.md Add config for Selenium and basic tests 2019-09-17 16:23:07 +00:00
wdio.conf.js eslint: Update to eslint-config-wikimedia 0.16.0 2020-06-08 21:17:50 -04:00

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]