diff --git a/.changelog/2053.trivial.md b/.changelog/2053.trivial.md new file mode 100644 index 0000000000..6c24ecd3ce --- /dev/null +++ b/.changelog/2053.trivial.md @@ -0,0 +1 @@ +Update screenshot size diff --git a/playwright/screenshots/chrome-webstore-screenshots.spec.ts b/playwright/screenshots/chrome-webstore-screenshots.spec.ts index f600edcac8..c62d286998 100644 --- a/playwright/screenshots/chrome-webstore-screenshots.spec.ts +++ b/playwright/screenshots/chrome-webstore-screenshots.spec.ts @@ -10,12 +10,12 @@ const screenshotCss = ` ` const chromeWebStoreDimensions = { - width: 1200, + width: 1280, height: 800, } /** Scale for higher quality larger screenshots */ -const deviceScaleFactor = (chromeWebStoreDimensions.height - 20) / extensionViewport.height +const deviceScaleFactor = chromeWebStoreDimensions.height / extensionViewport.height test.use({ deviceScaleFactor: deviceScaleFactor, viewport: { @@ -36,7 +36,7 @@ async function setup(page: Page, url: string) { } iframe { width: ${extensionViewport.width}px; - height: ${extensionViewport.height}px; + height: ${extensionViewport.height * 0.975}px; border: 5px solid #0500e2; } @@ -53,6 +53,9 @@ test.beforeEach(async ({ context }) => { }) test('make screenshots for Chrome Web Store', async ({ page }) => { + expect(page.viewportSize()!.width * deviceScaleFactor).toBe(chromeWebStoreDimensions.width) + expect(page.viewportSize()!.height * deviceScaleFactor).toBe(chromeWebStoreDimensions.height) + const frame = await setup(page, `/`) await page.screenshot({ path: './screenshots/extension-store-1.png', diff --git a/playwright/screenshots/extension-store-1.png b/playwright/screenshots/extension-store-1.png index 3ac9a8e14f..cb0bad006e 100644 Binary files a/playwright/screenshots/extension-store-1.png and b/playwright/screenshots/extension-store-1.png differ diff --git a/playwright/screenshots/extension-store-2.png b/playwright/screenshots/extension-store-2.png index 42ae69191b..83221644c7 100644 Binary files a/playwright/screenshots/extension-store-2.png and b/playwright/screenshots/extension-store-2.png differ diff --git a/playwright/screenshots/extension-store-3.png b/playwright/screenshots/extension-store-3.png index c227307085..3b63867da6 100644 Binary files a/playwright/screenshots/extension-store-3.png and b/playwright/screenshots/extension-store-3.png differ diff --git a/playwright/screenshots/extension-store-4.png b/playwright/screenshots/extension-store-4.png index ae07c542e4..83606e4762 100644 Binary files a/playwright/screenshots/extension-store-4.png and b/playwright/screenshots/extension-store-4.png differ diff --git a/playwright/screenshots/extension-store-5.png b/playwright/screenshots/extension-store-5.png index f862db4135..0bc01a155a 100644 Binary files a/playwright/screenshots/extension-store-5.png and b/playwright/screenshots/extension-store-5.png differ diff --git a/playwright/screenshots/extension-store-6.png b/playwright/screenshots/extension-store-6.png index 7a56f2ac0b..b8c08694f2 100644 Binary files a/playwright/screenshots/extension-store-6.png and b/playwright/screenshots/extension-store-6.png differ diff --git a/playwright/screenshots/extension-store-7.png b/playwright/screenshots/extension-store-7.png index e7c4add481..b05edefe6d 100644 Binary files a/playwright/screenshots/extension-store-7.png and b/playwright/screenshots/extension-store-7.png differ diff --git a/playwright/screenshots/extension-store-8.png b/playwright/screenshots/extension-store-8.png index 66fbfa7c15..8a140e779a 100644 Binary files a/playwright/screenshots/extension-store-8.png and b/playwright/screenshots/extension-store-8.png differ