From 7ab5a2be47c64a61aa404cd9baec0519772a9564 Mon Sep 17 00:00:00 2001 From: kazntree Date: Sun, 20 Jan 2019 19:10:54 +0900 Subject: [PATCH] remove chromedriver package, and instruct how to install it when running grunt test-ui --- Gruntfile.js | 10 +++++++++- package.json | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 43ff0b370..dc78832d7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,6 +15,7 @@ **/ var path = require("path"); +var fs = require("fs-extra"); module.exports = function(grunt) { @@ -553,6 +554,13 @@ module.exports = function(grunt) { }); }); + grunt.registerTask('verifyUiTestDependencies', function() { + if (!fs.existsSync(path.join("node_modules", "chromedriver"))) { + grunt.fail.fatal('You need to run "npm install chromedriver@2" before running UI test.'); + return false; + } + }); + grunt.registerTask('setDevEnv', 'Sets NODE_ENV=development so non-minified assets are used', function () { @@ -573,7 +581,7 @@ module.exports = function(grunt) { grunt.registerTask('test-ui', 'Builds editor content then runs unit tests on editor ui', - ['build','jshint:editor','webdriver:all']); + ['verifyUiTestDependencies','build','jshint:editor','webdriver:all']); grunt.registerTask('test-nodes', 'Runs unit tests on core nodes', diff --git a/package.json b/package.json index 5799c22c5..549ecf9c6 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,6 @@ "bcrypt": "~2.0.0" }, "devDependencies": { - "chromedriver": "2.45.0", "grunt": "~1.0.3", "grunt-chmod": "~1.1.1", "grunt-cli": "~1.3.2",