Skip to content

Commit

Permalink
Fixed: default selenium.start_session value is not applied when selen…
Browse files Browse the repository at this point in the history
…ium is undefined #450
  • Loading branch information
beatfactor committed May 15, 2015
1 parent 241f7a2 commit b05ac93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/runner/cli/clirunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ CliRunner.prototype = {

this.manageSelenium = !this.isParallelMode() && this.settings.selenium &&
this.settings.selenium.start_process || false;
this.startSession = this.settings.selenium && (this.settings.selenium.start_session ||
typeof this.settings.selenium.start_session == 'undefined');

if (typeof this.settings.src_folders == 'string') {
this.settings.src_folders = [this.settings.src_folders];
Expand Down Expand Up @@ -422,18 +420,18 @@ CliRunner.prototype = {
}
}

// overwrite selenium settings per environment
this.settings.selenium = this.settings.selenium || {};

// overwrite selenium settings per environment
if (this.test_settings.selenium && typeof (this.test_settings.selenium) == 'object') {
this.settings.selenium = this.settings.selenium || {};
for (var prop in this.test_settings.selenium) {
this.settings.selenium[prop] = this.test_settings.selenium[prop];
}

this.manageSelenium = this.settings.selenium.start_process || false;
this.startSession = this.settings.selenium.start_session || typeof this.settings.selenium.start_session == 'undefined';
}

this.manageSelenium = this.settings.selenium.start_process || false;
this.startSession = this.settings.selenium.start_session || typeof this.settings.selenium.start_session == 'undefined';

this.mergeSeleniumOptions();
this.disableCliColorsIfNeeded();

Expand Down
1 change: 1 addition & 0 deletions tests/src/runner/testCliRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ module.exports = {
test.equals(runner.output_folder, 'output');
test.equals(runner.parallelMode, false);
test.equals(runner.manageSelenium, false);
test.equals(runner.startSession, true);

test.done();

Expand Down

0 comments on commit b05ac93

Please sign in to comment.