diff options
-rw-r--r-- | plugins/Dashboard/javascripts/widgetMenu.js | 6 | ||||
-rw-r--r-- | tests/UI/specs/SegmentSelectorEditor_spec.js | 1 | ||||
-rw-r--r-- | tests/lib/screenshot-testing/support/app.js | 4 |
3 files changed, 9 insertions, 2 deletions
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); } diff --git a/tests/UI/specs/SegmentSelectorEditor_spec.js b/tests/UI/specs/SegmentSelectorEditor_spec.js index dfd015efd7..4c85e89c24 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 4617112baf..85a3ec7a0c 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(); |