Skip to content

Commit c075b31

Browse files
committed
Disable test which compares two images until we find a stable way of doing that across browsers
1 parent dc2b49c commit c075b31

File tree

3 files changed

+33
-36
lines changed

3 files changed

+33
-36
lines changed

test/smokeTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const fs = require("fs");
77
const http = require("http");
88
const puppeteer = require("puppeteer");
99

10-
const webserverPort = 8000;
10+
const webserverPort = 8099;
1111

1212
if (process.argv.length !== 3) {
1313
console.log("Usage: smokeTest.js csscriticLoadingHtmlPage");

test/specs/.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"jasmine": true,
66
"describe": true,
77
"it": true,
8+
"xit": true,
89
"beforeEach": true,
910
"afterEach": true,
1011
"runs": true,

test/specs/integrationSpec.js

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -197,43 +197,39 @@ describe("Integration", function () {
197197
}
198198
);
199199

200-
ifNotInWebkitIt(
201-
"should store a reference when a result is accepted",
202-
function (done) {
203-
var testPageUrl = testHelper.fixture("pageUnderTest.html"),
204-
reporter = jasmine.createSpyObj("Reporter", [
205-
"reportComparison",
206-
]);
200+
// Disabled, as we cannot compare the serialized image across browsers. Same image has different serialisations
201+
xit("should store a reference when a result is accepted", function (done) {
202+
var testPageUrl = testHelper.fixture("pageUnderTest.html"),
203+
reporter = jasmine.createSpyObj("Reporter", ["reportComparison"]);
207204

208-
csscritic.addReporter(reporter);
209-
csscritic.add(testPageUrl);
210-
csscritic.execute().then(function (passed) {
211-
expect(passed).toBe(false);
212-
expect(reporter.reportComparison).toHaveBeenCalledWith(
213-
jasmine.any(Object)
214-
);
215-
216-
reporter.reportComparison.calls
217-
.mostRecent()
218-
.args[0].resizePageImage(330, 151)
219-
.then(function () {
220-
reporter.reportComparison.calls
221-
.mostRecent()
222-
.args[0].acceptPage();
223-
224-
readReferenceImage(testPageUrl).then(function (
225-
referenceObj
226-
) {
227-
expect(referenceObj.imageUri).toEqual(
228-
theReferenceImageUri
229-
);
230-
231-
done();
232-
});
205+
csscritic.addReporter(reporter);
206+
csscritic.add(testPageUrl);
207+
csscritic.execute().then(function (passed) {
208+
expect(passed).toBe(false);
209+
expect(reporter.reportComparison).toHaveBeenCalledWith(
210+
jasmine.any(Object)
211+
);
212+
213+
reporter.reportComparison.calls
214+
.mostRecent()
215+
.args[0].resizePageImage(330, 151)
216+
.then(function () {
217+
reporter.reportComparison.calls
218+
.mostRecent()
219+
.args[0].acceptPage();
220+
221+
readReferenceImage(testPageUrl).then(function (
222+
referenceObj
223+
) {
224+
expect(referenceObj.imageUri).toEqual(
225+
theReferenceImageUri
226+
);
227+
228+
done();
233229
});
234-
});
235-
}
236-
);
230+
});
231+
});
232+
});
237233

238234
ifNotInWebkitIt(
239235
"should properly report a failing comparison",

0 commit comments

Comments
 (0)