selenium: Abstract test command behind 'npm run'
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 23 Apr 2018 14:56:54 +0000 (15:56 +0100)
committerKrinkle <krinklemail@gmail.com>
Mon, 23 Apr 2018 16:41:17 +0000 (16:41 +0000)
This makes it possible to use in Quibble. Right now, Quibble
cannot use 'npm run selenium' yet because it sets up its own
chromedriver, which would conflict with selenium.sh.

But, in preparation for Id95f18927b5, we can at least abstract
the test command so that it can easily be changed without having
to update Quibble and without having to worry about it being the
same in all MediaWiki branches.

Bug: T179190
Change-Id: I622ec3bf36746502cae891cc6bec23982b21f876

package.json
tests/selenium/selenium.sh

index a282d69..416a23e 100644 (file)
@@ -5,7 +5,8 @@
     "qunit": "grunt qunit",
     "doc": "jsduck",
     "postdoc": "grunt copy:jsduck",
-    "selenium": "./tests/selenium/selenium.sh"
+    "selenium": "./tests/selenium/selenium.sh",
+    "selenium-test": "grunt webdriver:test"
   },
   "devDependencies": {
     "bluebird": "3.5.1",
index 519b7be..6b71019 100755 (executable)
@@ -6,4 +6,4 @@ function kill_chromedriver() {
     killall chromedriver > /dev/null
 }
 trap kill_chromedriver EXIT
-./node_modules/.bin/grunt webdriver:test
+npm run selenium-test