mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-12-18 08:30:52 +00:00
0834f37e42
Follow-up Iabd0ae5b18571f8cad44ef2d86bcf2519e7f95ba. This patch: - Moves some save-related code to a separate method - Reduces conditionals nesting - Fixes an edge case where the content of the form would be wiped in case the token didn't match. - Adds another (basic) selenium test - Standardizes return types - Moves data load outside of buildFilterEditor Change-Id: I89444b59f04c495c9ab59244151c8ed5d38cf0fe |
||
---|---|---|
.. | ||
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]