Skip to content

Jimp supersedes GraphicsMagick #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2016
Merged
Show file tree
Hide file tree
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
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