fix(client): 出入库录单 golden 随日期漂移——表单支持钉死单据日期
根因:表单 _orderDate 默认 DateTime.now(),golden 07-04 录制后每天必挂 (整屏 diff 只有日期格一个数字)。表单加 initialDate 测试注入口, golden 测试钉死 2026-07-04,基准图零重录、永不随日期漂移。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
@@ -73,7 +73,7 @@ void main() {
|
||||
goldenAcrossThemes(
|
||||
'stock-in form 录单(桌面)',
|
||||
goldenPrefix: 'stock_in_form',
|
||||
child: () => const Scaffold(body: StockInFormScreen()),
|
||||
child: () => Scaffold(body: StockInFormScreen(initialDate: DateTime(2026, 7, 4))),
|
||||
overrides: _overrides,
|
||||
logical: const Size(1280, 920),
|
||||
);
|
||||
@@ -81,7 +81,7 @@ void main() {
|
||||
goldenAcrossThemes(
|
||||
'stock-in form 录单(移动)',
|
||||
goldenPrefix: 'stock_in_form_mobile',
|
||||
child: () => const Scaffold(body: StockInFormScreen()),
|
||||
child: () => Scaffold(body: StockInFormScreen(initialDate: DateTime(2026, 7, 4))),
|
||||
overrides: _overrides,
|
||||
logical: const Size(390, 1400),
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ void main() {
|
||||
goldenAcrossThemes(
|
||||
'stock-out form 录单(桌面)',
|
||||
goldenPrefix: 'stock_out_form',
|
||||
child: () => const Scaffold(body: StockOutFormScreen()),
|
||||
child: () => Scaffold(body: StockOutFormScreen(initialDate: DateTime(2026, 7, 4))),
|
||||
overrides: _overrides,
|
||||
logical: const Size(1280, 920),
|
||||
);
|
||||
@@ -61,7 +61,7 @@ void main() {
|
||||
goldenAcrossThemes(
|
||||
'stock-out form 录单(移动)',
|
||||
goldenPrefix: 'stock_out_form_mobile',
|
||||
child: () => const Scaffold(body: StockOutFormScreen()),
|
||||
child: () => Scaffold(body: StockOutFormScreen(initialDate: DateTime(2026, 7, 4))),
|
||||
overrides: _overrides,
|
||||
logical: const Size(390, 1400),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user