SPB Git forge

spb/polyllm

Public
15commits 1branches 0releases
2.2 MBsize
maindefault branch
14 days agolast push
TypeScript 97.4% SQL 1% JavaScript 0.9% CSS 0.6%
708 B · 14 lines javascript
Raw Blame History
1import { chromium } from "@playwright/test";2const b = await chromium.launch();3for (const [name, vp, mobile] of [["m390", { width: 390, height: 844 }, true], ["desktop", { width: 1440, height: 900 }, false]]) {4  const p = await b.newPage({ viewport: vp, isMobile: mobile, hasTouch: mobile, deviceScaleFactor: mobile ? 2 : 1 });5  for (const path of ["/", "/models", "/security", "/login"]) {6    await p.goto("https://www.polyllm.io" + path, { waitUntil: "networkidle" });7    await p.waitForTimeout(800);8    await p.screenshot({ path: `qa/out/prod-${name}-${path.replace(/\//g, "") || "home"}.png`, fullPage: path === "/" && !mobile });9  }10  await p.close();11}12await b.close();13console.log("shots ok");14