feat(core/frontend): restore ModelPhotoDemoPage A/B static showcase to baselines (§1 last item)
ModelPhotoDemoPage variant A/B pixel-restored to model-photo-demo-a/b.html (product rail + model grid + batch result cards / task-stream layout). Sibling AssetFactoryPage/ImageWorkbenchPage untouched. + QA: shot-aitools.mjs / shot-pipeline.mjs. verified: tsc --noEmit clean; A/B + model-photo screenshots match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2242241c3b
commit
64b0f3a1aa
@@ -0,0 +1,19 @@
|
||||
import { chromium } from "playwright";
|
||||
import { mkdirSync } from "node:fs";
|
||||
const BASE = "http://127.0.0.1:5180", API = "http://127.0.0.1:8010";
|
||||
const OUT = process.argv[2] || "shots-aitools";
|
||||
mkdirSync(OUT, { recursive: true });
|
||||
const tok = (await (await fetch(`${API}/api/auth/login/`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ username: "airshelf", password: "Restraint2026" }) })).json()).token;
|
||||
const pages = [["model-photo", "/model-photo"], ["platform-cover", "/platform-cover"], ["demo-a", "/model-photo/demo-a"], ["demo-b", "/model-photo/demo-b"]];
|
||||
const browser = await chromium.launch();
|
||||
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 }, deviceScaleFactor: 1 });
|
||||
await ctx.addInitScript((t) => localStorage.setItem("airshelf_token", t), tok);
|
||||
const page = await ctx.newPage();
|
||||
for (const [name, route] of pages) {
|
||||
await page.goto(BASE + route, { waitUntil: "networkidle", timeout: 30000 });
|
||||
await page.waitForTimeout(1500);
|
||||
await page.screenshot({ path: `${OUT}/${name}.png`, fullPage: true });
|
||||
console.log("shot", name);
|
||||
}
|
||||
await browser.close();
|
||||
console.log("DONE");
|
||||
Reference in New Issue
Block a user