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
path: root/tests
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2016-04-11 02:30:19 +0300
committermattab <matthieu.aubry@gmail.com>2016-04-11 02:30:19 +0300
commit229e4f397cf770385936cd119bc7573a7491fe83 (patch)
tree78e3ab2b4645268e08719744e1fb99b9cc5c325a /tests
parentbc2a35be796c44218568ea2fc8c32073e7ceecb8 (diff)
When a UI test fails that is not a screenshot (eg. a file download), record the failure in the diff generator
so that files are uploaded to the builds artifacts server
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/screenshot-testing/support/chai-extras.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/screenshot-testing/support/chai-extras.js b/tests/lib/screenshot-testing/support/chai-extras.js
index 29c2d4f47b..f0f3130fa2 100644
--- a/tests/lib/screenshot-testing/support/chai-extras.js
+++ b/tests/lib/screenshot-testing/support/chai-extras.js
@@ -274,6 +274,15 @@ function compareContents(compareAgainst, pageSetupFn, done) {
if (processed == expected) {
pass();
} else {
+
+ var testInfo = {
+ name: "URL to reproduce " + pageRenderer.getCurrentUrl(),
+ processed: fs.isFile(processedFilePath) ? processedFilePath : null,
+ expected: fs.isFile(expectedFilePath) ? expectedFilePath : null,
+ baseDirectory: dirsBase
+ };
+ app.diffViewerGenerator.failures.push(testInfo);
+
fail("Processed page contents does not equal expected file contents.");
}
});