Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: rebaseline mobile viewport screenshot (#462)
Pavel Feldman16cedfe9da51
diff --git a/test/assets/overflow.html b/test/assets/overflow.htmlnew file mode 100644index 0000000000..9e22894b0e--- /dev/null+++ b/test/assets/overflow.html@@ -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>diff --git a/test/golden-chromium/screenshot-mobile.png b/test/golden-chromium/screenshot-mobile.pngindex 2f3ff8d33e..4ba38135af 100644Binary files a/test/golden-chromium/screenshot-mobile.png and b/test/golden-chromium/screenshot-mobile.png differdiff --git a/test/golden-firefox/screenshot-mobile.png b/test/golden-firefox/screenshot-mobile.pngindex 2f3ff8d33e..4ba38135af 100644Binary files a/test/golden-firefox/screenshot-mobile.png and b/test/golden-firefox/screenshot-mobile.png differdiff --git a/test/golden-webkit/screenshot-mobile.png b/test/golden-webkit/screenshot-mobile.pngindex 6974608cf8..4ba38135af 100644Binary files a/test/golden-webkit/screenshot-mobile.png and b/test/golden-webkit/screenshot-mobile.png differdiff --git a/test/screenshot.spec.js b/test/screenshot.spec.jsindex d2afa03e92..771ab077c1 100644--- a/test/screenshot.spec.js+++ b/test/screenshot.spec.js@@ -159,7 +159,7 @@ module.exports.describe = function({testRunner, expect, product, FFOX, CHROME, Wheight: 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');});