test: add mobile screenshot test, failing on webkit and firefox (#354)

This commit is contained in:
Joel Einbinder 2020-01-02 15:28:14 -08:00 committed by Pavel Feldman
parent 27c018da65
commit 26538d6aec
4 changed files with 10 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -145,6 +145,16 @@ module.exports.describe = function({testRunner, expect, product, FFOX, CHROME, W
});
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() {