import { test, expect } from "@playwright/test"; import { noConsoleErrors } from "./helpers"; test("landing and auth pages have no horizontal overflow on mobile", async ({ page }) => { const errors = await noConsoleErrors(page); for (const path of ["/", "/login", "/signup", "/forgot-password"]) { await page.goto(path); const overflow = await page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth); expect(overflow, `${path} overflows horizontally by ${overflow}px`).toBeLessThanOrEqual(1); } expect(errors).toEqual([]); });