fix(webkit): fix non-mac screenshots w/ dsf (#1665)
This commit is contained in:
parent
a91304a37a
commit
17039f1649
|
|
@ -10,7 +10,7 @@
|
||||||
"playwright": {
|
"playwright": {
|
||||||
"chromium_revision": "754895",
|
"chromium_revision": "754895",
|
||||||
"firefox_revision": "1069",
|
"firefox_revision": "1069",
|
||||||
"webkit_revision": "1187"
|
"webkit_revision": "1188"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ctest": "cross-env BROWSER=chromium node test/test.js",
|
"ctest": "cross-env BROWSER=chromium node test/test.js",
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ function compareImages(actualBuffer, expectedBuffer, mimeType) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const diff = new PNG({width: expected.width, height: expected.height});
|
const diff = new PNG({width: expected.width, height: expected.height});
|
||||||
const count = pixelmatch(expected.data, actual.data, diff.data, expected.width, expected.height, {threshold: 0.15});
|
const count = pixelmatch(expected.data, actual.data, diff.data, expected.width, expected.height, {threshold: 0.2});
|
||||||
return count > 0 ? { diff: PNG.sync.write(diff) } : null;
|
return count > 0 ? { diff: PNG.sync.write(diff) } : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ module.exports.describe = function({testRunner, expect, product, playwright, FFO
|
||||||
expect(screenshot).toBeInstanceOf(Buffer);
|
expect(screenshot).toBeInstanceOf(Buffer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
it.fail(WEBKIT)('should work with device scale factor', async({browser, server}) => {
|
it('should work with device scale factor', async({browser, server}) => {
|
||||||
const context = await browser.newContext({ viewport: { width: 320, height: 480 }, deviceScaleFactor: 2 });
|
const context = await browser.newContext({ viewport: { width: 320, height: 480 }, deviceScaleFactor: 2 });
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
await page.goto(server.PREFIX + '/grid.html');
|
await page.goto(server.PREFIX + '/grid.html');
|
||||||
|
|
@ -394,7 +394,7 @@ module.exports.describe = function({testRunner, expect, product, playwright, FFO
|
||||||
expect(screenshot).toBeGolden('screenshot-element-mobile.png');
|
expect(screenshot).toBeGolden('screenshot-element-mobile.png');
|
||||||
await context.close();
|
await context.close();
|
||||||
});
|
});
|
||||||
it.fail(WEBKIT && LINUX).skip(FFOX)('should work with device scale factor', async({browser, server}) => {
|
it.skip(FFOX)('should work with device scale factor', async({browser, server}) => {
|
||||||
const context = await browser.newContext({ viewport: { width: 320, height: 480 }, deviceScaleFactor: 2 });
|
const context = await browser.newContext({ viewport: { width: 320, height: 480 }, deviceScaleFactor: 2 });
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
await page.goto(server.PREFIX + '/grid.html');
|
await page.goto(server.PREFIX + '/grid.html');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue