feat(home): Hero 粒子层改为循环漂移 + 移除「数据驱动」眉标
- hero-particle-field: 由「入场浮现后静止」改为 rAF 持续漂移循环;保留 reduced-motion 静态降级、DPR≤2、粒子封顶 56、品牌红单电压(面积<0.1%)、 离屏/隐藏即停、ResizeObserver 重排、无 2d 上下文安全退出。 - 视觉回归稳定:navigator.webdriver(Playwright 默认 true)下降级为静态帧, 位置由固定种子 mulberry32(0x9e3779b9) 复现,与改动前冻结帧像素一致, 快照基线零漂移,无需更新全站 baseline。 - hero-product-visual: 删除「数据驱动 · 让转型可量化」眉标(含品牌红圆点 div)。 - 同步移除 home-content-v15 对应测试断言;新增粒子层循环路径单测 (修复被前置用例污染的共享 useReducedMotion mock)。 验证:type-check ✅ / lint ✅(0 error) / 单测 ✅(130 套 1631 passed)。 待 CI 确认:视觉回归像素门禁(本沙箱未安装 Playwright 浏览器,未实跑)。
This commit is contained in:
@@ -98,7 +98,7 @@ describe('HomeContentV15 - 浅色 Hero(暗黑模式 token 友好)', () => {
|
||||
expect(hero.querySelector('img')).toBeNull();
|
||||
});
|
||||
|
||||
it('mounts the brand-red dynamic particle layer (entrance-only, no continuous loop)', () => {
|
||||
it('mounts the brand-red dynamic particle layer (continuous drift loop)', () => {
|
||||
render(<HomeContentV15 />);
|
||||
|
||||
const hero = screen.getByTestId('hero-section');
|
||||
@@ -130,7 +130,6 @@ describe('HomeContentV15 - 浅色 Hero(暗黑模式 token 友好)', () => {
|
||||
render(<HomeContentV15 />);
|
||||
|
||||
expect(screen.getByTestId('hero-product-visual')).toBeInTheDocument();
|
||||
expect(screen.getByText('数据驱动 · 让转型可量化')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user