selenium: Update README.md file

Bug: T282237
Change-Id: I089bad7629246a93032174665ad10826c5789e53
This commit is contained in:
sahil 2021-05-22 15:34:39 +05:30 committed by Sahilgrewalhere
parent 322570c567
commit 0a8d861b05

View file

@ -1,34 +1,21 @@
# Selenium tests
For more information see https://www.mediawiki.org/wiki/Selenium/Node.js and
[PATH]/mediawiki/vagrant/mediawiki/tests/selenium/README.md.
For more information see https://www.mediawiki.org/wiki/Selenium
## Setup
Set up MediaWiki-Vagrant:
cd [PATH]/mediawiki/vagrant/mediawiki/extensions/RevisionSlider
vagrant up
vagrant roles enable revisionslider
vagrant provision
npm install
Chromedriver has to run in one terminal window:
chromedriver --url-base=wd/hub --port=4444
See https://www.mediawiki.org/wiki/MediaWiki-Docker/Extension/RevisionSlider
## 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].js
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.js] --mochaOpts.grep [TEST-NAME]
npm run selenium-test -- --spec tests/selenium/specs/[FILE-NAME] --mochaOpts.grep [TEST-NAME]