mediawiki-extensions-AbuseF.../tests/selenium
Željko Filipin 682b76662e selenium: Remove ChromeDriver dependency
Since WebdriverIO v5, Puppeteer is available as a Chromedriver
alternative.

Puppeteer is bundled with WebdriverIO. Chromedriver needs to be installed
(and started/stopped) separately. Getting rid of Chromedriver simplifies
our documentation, among other things.

The commit updates tests/selenium/wdio.conf.js to use Puppeteer.

Bug: T269566
Change-Id: Ib2a547792a34e6d40137432f7800b5f71c254c36
2021-03-23 18:03:29 +00:00
..
pageobjects Simplify ViewEdit, last round 2020-10-26 13:07:29 +00:00
specs Simplify ViewEdit, last round 2020-10-26 13:07:29 +00:00
.eslintrc.json eslint: Update to eslint-config-wikimedia 0.16.0 2020-06-08 21:17:50 -04:00
README.md
wdio.conf.js selenium: Remove ChromeDriver dependency 2021-03-23 18:03:29 +00: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]