Skip to content

Commit

Permalink
feat(webDriver): Got rid of setup-protractor script in favour of grun…
Browse files Browse the repository at this point in the history
…t webdriver:update
  • Loading branch information
pilsy committed Jul 28, 2014
1 parent f3e067b commit e098f51
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 86 deletions.
60 changes: 52 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/*
* CleverStack.io
* https://github.com/clevertech/cleverstack-angular-seed/
*
* Copyright (c) 2013 Clevertech.biz
* Licensed under the MIT license.
*/

'use strict';

var fs = require('fs');
Expand Down Expand Up @@ -603,6 +595,41 @@ module.exports = function (grunt) {
dir: '<%= appConfig.test.e2e.coverage.path %>reports',
print: 'detail'
}
},
run: {
wbDriverUpdate: {
args: [ './node_modules/protractor/bin/webdriver-manager', 'update', '--out_dir="./scripts/"' ],
options: {
passArgs: [
'ie',
'chrome',
'standalone',
'seleniumPort'
]
}
},
wbDriverStatus: {
args: [ './node_modules/protractor/bin/webdriver-manager', 'status', '--out_dir="./scripts/"' ],
options: {
passArgs: [
'ie',
'chrome',
'standalone',
'seleniumPort'
]
}
},
wbDriverStart: {
args: [ './node_modules/protractor/bin/webdriver-manager', 'start', '--out_dir="./scripts/"' ],
options: {
passArgs: [
'ie',
'chrome',
'standalone',
'seleniumPort'
]
}
}
}
});

Expand Down Expand Up @@ -634,6 +661,23 @@ module.exports = function (grunt) {
'usemin'
]);

grunt.registerTask( 'webdriver', [
'run:wbDriverStatus',
'run:wbDriverUpdate'
]);

grunt.registerTask( 'webdriver:update', [
'run:wbDriverUpdate'
]);

grunt.registerTask( 'webdriver:status', [
'run:wbDriverStatus'
]);

grunt.registerTask( 'webdriver:start', [
'run:wbDriverStart'
]);

/* -- TEST TASKS ------------------------------------------------ */

grunt.registerTask('test', 'Start up the auto unit test server.', [
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"license": "BSD-2-Clause",
"dependencies": {},
"devDependencies": {
"devDependencies": {
"grunt-concurrent": "~0.4.1",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.3.0",
Expand All @@ -52,6 +52,7 @@
"grunt-protractor-coverage": "^0.2.8",
"grunt-protractor-runner": "~0.1.6",
"grunt-rev": "~0.1.0",
"grunt-run": "~0.2.2",
"grunt-usemin": "~0.1.12",
"karma": "~0.11.11",
"karma-browserstack-launcher": "~0.0.7",
Expand All @@ -67,20 +68,20 @@
"karma-phantomjs-launcher": "~0.1.1",
"karma-requirejs": "~0.2.0",
"karma-safari-launcher": "~0.1.1",
"karma-script-launcher": "~0.1.0",
"karma-sauce-launcher": "~0.2.8",
"karma-script-launcher": "~0.1.0",
"load-grunt-tasks": "~0.2.0",
"phantomjs": "~1.9.2",
"protractor": "~0.24.2",
"time-grunt": "~0.2.1"
},
"scripts": {
"setup": "node scripts/setup",
"setup-protractor": "node scripts/setup-protractor",
"setup-protractor": "grunt webdriver:update",
"start": "grunt server",
"bs-tunnel-karma": "sh scripts/bs-tunnel-karma.sh",
"bs-tunnel": "sh scripts/bs-tunnel-connect.sh",
"test": "grunt test:travis",
"testos": "node scripts/testos"
}
}
}
73 changes: 0 additions & 73 deletions scripts/setup-protractor.js

This file was deleted.

2 changes: 1 addition & 1 deletion test-e2e.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ exports.config = {
*/
// capabilities: {
// 'browserName': 'phantomjs',
// 'phantomjs.binary.path': './scripts/phantomjs.exe'
// 'phantomjs.binary.path': './node_modules/phantom/bin/phantomjs'
// },

// A base URL for your application under test. Calls to protractor.get()
Expand Down

0 comments on commit e098f51

Please sign in to comment.