1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #2041 from kazntree/default-chromedriver

Remove chromedriver from devDependencies
This commit is contained in:
Nick O'Leary 2019-01-26 21:48:25 +00:00 committed by GitHub
commit 2e063f91bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -15,6 +15,7 @@
**/ **/
var path = require("path"); var path = require("path");
var fs = require("fs-extra");
module.exports = function(grunt) { 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', grunt.registerTask('setDevEnv',
'Sets NODE_ENV=development so non-minified assets are used', 'Sets NODE_ENV=development so non-minified assets are used',
function () { function () {
@ -573,7 +581,7 @@ module.exports = function(grunt) {
grunt.registerTask('test-ui', grunt.registerTask('test-ui',
'Builds editor content then runs unit tests on editor 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', grunt.registerTask('test-nodes',
'Runs unit tests on core nodes', 'Runs unit tests on core nodes',

View File

@ -77,7 +77,6 @@
"bcrypt": "~2.0.0" "bcrypt": "~2.0.0"
}, },
"devDependencies": { "devDependencies": {
"chromedriver": "2.45.0",
"grunt": "~1.0.3", "grunt": "~1.0.3",
"grunt-chmod": "~1.1.1", "grunt-chmod": "~1.1.1",
"grunt-cli": "~1.3.2", "grunt-cli": "~1.3.2",