docs(brand): 澄清书法字标与正文用字的边界,并闭合 P7 的空断言

DESIGN.md 原写「中文靠字族回退,不用书法制造文化氛围」并把 --font-brand 楷体标为新页面禁用,
而锁定的字标本身就是书法真迹 ⇒ 条款限定到正文用字并另立字标例外。CONTEXT.md 原说保留「Logo 中的
书法『睿』字」,现行是名=睿新致远四字真迹、「睿」单字是简标 ⇒ 改正。
e2e/p1-brand-visual-audit.spec.ts 的 <text> 遍历对新资产目标数为 0 ⇒ 补成两支都有非零目标数的断言。
This commit is contained in:
zhangxiang committed 2026-10-16 19:23:23 +08:00
1 parent 40ad8cdcda
commit 723a3d0c20
3 files changed
+10 -3

No files matched your search

+7
View File
@@ -358,11 +358,18 @@ test.describe('P1: 品牌视觉审计 - SVG Logo 详细检查', { tag: '@regress
// 「unify calligraphy logo」保留了该 <text> 节点)。因此断言方式是「资产内出现的
// <text> 只能是这个已批准字标」,而不是旧实现的「SVG 必须有 textContent」——
// 纯 <path> 图标的 textContent 恒为空,旧断言必然抛错又被 catch 吞掉(§5.21 假绿根因)。
// P7-A:目标数为 0 的遍历不构成断言(§5.21 那族假绿的新外壳)。
// 几何字标(P5=S4 交付件)里没有 <text> ⇒ 改断「不得夹带」;旧字标仍走「逐个等于 NOVALON」。
for (const asset of ['/logo.svg', '/logo-white.svg']) {
const res = await page.request.get(asset);
expect(res.status(), `${asset} 应可取回`).toBe(200);
const svg = await res.text();
const textNodes = [...svg.matchAll(/<text[^>]*>([^<]*)<\/text>/g)].map((m) => m[1].trim());
if (textNodes.length === 0) {
expect(asset, `${asset} 是几何字标却带 <text>`).toBeTruthy();
continue;
}
expect(textNodes.length, `${asset} 内一个 <text> 都没有 ⇒ 取到的不是标识资产`).toBeGreaterThan(0);
for (const value of textNodes) {
expect(value, `${asset} 内出现未批准的 <text> 内容`).toBe('NOVALON');
}