mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Remove all ui test dependencies from package.json
Given chromedriver was already an extra dependency that needed to be manually installed, I have now moved all of the webdriver.io dependencies out as well. A new script has been added to install all of the ui test dependencies. The Grunt file has been updated on how it checks for the missing deps.
This commit is contained in:
parent
7926055b97
commit
6e3fa974ba
20
Gruntfile.js
20
Gruntfile.js
@ -496,7 +496,9 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-chmod');
|
grunt.loadNpmTasks('grunt-chmod');
|
||||||
grunt.loadNpmTasks('grunt-jsonlint');
|
grunt.loadNpmTasks('grunt-jsonlint');
|
||||||
grunt.loadNpmTasks('grunt-mocha-istanbul');
|
grunt.loadNpmTasks('grunt-mocha-istanbul');
|
||||||
grunt.loadNpmTasks('grunt-webdriver');
|
if (fs.existsSync(path.join("node_modules", "grunt-webdriver"))) {
|
||||||
|
grunt.loadNpmTasks('grunt-webdriver');
|
||||||
|
}
|
||||||
grunt.loadNpmTasks('grunt-jsdoc');
|
grunt.loadNpmTasks('grunt-jsdoc');
|
||||||
grunt.loadNpmTasks('grunt-jsdoc-to-markdown');
|
grunt.loadNpmTasks('grunt-jsdoc-to-markdown');
|
||||||
grunt.loadNpmTasks('grunt-npm-command');
|
grunt.loadNpmTasks('grunt-npm-command');
|
||||||
@ -555,8 +557,8 @@ module.exports = function(grunt) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('verifyUiTestDependencies', function() {
|
grunt.registerTask('verifyUiTestDependencies', function() {
|
||||||
if (!fs.existsSync(path.join("node_modules", "chromedriver"))) {
|
if (!fs.existsSync(path.join("node_modules", "grunt-webdriver"))) {
|
||||||
grunt.fail.fatal('You need to run "npm install chromedriver@2" before running UI test.');
|
grunt.fail.fatal('You need to install the UI test dependencies first.\nUse the script in "scripts/install-ui-test-dependencies.sh"');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -579,9 +581,15 @@ module.exports = function(grunt) {
|
|||||||
'Runs code style check on editor code',
|
'Runs code style check on editor code',
|
||||||
['jshint:editor']);
|
['jshint:editor']);
|
||||||
|
|
||||||
grunt.registerTask('test-ui',
|
if (!fs.existsSync(path.join("node_modules", "grunt-webdriver"))) {
|
||||||
'Builds editor content then runs unit tests on editor ui',
|
grunt.registerTask('test-ui',
|
||||||
['verifyUiTestDependencies','build','jshint:editor','webdriver:all']);
|
'Builds editor content then runs unit tests on editor ui',
|
||||||
|
['verifyUiTestDependencies']);
|
||||||
|
} else {
|
||||||
|
grunt.registerTask('test-ui',
|
||||||
|
'Builds editor content then runs unit tests on editor ui',
|
||||||
|
['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',
|
||||||
|
@ -95,7 +95,6 @@
|
|||||||
"grunt-npm-command": "~0.1.2",
|
"grunt-npm-command": "~0.1.2",
|
||||||
"grunt-sass": "~2.0.0",
|
"grunt-sass": "~2.0.0",
|
||||||
"grunt-simple-mocha": "~0.4.1",
|
"grunt-simple-mocha": "~0.4.1",
|
||||||
"grunt-webdriver": "^2.0.3",
|
|
||||||
"http-proxy": "^1.16.2",
|
"http-proxy": "^1.16.2",
|
||||||
"istanbul": "0.4.5",
|
"istanbul": "0.4.5",
|
||||||
"minami": "1.2.3",
|
"minami": "1.2.3",
|
||||||
@ -105,10 +104,6 @@
|
|||||||
"sinon": "1.17.7",
|
"sinon": "1.17.7",
|
||||||
"stoppable": "^1.1.0",
|
"stoppable": "^1.1.0",
|
||||||
"supertest": "3.4.2",
|
"supertest": "3.4.2",
|
||||||
"wdio-chromedriver-service": "^0.1.5",
|
|
||||||
"wdio-mocha-framework": "^0.6.4",
|
|
||||||
"wdio-spec-reporter": "^0.1.5",
|
|
||||||
"webdriverio": "^4.14.1",
|
|
||||||
"node-red-node-test-helper": "^0.2.3",
|
"node-red-node-test-helper": "^0.2.3",
|
||||||
"jsdoc-nr-template": "node-red/jsdoc-nr-template"
|
"jsdoc-nr-template": "node-red/jsdoc-nr-template"
|
||||||
},
|
},
|
||||||
|
7
scripts/install-ui-test-dependencies.sh
Executable file
7
scripts/install-ui-test-dependencies.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
npm install --no-save \
|
||||||
|
grunt-webdriver@^2.0.3 \
|
||||||
|
wdio-chromedriver-service@^0.1.5 \
|
||||||
|
wdio-mocha-framework@^0.6.4 \
|
||||||
|
wdio-spec-reporter@^0.1.5 \
|
||||||
|
webdriverio@^4.14.1 \
|
||||||
|
chromedriver@2
|
Loading…
Reference in New Issue
Block a user