mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-12-01 00:56:26 +00:00
3a9eac9ad5
In Ib7427e15f673a575738489476e604c387f449ddd, I thought that $parameters could've only been null if $action wasn't enabled, but actually, they're null even if the action is just not set. Which is true for all actions when creating a new filter, and all non-set actions when editing an existing one. Hence, revert the part that touched ViewEdit. Also add a selenium test to ensure that warn parameters are visible. Bug: T236286 Change-Id: I8150baa077208eb1fc54ebc1d8415a243d0f3bd3 |
||
---|---|---|
.. | ||
pageobjects | ||
specs | ||
.eslintrc.json | ||
README.md | ||
wdio.conf.js |
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]