Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tasks/protractor_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ module.exports = function(grunt) {
opts.configFile = this.data.configFile;
}

// suite may or may not to be in options{} object, and can be overriden if passed through the command line.
if (!grunt.util._.isUndefined(this.data.suite)) {
opts.suite = this.data.suite;
}

grunt.verbose.writeln("Options: " + util.inspect(opts));

var keepAlive = opts['keepAlive'];
Expand Down Expand Up @@ -79,6 +84,11 @@ module.exports = function(grunt) {
}
});

//Adds the suite configuration from opts if it hasn't been added by command line arguments
if (!grunt.util._.isUndefined(opts.suite) && !('suite' in opts.args || grunt.option('suite'))){
args.push('--suite', opts.suite);
}

// Convert [object] to --[object].key1 val1 --[object].key2 val2 ....
objectArgs.forEach(function(a) {
(function convert(prefix, obj, args) {
Expand Down