From d8d88867472bd94961f56c0811af8698a7688503 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Tue, 24 Nov 2015 11:08:19 -0600 Subject: [PATCH] speed up the waitForToastMessageGone helper --- test/support/pages/HeaderPage.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/support/pages/HeaderPage.js b/test/support/pages/HeaderPage.js index 3f470432e443..14df032fcc4c 100644 --- a/test/support/pages/HeaderPage.js +++ b/test/support/pages/HeaderPage.js @@ -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; } });