diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-04 17:17:54 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-04 17:17:54 +0400 |
commit | 28f2e682eab325a3cc4df7b638baf30b2a83d7a8 (patch) | |
tree | 2c26aea0c6a1f80c9cb8e6013e8e8728af11e6f7 | |
parent | 1fba3d06c3f83d54f64fbc1c165ccab5ccb1b64e (diff) |
Add missing links to screenshot test readme and attempt to diagnose build timeout on travis.
m--------- | tests/PHPUnit/UI | 0 | ||||
-rw-r--r-- | tests/README.screenshots.md | 8 | ||||
-rw-r--r-- | tests/lib/screenshot-testing/support/diff-viewer.js | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI -Subproject 7efac48be5caac0f0f1e8c0a71a13f206b8da1b +Subproject 69ef35b349a1dd3217dc2bef778f265d421908f diff --git a/tests/README.screenshots.md b/tests/README.screenshots.md index 5cbe305abe..af1c451d1d 100644 --- a/tests/README.screenshots.md +++ b/tests/README.screenshots.md @@ -35,6 +35,8 @@ To fix a broken build, follow these steps: Then "Save this file as" and save it in the piwik/tests/PHPUnit/UI/expected-ui-screenshots/ directory. (If the screenshot test is for a plugin and not Piwik Core, the expected screenshot should be added to the plugin's expected screenshot directory. For example: piwik/plugins/DBStats/tests/UI/expected-ui-screenshots.) + + _Note: When determining whether a screenshot is correct, the data displayed is not important. Report data correctness is verified through Integration and other PHP tests. The UI tests should only test UI behavior._ * Push the changes (to your code and/or to the expected-ui-screenshots directory. * Wait for next UI Tests build [on travis](https://travis-ci.org/piwik/piwik-ui-tests). Hopefully, the build should be green! @@ -88,13 +90,13 @@ The following options may be useful if you plan on running the UI tests locally ## Writing Tests -UI screenshot tests are run directly by phantomjs and are written using [mocha]() and [chai](). +UI screenshot tests are run directly by phantomjs and are written using [mocha](http://visionmedia.github.io/mocha/) and [chai](http://chaijs.com). -To create a new test, first decide whether it will belong to Piwik Core or a plugin. If it will belong to Piwik Core, the test should be placed within the [piwik-ui-tests]() repository. Otherwise, it should be placed within tests/UI sub-directory of your plugin. +To create a new test, first decide whether it will belong to Piwik Core or a plugin. If it will belong to Piwik Core, the test should be placed within the [piwik-ui-tests](https://github.com/piwik/piwik-ui-tests) repository. Otherwise, it should be placed within tests/UI sub-directory of your plugin. All test files should have \_spec.js file name suffixes (for example, **ActionsDataTable\_spec.js**). -Tests should be written using [BDD]() style, for example: +Tests should be written using [BDD](http://en.wikipedia.org/wiki/Behavior-driven_development) style, for example: describe("TheControlImTesting", function () { // ... diff --git a/tests/lib/screenshot-testing/support/diff-viewer.js b/tests/lib/screenshot-testing/support/diff-viewer.js index bca0d1b55d..1cb1f2e2f8 100644 --- a/tests/lib/screenshot-testing/support/diff-viewer.js +++ b/tests/lib/screenshot-testing/support/diff-viewer.js @@ -123,7 +123,11 @@ DiffViewerGenerator.prototype.generateDiffs = function (callback, i) { if (i >= this.failures.length || !this.isCompareAvailable ) { - callback(); + try { + callback(); + } catch (ex) { + console.error("Failed to generate diffviewer: " + ex.stack); + } return; } |