diff options
Diffstat (limited to 'Echo/tests/selenium/README.md')
-rw-r--r-- | Echo/tests/selenium/README.md | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/Echo/tests/selenium/README.md b/Echo/tests/selenium/README.md index 59fa8eb4..340fd262 100644 --- a/Echo/tests/selenium/README.md +++ b/Echo/tests/selenium/README.md @@ -1,42 +1,40 @@ # Selenium tests -Please see tests/selenium/README.md file in mediawiki/core repository, usually at mediawiki/vagrant/mediawiki folder. +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 mediawiki/vagrant + cd [PATH]/mediawiki/vagrant/mediawiki/extensions/Echo vagrant up vagrant roles enable echo vagrant provision - cd mediawiki npm install -## Start Chromedriver and run all tests +Chromedriver has to run in one terminal window: -Run both mediawiki/core and extension tests from mediawiki/core repository (usually at mediawiki/vagrant/mediawiki folder): - - npm run selenium + chromedriver --url-base=wd/hub --port=4444 -## Start Chromedriver +## Run all specs -To run only some tests, you first have to start Chromedriver in one terminal tab (or window): +In another terminal window: - chromedriver --url-base=wd/hub --port=4444 + npm run selenium-test -## Run test(s) from one file +## [T171963](https://phabricator.wikimedia.org/T171963) `No active login attempt is in progress for your session` -Then, in another terminal tab (or window) run this from mediawiki/core repository (usually at mediawiki/vagrant/mediawiki folder): +If you get this error message when logging in at `127.0.0.1:8080`, the workaround +is to log in at `dev.wiki.local.wmftest.net:8080` - ./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/EXTENSION-NAME/tests/selenium/specs/FILE-NAME.js + MW_SERVER=http://dev.wiki.local.wmftest.net:8080 npm run selenium-test -`wdio` is a dependency of mediawiki/core that you have installed with `npm install`. +## Run specific tests -## Run specific test(s) +Filter by file name: -To run only test(s) which name contains string TEST-NAME, run this from mediawiki/core repository (usually at mediawiki/vagrant/mediawiki folder): + npm run selenium-test -- --spec tests/selenium/specs/[FILE-NAME].js - ./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/EXTENSION-NAME/tests/selenium/specs/FILE-NAME.js --mochaOpts.grep TEST-NAME +Filter by file name and test name: -Make sure Chromedriver is running when executing the above command. + npm run selenium-test -- --spec tests/selenium/specs/[FILE-NAME.js] --mochaOpts.grep [TEST-NAME] |