diff options
author | Timo Tijhof <krinklemail@gmail.com> | 2018-04-21 02:10:56 +0100 |
---|---|---|
committer | Krinkle <krinklemail@gmail.com> | 2018-04-30 21:54:15 +0000 |
commit | 810afd33e003f7bdfd8a7802cfb72cc6797f49e2 (patch) | |
tree | 0ccc9f8841a9ebbc48e02d3239967e591a93d4fa /tests/selenium/README.md | |
parent | 1c52863fc0c697a7a6216dfe44ca0dd83b6a3408 (diff) | |
download | mediawikicore-810afd33e003f7bdfd8a7802cfb72cc6797f49e2.tar.gz mediawikicore-810afd33e003f7bdfd8a7802cfb72cc6797f49e2.zip |
selenium: Run wdio directly without grunt
Doesn't seem to add anything, except complexity.
This has the benefit of matching more closely the way the README
recommends running individual tests.
Also add a check for 'chromedriver' before running it.
Normally the -e and pipefail would suffice, but because
it runs in the background, the error can be buried,
hard to find, or even not cause exit code to be set
properly. Thus, do a simple 'hash' check that will
print a useful command and exit cleanly.
Before:
> $ something &
> [1] 57922
> -bash: something: command not found
> [1]+ Exit 127 something
> $ echo $?
> 0
After:
> $ hash something
> -bash: hash: something: not found
> (exit: 1) $ echo $?
> 1
Change-Id: Id95f18927b5443defe679a77a82c5cbdd127c716
Diffstat (limited to 'tests/selenium/README.md')
-rw-r--r-- | tests/selenium/README.md | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/selenium/README.md b/tests/selenium/README.md index b15d4073dc64..274eb14360ee 100644 --- a/tests/selenium/README.md +++ b/tests/selenium/README.md @@ -5,9 +5,8 @@ - [Chrome](https://www.google.com/chrome/) - [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) - [Node.js](https://nodejs.org/en/) -- [MediaWiki-Vagrant](https://www.mediawiki.org/wiki/MediaWiki-Vagrant) -Set up MediaWiki-Vagrant: +If using MediaWiki-Vagrant: cd mediawiki/vagrant vagrant up @@ -24,7 +23,7 @@ Set up MediaWiki-Vagrant: By default, Chrome will run in headless mode. If you want to see Chrome, set DISPLAY environment variable to any value: - DISPLAY=:1 npm run selenium + DISPLAY=1 npm run selenium To run only one file (for example page.js), you first need to spawn the chromedriver: |