Skip to content

Commit

Permalink
Merge pull request node-red#2041 from kazntree/default-chromedriver
Browse files Browse the repository at this point in the history
Remove chromedriver from devDependencies
  • Loading branch information
knolleary authored Jan 26, 2019
2 parents 79062e2 + 7ab5a2b commit 2e063f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
**/

var path = require("path");
var fs = require("fs-extra");

module.exports = function(grunt) {

Expand Down Expand Up @@ -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 () {
Expand All @@ -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',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2e063f9

Please sign in to comment.