import puppeteer from "puppeteer-core"; const browser = await puppeteer.launch({ executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", headless: "new", args: ["--no-sandbox", "--disable-gpu"], }); const page = await browser.newPage(); await page.setViewport({ width: 1280, height: 900 }); const res = await fetch("http://pocketbase-zinlbpsext2ro0lgb2558vfy.169.239.180.130.sslip.io/api/collections/users/auth-with-password", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ identity: "david@rjbulk.local", password: "ChangeMe123!" }), }); const { token } = await res.json(); await page.setCookie({ name: "pb_auth", value: token, domain: "localhost", path: "/" }); await page.goto("http://localhost:4004/customers", { waitUntil: "networkidle2" }); await page.screenshot({ path: "/tmp/rjbulk-screens/30-customers-after-migrate.png" }); console.log("✓ customers list"); await page.goto("http://localhost:4004/pricing", { waitUntil: "networkidle2" }); await page.screenshot({ path: "/tmp/rjbulk-screens/31-pricing-after-migrate.png" }); console.log("✓ pricing"); await page.goto("http://localhost:4004/suppliers", { waitUntil: "networkidle2" }); await page.screenshot({ path: "/tmp/rjbulk-screens/32-suppliers-after-migrate.png" }); console.log("✓ suppliers"); await browser.close();