feat: 完善采购任务安全恢复 (#73)

This commit is contained in:
chengma
2026-08-10 00:27:52 +08:00
parent d6339a810f
commit c86c7482d9
15 changed files with 786 additions and 12 deletions
+14
View File
@@ -119,6 +119,20 @@ class TaskDetailViewTest(unittest.TestCase):
self.assertEqual(data.current_step, "未知步骤")
def test_purchase_recovery_steps_are_clear_chinese(self):
cases = {
"purchase_dry_run_stopped": "采购演练已在提交前停止",
"reconcile_purchase": "只允许核对订单",
"reconcile_manual_review": "核对结果不确定,需人工处理",
}
for step, expected in cases.items():
with self.subTest(step=step):
detail = replace(make_detail(), current_step=step)
self.assertEqual(
build_task_detail_view_data(detail).current_step,
expected,
)
def test_window_builds_color_section_before_size_section(self):
window = TaskDetailWindow(make_detail(collected_data()))