From e2b88ec0d9b4760ffebfa88bbb93e202edb30dc5 Mon Sep 17 00:00:00 2001 From: Pavel Reznikov Date: Tue, 1 Mar 2016 23:31:53 -0800 Subject: [PATCH] move webdriver-manager start to grunt --- .travis.yml | 3 +-- Gruntfile.js | 12 +++++++++++- package.json | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f98fae5..df7ca00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,13 +22,12 @@ install: - npm install -g bower - bower install - npm install - - webdriver-manager update --standalone + - ./node_modules/protractor/bin/webdriver-manager update --standalone before_script: - export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - - nohup bash -c "webdriver-manager start 2>&1 &" script: - npm run build diff --git a/Gruntfile.js b/Gruntfile.js index 8ce7511..e2c27b2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,3 +1,4 @@ +// jscs:disable requireCamelCaseOrUpperCaseIdentifiers module.exports = function(grunt) { grunt.loadNpmTasks('grunt-sass'); grunt.loadNpmTasks('grunt-contrib-cssmin'); @@ -9,6 +10,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-protractor-runner'); grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-protractor-webdriver'); grunt.initConfig({ sass: { @@ -114,8 +116,16 @@ module.exports = function(grunt) { }, }, }, + + protractor_webdriver: { + all: { + options: { + command: 'webdriver-manager start', + } + } + } }); grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify', 'doctoc']); - grunt.registerTask('e2e-test', ['connect', 'protractor']); + grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']); }; diff --git a/package.json b/package.json index bdbb69d..f87c652 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "grunt-doctoc": "^0.1.1", "grunt-jscs": "^2.7.0", "grunt-protractor-runner": "^3.0.0", + "grunt-protractor-webdriver": "^0.2.5", "grunt-sass": "^1.1.0", "jasmine-core": "^2.4.1", "karma": "^0.13.21",