All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m2s
- qa/function-audit: playwright 行为审计工具(audit.mjs/verify-modals.mjs/pages.json) + 18 页审计产出(*.audit.md/json、summary、运行日志) - qa/visual-parity: 调试/测量辅助脚本(_dbg*.mjs/_measure.mjs/_off.mjs) - core/还原度核对报告.md: 18 页 pixelmatch 核对结果(含 vite 代理陈旧坑记录) - core/还原与接口待办.md: 逐页还原度/真实数据/交互接入待办总表 - .claude/skills/pixel-perfect-react: 像素级还原 React 的 SKILL 文档 - frontend/public/_devlogin.html: 临时本地登录辅助页(可删) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
1.1 KiB
JavaScript
22 lines
1.1 KiB
JavaScript
import { chromium } from "playwright";
|
|
const TOK = process.argv[2];
|
|
const b = await chromium.launch();
|
|
const ctx = await b.newContext({ viewport: { width: 1440, height: 900 } });
|
|
const p = await ctx.newPage();
|
|
const errs = [];
|
|
p.on("console", m => { if (m.type()==="error") errs.push(m.text().slice(0,120)); });
|
|
p.on("pageerror", e => errs.push("PAGEERR: "+e.message.slice(0,150)));
|
|
await p.goto("http://127.0.0.1:5173/", { waitUntil: "domcontentloaded" });
|
|
await p.evaluate((t) => localStorage.setItem("airshelf_token", t), TOK);
|
|
for (const url of ["http://127.0.0.1:5173/model-photo", "http://127.0.0.1:5173/model-photo/demo-a"]) {
|
|
errs.length = 0;
|
|
await p.goto(url, { waitUntil: "networkidle" });
|
|
await p.waitForTimeout(700);
|
|
const info = await p.evaluate(() => {
|
|
const txt = document.body.innerText || "";
|
|
return { isLogin: txt.includes("AUTH/LOGIN") || txt.includes("使用团队邀请邮箱"), firstWords: txt.replace(/\s+/g," ").slice(0,80) };
|
|
});
|
|
console.log(url.split("5173")[1], JSON.stringify(info), "ERR:", errs.slice(0,3));
|
|
}
|
|
await b.close();
|