S1 双主题: styles.css Dashboard 区(.recent-row/.shortcut/.tip)迁入 design-restraint.css, 暖米旧 token→restraint(--orange→--heat 等);修 .queue-chip svg --ink-3→--black-alpha-56。 实测 .shortcut .ic 橙 = rgb(250,93,25)=--heat(原泄漏成暖橙 #E55B26) S2 mono: design-restraint.css 加 .mono-10/11/12(10.5/11/11.5px)工具类(逐页应用并入 Wave 4) S7 分页器: pager.tsx 加可选 onPageSizeChange(条数循环)/跳页输入/sticky,旧调用方零破坏; CSS 加 .size-cycle/.jump/.sticky(接线 products/library + 服务端分页放 Wave 3) S8 hero 字重: 核 V1 实测 account/team hero 数字均 font-weight:700 → account 3 处 + team 2 处 改 700(据实还原 V1 标准答案;记录与 design.md §2.5 的内部不一致) S6 批量栏共享挪 Wave 3(与 projects/library 重建一起做) 验证: tsc 0 · build 0 · computed-style 橙=heat/字重=700 · pixelmatch account 1.23%/team 2.13% · 14 路由回归 boot 0 报错 · 登录 639ms Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
46 lines
1.9 KiB
JavaScript
46 lines
1.9 KiB
JavaScript
// Wave 1 part-2 verify (scratch): S1 dashboard 橙=--heat / S8 hero 字重=700 / 截图.
|
|
import { chromium } from "playwright";
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
|
|
const BASE = process.env.BASE || "http://localhost:5173";
|
|
const TOKEN = process.env.TOKEN || "";
|
|
const OUT = path.resolve("../../../_qa_shots/wave1b");
|
|
fs.mkdirSync(OUT, { recursive: true });
|
|
|
|
const browser = await chromium.launch({ headless: true });
|
|
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 }, colorScheme: "light" });
|
|
const seed = await ctx.newPage();
|
|
await seed.goto(BASE + "/", { waitUntil: "domcontentloaded" });
|
|
await seed.evaluate((t) => localStorage.setItem("airshelf_token", t), TOKEN);
|
|
await seed.close();
|
|
|
|
const r = {};
|
|
async function shot(route, name, fn) {
|
|
const p = await ctx.newPage();
|
|
await p.goto(BASE + route, { waitUntil: "load" });
|
|
await p.waitForTimeout(1500);
|
|
r[name] = await fn(p);
|
|
await p.screenshot({ path: path.join(OUT, `${name}.png`) });
|
|
await p.close();
|
|
}
|
|
|
|
await shot("/dashboard", "dashboard", async (p) => {
|
|
const ic = p.locator(".shortcut .ic").first();
|
|
return {
|
|
shortcutIcColor: await ic.evaluate((el) => getComputedStyle(el).color).catch(() => "n/a"),
|
|
shortcutIcBg: await ic.evaluate((el) => getComputedStyle(el).backgroundColor).catch(() => "n/a"),
|
|
tipColor: await p.locator(".tip").first().evaluate((el) => getComputedStyle(el).color).catch(() => "n/a"),
|
|
};
|
|
});
|
|
await shot("/account", "account", async (p) => ({
|
|
balanceWeight: await p.locator(".balance-hero .v").first().evaluate((el) => getComputedStyle(el).fontWeight).catch(() => "n/a"),
|
|
}));
|
|
await shot("/team", "team", async (p) => ({
|
|
bannerNmWeight: await p.locator(".banner-id .nm").first().evaluate((el) => getComputedStyle(el).fontWeight).catch(() => "n/a"),
|
|
}));
|
|
|
|
await browser.close();
|
|
console.log(JSON.stringify(r, null, 2));
|
|
// 参照:--heat #fa5d19 = rgb(250, 93, 25);旧暖橙 #E55B26 = rgb(229, 91, 38)
|