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

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

Merged
merged 1 commit into from
Apr 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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