import { test, expect, type Page } from "@playwright/test" const VIEWPORTS = [ { name: "iphone-se", width: 375, height: 667 }, { name: "iphone-14-pro", width: 393, height: 852 }, { name: "ipad-portrait", width: 820, height: 1180 }, { name: "ipad-pro", width: 1024, height: 1366 }, { name: "desktop-1280", width: 1280, height: 800 }, { name: "desktop-1920", width: 1920, height: 1080 }, ] as const const LOCALES = ["en", "ko", "ja", "zh"] as const async function assertNoHorizontalOverflow(page: Page) { const result = await page.evaluate(() => { const docWidth = document.documentElement.scrollWidth const viewportWidth = window.innerWidth return { docWidth, viewportWidth, overflows: docWidth - viewportWidth } }) expect(result.overflows, JSON.stringify(result)).toBeLessThanOrEqual(1) } /** * Asserts every