Skip to content

Commit

Permalink
Jimp supersedes GraphicsMagick (#12)
Browse files Browse the repository at this point in the history
wdio-screenshot does no longer need GraphicsMagick as a external dependency (zinserjan/wdio-screenshot#10).
  • Loading branch information
zinserjan authored Aug 29, 2016
1 parent a493012 commit 3d20fb6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

wdio-visual-regression-service uses [wdio-screenshot](https://github.com/zinserjan/wdio-screenshot) for capturing screenhots.

As [wdio-screenshot](https://github.com/zinserjan/wdio-screenshot) depends on [GraphicsMagick](http://www.graphicsmagick.org/) you have to install GraphicsMagick before you can use this. For installation instructions please read the [installation section](https://github.com/zinserjan/wdio-screenshot#installation) of wdio-screenshot.


After these dependencies are installed you can install wdio-screenshot via NPM as usual:
You can install wdio-visual-regression-service via NPM as usual:

```sh
$ npm install wdio-visual-regression-service --save-dev
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"lodash": "^4.13.1",
"node-resemble-js": "0.0.5",
"platform": "^1.3.1",
"wdio-screenshot": "^0.1.0"
"wdio-screenshot": "^0.2.0"
},
"devDependencies": {
"babel-cli": "^6.9.0",
Expand All @@ -49,7 +49,6 @@
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0",
"chai": "^3.5.0",
"gm": "^1.22.0",
"mocha": "^2.4.5",
"phantomjs": "^1.9.20",
"rimraf": "^2.5.2",
Expand Down
14 changes: 6 additions & 8 deletions test/helper/compareImages.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import {
assert
} from 'chai';
import gm from 'gm';
import resemble from 'node-resemble-js';

export default function compareImages(image1, image2) {
return new Promise((resolve, reject) => {
gm.compare(image1, image2, function(err, isEqual, equality, raw) {
if (err) {
return reject(err);
}
assert.isTrue(isEqual);
assert.closeTo(equality, 0, 0.0001);
return new Promise((resolve) => {
const image = resemble(image1).compareTo(image2);
image.onComplete((data) => {
assert.isTrue(data.isSameDimensions);
assert.closeTo(Number(data.misMatchPercentage), 0, 0.0001);
resolve();
});
});
Expand Down

0 comments on commit 3d20fb6

Please sign in to comment.