Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Aubry <mattab@users.noreply.github.com>2016-10-06 05:10:50 +0300
committerGitHub <noreply@github.com>2016-10-06 05:10:50 +0300
commitd4ad50fc0f5c24ecb1e25703c9aa284e359120cb (patch)
tree032f5d4ad24a2193dbd191649f4b9724c860777e
parent2ffda92c7dcc381a9ddbfce60c82b0c7cf9169fe (diff)
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
-rw-r--r--plugins/Dashboard/javascripts/widgetMenu.js6
-rw-r--r--tests/UI/specs/SegmentSelectorEditor_spec.js1
-rw-r--r--tests/lib/screenshot-testing/support/app.js4
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();