/);
assert.doesNotMatch(entryRow, /进度会自动保存/);
});
// 原值:锁手机断点下两张卡的 min-height / grid-template-rows / footer 折行 / action 左对齐
// 新值:pill 行自己会换行并保持居中
// 原因:被锁的那套卡片布局已不存在。原意图是「手机上别用固定高度、别把动作挤到右边」,
// pill 形态下由 flex-wrap 直接满足,不需要断点特判。
test("entry pills wrap instead of needing a phone-specific card layout", () => {
const styles = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
const row = styles.match(/\.starter-entry-row \{([^}]*)\}/);
assert.ok(row);
assert.match(row[1], /flex-wrap:\s*wrap;/);
assert.match(row[1], /justify-content:\s*center;/);
assert.doesNotMatch(styles, /\.daily-starlanguage-card|\.birth-rectification-card/);
});
test("the starter greeting keeps the display stack and display weight", () => {
const styles = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
const heading = styles.match(/\.starter-greeting-block h1 \{([^}]*)\}/)?.[1] ?? "";
// 原值:`.starter-hero h1` 与 `.product-entrypoint-copy h2`,字重 400
// 新值:`.starter-greeting-block h1`,字重 500
// 原因:hero 卡与入口卡下线;字重 400 是衬线时代的值,--font-display 改无衬线后发虚(BUG-737)。
assert.match(heading, /font-family:\s*var\(--font-display\)\s*;/);
assert.match(heading, /font-weight:\s*500\s*;/);
assert.doesNotMatch(heading, /font-family:\s*var\(--font-body\)/);
// 问候不该再是 52px 的落地页大标题,它现在只是输入框上面的一行。
assert.match(heading, /font-size:\s*clamp\(26px,/);
});
test("the starter home hides technical chart parameters", () => {
const source = homeSurface;
const styles = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
// 原值:先 indexOf(' {
// Given: the Agentic rectification chat owns the /api/rectification/agent call.
const chat = readFileSync(new URL("../src/components/rectification-agentic-chat.tsx", import.meta.url), "utf8");
const membershipLib = readFileSync(new URL("../src/lib/membership.ts", import.meta.url), "utf8");
// 原值: 402 后 window.location.assign(membershipHref("rectification"))
// 新值: 留下说明并 onOpenBilling({ source: "rectification" }),不离开当前页
// 原因: 硬跳转清单只能缩小;对话状态不丢
assert.match(chat, /onOpenBilling\?\.\(\{ source: "rectification" \}\)/);
assert.match(chat, /if \(response\.status === 402\) \{[\s\S]*onOpenBilling\?\.\(\{ source: "rectification" \}\)/);
assert.doesNotMatch(chat, /window\.location\.assign\(membershipHref\(/);
assert.doesNotMatch(chat, /咨询点数不足/);
assert.doesNotMatch(chat, /setError\(`咨询点数不足/);
assert.match(membershipLib, /rectification: "生时校正需要点数或会员权益"/);
});