From d4ad50fc0f5c24ecb1e25703c9aa284e359120cb Mon Sep 17 00:00:00 2001 From: Matthieu Aubry Date: Thu, 6 Oct 2016 15:10:50 +1300 Subject: UI tests tweaking, balance jobs between builds, add some wait, display error in case the widget metadata sync request fails (#10694) * Balance the UI tests job, second half currently 8 min longer * Update app.js * Display error in UI when the Ajax request for widget metadata fails * Add some wait for the often failing UI test --- plugins/Dashboard/javascripts/widgetMenu.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/Dashboard') diff --git a/plugins/Dashboard/javascripts/widgetMenu.js b/plugins/Dashboard/javascripts/widgetMenu.js index d3d96569eb..55eef4ab09 100644 --- a/plugins/Dashboard/javascripts/widgetMenu.js +++ b/plugins/Dashboard/javascripts/widgetMenu.js @@ -83,6 +83,12 @@ widgetsHelper.getAvailableWidgets = function (callback) { } } ); + ajaxRequest.setErrorCallback(function (deferred, status) { + if (status == 'abort' || !deferred || deferred.status < 400 || deferred.status >= 600) { + return; + } + $('#loadingError').show(); + }); ajaxRequest.send(true); } -- cgit v1.2.3