import { chromium } from "playwright"; const TOK = process.argv[2]; const b = await chromium.launch(); const ctx = await b.newContext({ viewport: { width: 1440, height: 900 } }); // check: does loading /exact/model-photo.html mutate the token? const sp = await ctx.newPage(); await sp.goto("http://127.0.0.1:5173/", { waitUntil: "domcontentloaded" }); await sp.evaluate((t) => localStorage.setItem("airshelf_token", t), TOK); const before = await sp.evaluate(() => localStorage.getItem("airshelf_token")?.length); await sp.goto("http://127.0.0.1:5173/exact/model-photo.html", { waitUntil: "networkidle" }); await sp.waitForTimeout(1500); const after = await sp.evaluate(() => localStorage.getItem("airshelf_token")?.length ?? "NULL"); console.log("token before source load:", before, "| after /exact/model-photo.html load:", after); // compare with demo-a source await sp.evaluate((t) => localStorage.setItem("airshelf_token", t), TOK); await sp.goto("http://127.0.0.1:5173/exact/model-photo-demo-a.html", { waitUntil: "networkidle" }); await sp.waitForTimeout(1500); const afterDemo = await sp.evaluate(() => localStorage.getItem("airshelf_token")?.length ?? "NULL"); console.log("after /exact/model-photo-demo-a.html load:", afterDemo); await b.close();