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

remove chromedriver package, and instruct how to install it when running grunt test-ui

This commit is contained in:
kazntree 2019-01-20 19:10:54 +09:00
parent 7a6e1fe566
commit 7ab5a2be47
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",