diff --git a/core/qa/visual-parity/_factory-all.mjs b/core/qa/visual-parity/_factory-all.mjs new file mode 100644 index 0000000..9df36b7 --- /dev/null +++ b/core/qa/visual-parity/_factory-all.mjs @@ -0,0 +1,20 @@ +import { chromium } from "playwright"; +const b=await chromium.launch({headless:true}); +const p=await (await b.newContext({viewport:{width:1440,height:900}})).newPage(); +const errs=[]; p.on("console",m=>{if(m.type()==="error")errs.push(m.text())}); p.on("pageerror",e=>errs.push("PE:"+e.message)); +await p.goto("http://localhost:5200/login"); await p.waitForTimeout(300); +await p.fill("#auth-username","airshelf"); await p.fill("#auth-pwd","Restraint2026"); +await p.click("button.btn-cta"); await p.waitForFunction(()=>!location.pathname.startsWith("/login"),{timeout:12000}); +await p.goto("http://localhost:5200/asset-factory"); await p.waitForTimeout(1500); +// 量每张卡的内容偏移 +const n=await p.locator(".factory-card").count(); +const offs=[]; +for(let i=0;i