Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Build: Add grunt-selenium-standalone
Browse files Browse the repository at this point in the history
Allows installation and starting of selenium standalone and chrome driver
from grunt

Fixes gh-244
Closes gh-245
  • Loading branch information
arschmitz committed Apr 21, 2016
1 parent 990c66b commit 3d1060f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
34 changes: 33 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-git-authors');
grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-selenium-standalone');
grunt.loadNpmTasks('intern');

var pkg = require('./package');
Expand Down Expand Up @@ -55,6 +56,27 @@ module.exports = function(grunt) {
}
}
},
"selenium_standalone": {
options: {
stopOnExit: true
},
pointerevents: {
seleniumVersion: '2.53.0',
seleniumDownloadURL: 'http://selenium-release.storage.googleapis.com',
drivers: {
chrome: {
version: '2.21',
arch: process.arch,
baseURL: 'http://chromedriver.storage.googleapis.com'
},
ie: {
version: '2.53',
arch: process.arch,
baseURL: 'http://selenium-release.storage.googleapis.com'
}
}
}
},
jscs: {
lint: {
options: {
Expand Down Expand Up @@ -130,8 +152,18 @@ module.exports = function(grunt) {
pretest().then(done);
});

grunt.registerTask('server', [
'selenium_standalone:pointerevents:install',
'selenium_standalone:pointerevents:start'
]);
grunt.registerTask('default', ['lint', 'build', 'uglify']);
grunt.registerTask('lint', ['jscs:lint', 'jshint']);
grunt.registerTask('test', ['build', 'pretest', 'intern:pointerevents']);
grunt.registerTask('test', [
'build',
'server',
'pretest',
'intern:pointerevents',
'selenium_standalone:pointerevents:stop'
]);
grunt.registerTask('ci', ['lint', 'build', 'pretest', 'intern:ci']);
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"grunt-contrib-watch": "^0.6.1",
"grunt-git-authors": "^3.0.0",
"grunt-jscs": "1.8.0",
"grunt-selenium-standalone": "1.0.1",
"intern": "2.2.2",
"lodash": "^3.9.3",
"request": "^2.58.0"
Expand Down

0 comments on commit 3d1060f

Please sign in to comment.