Added timeouts to most of the tests

(seemed to only be needed on Firefox).
All (13) tests are passing on Chrome and Firefox.
These tests currently depend on starting testSettings without
a Kibana index (I use CURL to manually delete before starting).
This commit is contained in:
leedr 2015-10-12 12:16:24 -05:00 committed by Joe Fleming
parent d6b82bc4be
commit b6eecc6ba7
2 changed files with 5 additions and 8 deletions

View file

@ -5,7 +5,7 @@ define(function (require) {
return _.assign({
capabilities: {
'selenium-version': '2.47.1',
'idle-timeout': 30
'idle-timeout': 60
},
environments: [{
browserName: 'firefox'
@ -17,4 +17,4 @@ define(function (require) {
],
excludeInstrumentation: /(fixtures|node_modules)\//
}, serverConfig);
});
});

View file

@ -41,23 +41,20 @@ define(function (require) {
return Promise.try(attempt);
},
log: function log(logString) {
console.log(Date.now() + ' : ' + logString);
},
sleep: function sleep(sleepMilliseconds) {
var self = this;
self.log('... sleep(' + sleepMilliseconds + ') start');
return this.remote
.setFindTimeout(sleepMilliseconds)
.findByCssSelector('youWillNeverFindThis')
.then(function () {
self.log('Nobody should ever see this');
return;
})
.catch(function () {
.catch(function (reason) {
self.log('... sleep(' + sleepMilliseconds + ') end');
return;
});
}