mirror of
https://github.com/microsoft/playwright.git
synced 2024-09-21 01:17:43 +03:00
test: rebaseline mobile viewport screenshot (#462)
This commit is contained in:
parent
69fe6ece43
commit
16cedfe9da
22
test/assets/overflow.html
Normal file
22
test/assets/overflow.html
Normal 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 |
@ -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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user