Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
Merge pull request #140 from klamping/patch-1
Browse files Browse the repository at this point in the history
Fix #41: Details on res object returned to webdrivercss callback
  • Loading branch information
christian-bromann committed Apr 19, 2016
2 parents 22a6b1a + 6e86b55 commit 712f027
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 712f027

Please sign in to comment.