test: rebaseline mobile viewport screenshot (#462)

This commit is contained in:
Pavel Feldman 2020-01-10 22:34:17 -08:00 committed by GitHub
parent 69fe6ece43
commit 16cedfe9da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 1 deletions

22
test/assets/overflow.html Normal file
View File

@ -0,0 +1,22 @@
<style>
body { margin: 0; padding: 0; }
div {
display: inline-flex;
width: 50px;
height: 50px;
border-right: 1px solid black;
border-bottom: 1px solid black;
}
</style>
<body></body>
<script>
const colors = ['#222', '#444', '#666', '#888', '#aaa'];
for (let i = 0; i < 200; ++i) {
const div = document.createElement('div');
div.style.setProperty('background-color', colors[i % 5]);
document.body.appendChild(div);
}
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -159,7 +159,7 @@ module.exports.describe = function({testRunner, expect, product, FFOX, CHROME, W
height: 480,
isMobile: true
});
await page.goto(server.PREFIX + '/grid.html');
await page.goto(server.PREFIX + '/overflow.html');
const screenshot = await page.screenshot();
expect(screenshot).toBeGolden('screenshot-mobile.png');
});