speed up the waitForToastMessageGone helper
This commit is contained in:
parent
cfd8deac32
commit
d8d8886747
1 changed files with 5 additions and 4 deletions
|
@ -111,14 +111,15 @@ define(function (require) {
|
|||
|
||||
waitForToastMessageGone: function waitForToastMessageGone() {
|
||||
var self = this;
|
||||
return common.tryForTime(defaultTimeout * 2, function () {
|
||||
return self.remote.setFindTimeout(1000)
|
||||
.findAllByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
|
||||
return common.tryForTime(defaultTimeout, function () {
|
||||
return self.remote.setFindTimeout(500)
|
||||
.findAllByCssSelector('kbn-truncated.toast-message')
|
||||
.then(function toastMessage(messages) {
|
||||
if (messages.length > 0) {
|
||||
common.debug('toast message found, waiting...');
|
||||
throw new Error('waiting for toast message to clear');
|
||||
} else {
|
||||
common.debug('now messages = 0 "' + messages + '"');
|
||||
common.debug('toast message clear');
|
||||
return messages;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue