mediawiki-extensions-AbuseF.../tests/selenium
Daimona Eaytoy 7bc5248ed7 Selenium tests: wait for clickable button
It's possible that we try clicking this button before it's ready. This
theory is hard to verify because I get no problem locally, but this
shouldn't hurt.

Also specialize input selectors for a couple elements that might not be
univocally determined within the page.

Change-Id: Ida65c3c5fd4d8b3b35ecbee7e99977c71c7c4b96
2020-10-01 00:51:35 +02:00
..
pageobjects Selenium tests: wait for clickable button 2020-10-01 00:51:35 +02:00
specs Add a lot of selenium tests for the editing view 2020-09-29 14:22:53 +00: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]