import { chromium } from "@playwright/test"; const b = await chromium.launch(); for (const [name, vp, mobile] of [["m390", { width: 390, height: 844 }, true], ["desktop", { width: 1440, height: 900 }, false]]) { const p = await b.newPage({ viewport: vp, isMobile: mobile, hasTouch: mobile, deviceScaleFactor: mobile ? 2 : 1 }); for (const path of ["/", "/models", "/security", "/login"]) { await p.goto("https://www.polyllm.io" + path, { waitUntil: "networkidle" }); await p.waitForTimeout(800); await p.screenshot({ path: `qa/out/prod-${name}-${path.replace(/\//g, "") || "home"}.png`, fullPage: path === "/" && !mobile }); } await p.close(); } await b.close(); console.log("shots ok");