diff --git a/src/app/(marketing)/solutions/solution-detail-content-v3.test.tsx b/src/app/(marketing)/solutions/solution-detail-content-v3.test.tsx index 2f17952..ca7af17 100644 --- a/src/app/(marketing)/solutions/solution-detail-content-v3.test.tsx +++ b/src/app/(marketing)/solutions/solution-detail-content-v3.test.tsx @@ -140,4 +140,27 @@ describe('SolutionDetailContentV3 - L3 信任层三档策略', () => { expect(screen.getByText('ISO 27001')).toBeInTheDocument(); }); + + /** + * 回归守卫(本仓真实踩到,2026-10-17):把「为什么这样改」的注释直接写在 JSX 子节点位置 + * (`/* ... *\/` 而非 `{/* ... *\/}`)是**合法 JSX**,build 与 1746 例单测全绿, + * 但注释会作为文字节点渲染到页面上。ESLint 的 react/jsx-no-comment-textnodes 是唯一 + * 静态防线,而它被判绿是因为 `npm run lint | tail` 把 EXIT=1 吞成了 0 + * (管道吞退出码,见 docs/lessons-learned.md)。 + * + * 因此这条断言配了**敏感性证明**:先确认两个曾被污染的区域真的渲染了, + * 否则「找不到注释」可能只是「那段 DOM 根本没出现」—— 空断言当守卫是假绿的一种。 + */ + it('does not render source comments as page text (jsx-no-comment-textnodes regression)', () => { + const { container } = render(); + + // 敏感性证明:L164 SolutionsSection 的 eyebrow、L317 SuiteCombinationSection 的中心牌都在 + expect(screen.getByText('Solutions')).toBeInTheDocument(); + expect(screen.getByText('推荐产品组合')).toBeInTheDocument(); + expect(screen.getByText('+')).toBeInTheDocument(); + + // 被验的那一维 + expect(container.textContent).not.toMatch(/\/\*/); + expect(container.textContent).not.toMatch(/\*\//); + }); }); diff --git a/src/app/(marketing)/solutions/solution-detail-content-v3.tsx b/src/app/(marketing)/solutions/solution-detail-content-v3.tsx index e26f11c..fad1ae8 100644 --- a/src/app/(marketing)/solutions/solution-detail-content-v3.tsx +++ b/src/app/(marketing)/solutions/solution-detail-content-v3.tsx @@ -169,8 +169,8 @@ function SolutionsSection({ solutions }: SolutionsSectionProps) {
- /* tracking-[0.4em] 是记档外的裸字面量(--letter-spacing-widest = 0.12em); - 近单色对标的按钮/eyebrow 实测 letterSpacing: normal。收到记档里。 */ + {/* tracking-[0.4em] 是记档外的裸字面量(--letter-spacing-widest = 0.12em); + 近单色对标的按钮/eyebrow 实测 letterSpacing: normal。收到记档里。 */} Solutions @@ -315,9 +315,9 @@ function SuiteCombinationSection({ suiteCombination, products }: SuiteCombinatio - /* 装饰圆改方角牌:rounded-full 只留给功能性的圆(头像/开关钮/滑块), - 这是套件组合图的中心节点装饰,两家对标实测都没有装饰性圆形 */ -
+ {/* 装饰圆改方角牌:rounded-full 只留给功能性的圆(头像/开关钮/滑块), + 这是套件组合图的中心节点装饰,两家对标实测都没有装饰性圆形 */} +
+