X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fselenium%2FREADME.md;h=a7c9aa6c3cb4916663d2f1af03e3aab4a889c668;hb=967a96e7fa5910f8fc451590decb381dbfb481ba;hp=274eb14360ee691775b7bfb1b8ff33003fa94313;hpb=0db03df62e8acd435fe3623eb70c5be0136bec64;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/selenium/README.md b/tests/selenium/README.md index 274eb14360..a7c9aa6c3c 100644 --- a/tests/selenium/README.md +++ b/tests/selenium/README.md @@ -25,36 +25,32 @@ environment variable to any value: DISPLAY=1 npm run selenium -To run only one file (for example page.js), you first need to spawn the chromedriver: +To run only one test (for example specs/page.js), you first need to start Chromedriver: chromedriver --url-base=wd/hub --port=4444 -Then in another terminal: +Then, in another terminal: - cd tests/selenium - ../../node_modules/.bin/wdio --spec specs/page.js + npm run selenium-test -- --spec tests/selenium/specs/page.js -To run only one test (name contains string 'preferences'): +You can also filter specific cases, for ones that contain the string 'preferences': - ../../node_modules/.bin/wdio --spec specs/user.js --mochaOpts.grep preferences + npm run selenium-test -- tests/selenium/specs/user.js --mochaOpts.grep preferences -The runner reads the config file `wdio.conf.js` and runs the spec listed in -`page.js`. - -The defaults in the configuration files aim are targeting a MediaWiki-Vagrant -installation on http://127.0.0.1:8080 with a user Admin and -password 'vagrant'. Those settings can be overridden using environment +The runner reads the configuration from `wdio.conf.js`. The defaults target +a MediaWiki-Vagrant installation on `http://127.0.0.1:8080` with a user "Admin" +and password "vagrant". Those settings can be overridden using environment variables: -`MW_SERVER`: to be set to the value of your $wgServer -`MW_SCRIPT_PATH`: ditto with $wgScriptPath -`MEDIAWIKI_USER`: username of an account that can create users on the wiki -`MEDIAWIKI_PASSWORD`: password for above user +- `MW_SERVER`: to be set to the value of your $wgServer +- `MW_SCRIPT_PATH`: ditto with $wgScriptPath +- `MEDIAWIKI_USER`: username of an account that can create users on the wiki +- `MEDIAWIKI_PASSWORD`: password for above user Example: MW_SERVER=http://example.org MW_SCRIPT_PATH=/dev/w npm run selenium -## Links +## Further reading - [Selenium/Node.js](https://www.mediawiki.org/wiki/Selenium/Node.js)