From 5f10d16f4df592c1336ab65ffeeb818d7d87e4ea Mon Sep 17 00:00:00 2001 From: LeeDr Date: Fri, 20 Nov 2015 12:39:05 -0600 Subject: [PATCH] Adding debug log before throwing errors. --- test/support/pages/Common.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/support/pages/Common.js b/test/support/pages/Common.js index 38f946b2991c..713ea591f3ea 100644 --- a/test/support/pages/Common.js +++ b/test/support/pages/Common.js @@ -32,8 +32,8 @@ define(function (require) { return self.checkForKibanaApp() .then(function (kibanaLoaded) { if (!kibanaLoaded) { - throw new Error(moment().format('HH:mm:ss.SSS') + ': ' + - 'Kibana is not loaded, retrying'); + self.debug('Kibana is not loaded, retrying'); + throw new Error('Kibana is not loaded, retrying'); } }); } @@ -44,8 +44,10 @@ define(function (require) { .then(function (currentUrl) { var navSuccessful = new RegExp(appUrl).test(currentUrl); if (!navSuccessful) { - throw new Error(moment().format('HH:mm:ss.SSS') + ': ' + - 'App failed to load: ' + appName + + self.debug('App failed to load: ' + appName + + ' in ' + defaultTimeout + 'ms' + + ' currentUrl = ' + currentUrl); + throw new Error('App failed to load: ' + appName + ' in ' + defaultTimeout + 'ms' + ' currentUrl = ' + currentUrl); }