From 435213a0e31ddaf94133cf84cf6c1370393f9d39 Mon Sep 17 00:00:00 2001 From: seaislee1209 Date: Sun, 21 Jun 2026 21:43:54 +0800 Subject: [PATCH] =?UTF-8?q?test(qa):=20=E5=9B=BE=E7=89=87=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=8D=A1=E4=B8=89=E5=8D=A1=E5=86=85=E5=AE=B9=E8=B4=B4?= =?UTF-8?q?=E5=B7=A6=E6=A0=B8=E9=AA=8C=E8=84=9A=E6=9C=AC(=E5=AD=98?= =?UTF-8?q?=E6=A1=A3,=E6=B8=85=E7=90=86=E8=80=81=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E5=B9=B2=E5=87=80=E5=9B=9E=E9=80=80=E7=82=B9?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- core/qa/visual-parity/_factory-all.mjs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 core/qa/visual-parity/_factory-all.mjs 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