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() {
|
waitForToastMessageGone: function waitForToastMessageGone() {
|
||||||
var self = this;
|
var self = this;
|
||||||
return common.tryForTime(defaultTimeout * 2, function () {
|
return common.tryForTime(defaultTimeout, function () {
|
||||||
return self.remote.setFindTimeout(1000)
|
return self.remote.setFindTimeout(500)
|
||||||
.findAllByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
|
.findAllByCssSelector('kbn-truncated.toast-message')
|
||||||
.then(function toastMessage(messages) {
|
.then(function toastMessage(messages) {
|
||||||
if (messages.length > 0) {
|
if (messages.length > 0) {
|
||||||
|
common.debug('toast message found, waiting...');
|
||||||
throw new Error('waiting for toast message to clear');
|
throw new Error('waiting for toast message to clear');
|
||||||
} else {
|
} else {
|
||||||
common.debug('now messages = 0 "' + messages + '"');
|
common.debug('toast message clear');
|
||||||
return messages;
|
return messages;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue