Files
jiu/client/test/golden/goldens/m_inventory_check_b.png
T
wangjia f9ba81ae43 fix(golden): 冻结应用时钟消除时间依赖非确定性(product_detail/license/inventory_check)
golden 失败根因:商品详情屏用实时 DateTime.now() 算「近30天出库」,随真实时间推移
6月流水掉出30天窗口→渲染变化→对不上。license/inventory_check 同理(剩余天数/盘点日期)。
修复:
- product_detail_screen: DateTime.now() → appNow()(可注入时钟)
- golden_harness: 所有 golden 渲染前冻结 appClock=2026-07-01 + tearDown 复位(ds-flow 钉死动态值)
- 重录 license_mobile / m_inventory_check 6 张 golden;product_detail 冻结后自动匹配无需改图
本地 flutter test test/golden/ 全 120 通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9G7E3wmAYL9KeYCVZVsqu
2026-07-18 19:53:17 +08:00

63 KiB
780x1688px