diff --git a/plugins/Dashboard/javascripts/widgetMenu.js b/plugins/Dashboard/javascripts/widgetMenu.js index d3d96569eb8de839e9b4d3bcef3a495956d75a5b..55eef4ab095fb68f7527d8be90c438bf76015f30 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); } diff --git a/tests/UI/specs/SegmentSelectorEditor_spec.js b/tests/UI/specs/SegmentSelectorEditor_spec.js index dfd015efd740f6237a227516c3e8515ac653e3e7..4c85e89c24e2cf45acc5be84d25439d14b4299b8 100644 --- a/tests/UI/specs/SegmentSelectorEditor_spec.js +++ b/tests/UI/specs/SegmentSelectorEditor_spec.js @@ -30,6 +30,7 @@ describe("SegmentSelectorEditorTest", function () { it("should open segment editor when edit link clicked for existing segment", function (done) { expect.screenshot("2_segment_editor_update").to.be.captureSelector(selectorsToCapture, function (page) { page.click('.segmentList .editSegment:first'); + page.wait(1000); }, done); }); diff --git a/tests/lib/screenshot-testing/support/app.js b/tests/lib/screenshot-testing/support/app.js index 4617112bafca246917aa94a0ccd3103499f9be52..85a3ec7a0c59abe97b7dbfcaa5e9b83710edffa2 100644 --- a/tests/lib/screenshot-testing/support/app.js +++ b/tests/lib/screenshot-testing/support/app.js @@ -142,7 +142,7 @@ Application.prototype.loadTestModules = function () { // we apply this option only if not a specific plugin or test suite was requested. Only there for travis to // split tests into multiple jobs. var numTestsFirstHalf = Math.round(mocha.suite.suites.length / 2); - numTestsFirstHalf += 7; + numTestsFirstHalf += 8; mocha.suite.suites = mocha.suite.suites.filter(function (suite, index) { if (options['run-first-half-only'] && index < numTestsFirstHalf) { return true; @@ -264,4 +264,4 @@ Application.prototype.appendMissingExpected = function (screenName) { fs.write(missingExpectedFilePath, screenName + "\n", "a"); }; -exports.Application = new Application(); \ No newline at end of file +exports.Application = new Application();