fix: 修复DOCX独立封面视觉门禁

统一 Chromium 与 DOCX 的受限高度封面布局,补齐可编辑边框、装饰边和 Office 页面舍入适配。

按四套独立封面主题、纵横方向及五组页边距执行 40 个 Word/WPS 真实视觉场景,严格失败为 0,并保留正文诊断供 D4 修复。
This commit is contained in:
SkyJourney
2026-08-03 18:15:21 +08:00
parent 9dee7e8605
commit b275c671fc
19 changed files with 785 additions and 82 deletions
@@ -330,6 +330,14 @@ describe("DOCX 主题令牌归一化", () => {
expect(
findSlot(tokens, "tender-cover").style.borders?.top?.widthPt
).toBe(20);
expect(findSlot(tokens, "tender-cover").style).toMatchObject({
outline: {
widthPt: 0.75,
color: "#777777",
style: "single"
},
outlineOffsetPt: -12
});
expect(
tokens.diagnostics.some(
(entry) =>
@@ -343,7 +351,7 @@ describe("DOCX 主题令牌归一化", () => {
(entry) =>
entry.slot === "tender-cover" &&
entry.property === "outline" &&
entry.code === "css-property-unsupported"
entry.code === "layout-approximated"
)
).toBe(true);
});