Permalink
Browse files

Fix #41: Details on res object returned to webdrivercss callback

Also fixed missing `header[0]` code in assertion.
  • Loading branch information...
1 parent 22a6b1a commit 6e86b55fe45d57e191c7524d98cb57cfda16bf39 @klamping klamping committed Feb 26, 2016
Showing with 20 additions and 1 deletion.
  1. +20 −1 README.md
View
@@ -192,14 +192,33 @@ describe('my website should always look the same',function() {
assert.ifError(err);
// this will break the test if screenshot is not within the mismatch tolerance
- assert.ok(res.isWithinMisMatchTolerance);
+ assert.ok(res.header[0].isWithinMisMatchTolerance);
})
.call(done);
});
// ...
```
+The `res` variable will be an object containing details on the screenshots taken. It will have properties matching each element name, and the value of those properties will contain an array of screenshots at each resolution.
+
+For example, the `res` object for the code above would be:
+
+```js
+{
+ header: [
+ {
+ baselinePath: 'webdrivercss/header.header.baseline.png',
+ message: 'mismatch tolerance not exceeded (~0), baseline didn\'t change',
+ misMatchPercentage: 0,
+ isExactSameImage: true,
+ isSameDimensions: true,
+ isWithinMisMatchTolerance: true
+ }
+ ]
+}
+```
+
### [Applitools Eyes](http://applitools.com) Support
![Applitools Eyes](http://pravdam.biz/clientblogs/applitools2/applitools-new-logo.png)

0 comments on commit 6e86b55

Please sign in to comment.