test: add mobile screenshot test, failing on webkit and firefox (#354)
This commit is contained in:
parent
27c018da65
commit
26538d6aec
BIN
test/golden-chromium/screenshot-mobile.png
Normal file
BIN
test/golden-chromium/screenshot-mobile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
test/golden-firefox/screenshot-mobile.png
Normal file
BIN
test/golden-firefox/screenshot-mobile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
test/golden-webkit/screenshot-mobile.png
Normal file
BIN
test/golden-webkit/screenshot-mobile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
|
|
@ -145,6 +145,16 @@ module.exports.describe = function({testRunner, expect, product, FFOX, CHROME, W
|
||||||
});
|
});
|
||||||
expect(Buffer.from(screenshot, 'base64')).toBeGolden('screenshot-sanity.png');
|
expect(Buffer.from(screenshot, 'base64')).toBeGolden('screenshot-sanity.png');
|
||||||
});
|
});
|
||||||
|
it.skip(WEBKIT || FFOX)('should work with a mobile viewport', async({page, server}) => {
|
||||||
|
await page.setViewport({
|
||||||
|
width: 320,
|
||||||
|
height: 480,
|
||||||
|
isMobile: true
|
||||||
|
});
|
||||||
|
await page.goto(server.PREFIX + '/grid.html');
|
||||||
|
const screenshot = await page.screenshot();
|
||||||
|
expect(screenshot).toBeGolden('screenshot-mobile.png');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('ElementHandle.screenshot', function() {
|
describe('ElementHandle.screenshot', function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue