Skip to content

Commit

Permalink
Merge pull request #7070 from LeeDr/fixTestTimeouts
Browse files Browse the repository at this point in the history
Fix setFindTimeout defaults to 10 seconds.
  • Loading branch information
Lee Drengenberg committed Apr 27, 2016
2 parents 26a6e56 + 9977965 commit 929fe36
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/intern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ define(function (require) {
}
},
timeouts: {
// this is how long a test can run before timing out
default: 90000
default: 90000, // this is how long a test can run before timing out
findTimeout: 10000 // this is how long we try to find elements on page
},
}, serverConfig);
});
2 changes: 1 addition & 1 deletion test/support/pages/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ define(function (require) {
}


var defaultTimeout = config.timeouts.default;
var defaultTimeout = config.timeouts.findTimeout;

Common.prototype = {
constructor: Common,
Expand Down
2 changes: 1 addition & 1 deletion test/support/pages/discover_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function (require) {
var config = require('intern').config;
var Common = require('./common');

var defaultTimeout = config.timeouts.default;
var defaultTimeout = config.timeouts.findTimeout;
var common;
var thisTime;

Expand Down
2 changes: 1 addition & 1 deletion test/support/pages/header_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define(function (require) {
common = new Common(this.remote);
}

var defaultTimeout = config.timeouts.default;
var defaultTimeout = config.timeouts.findTimeout;

HeaderPage.prototype = {
constructor: HeaderPage,
Expand Down
5 changes: 3 additions & 2 deletions test/support/pages/settings_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(function (require) {
var Promise = require('bluebird');
var Common = require('./common');

var defaultTimeout = config.timeouts.default;
var defaultTimeout = config.timeouts.findTimeout;
var common;

function settingsPage(remote) {
Expand Down Expand Up @@ -40,7 +40,8 @@ define(function (require) {
return common.sleep(1000);
})
.then(function setAdvancedSettingsClickPropertyValue(selectList) {
return self.remote.findByCssSelector('option[label="' + propertyValue + '"]')
return self.remote.setFindTimeout(defaultTimeout)
.findByCssSelector('option[label="' + propertyValue + '"]')
.click();
})
.then(function setAdvancedSettingsClickSaveButton() {
Expand Down
4 changes: 2 additions & 2 deletions test/support/pages/shield_page.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// in test/support/pages/shield_page.js
define(function (require) {
var config = require('intern').config;
var defaultTimeout = config.timeouts.default;
var defaultTimeout = config.timeouts.findTimeout;

// the page object is created as a constructor
// so we can provide the remote Command object
Expand All @@ -15,7 +15,7 @@ define(function (require) {

login: function login(user, pwd) {
var remote = this.remote;
return remote.setFindTimeout(5000)
return remote.setFindTimeout(defaultTimeout)
.findById('username')
.type(user)
.then(function () {
Expand Down
2 changes: 1 addition & 1 deletion test/support/pages/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(function (require) {
var registerSuite = require('intern!object');
var Common = require('./common');

var defaultTimeout = config.timeouts.default;
var defaultTimeout = config.timeouts.findTimeout;
var common;

function VisualizePage(remote) {
Expand Down

0 comments on commit 929fe36

Please sign in to comment.