feat: 增加顺运宝批量 AI 规格匹配 (#202)
This commit is contained in:
@@ -162,8 +162,12 @@ func TestSybStageFor_全部筛选阶段与逐行推导一致(t *testing.T) {
|
||||
{SybStagePurchaseBlocked, "核对采购数量", copyWith(func(c *repository.SybOrderContext) { c.Order.Quantity = 0 })},
|
||||
{SybStagePurchaseReady, "创建采购任务", ready},
|
||||
}
|
||||
if got := len(SybStageOptions()) - 1; got != len(cases) {
|
||||
t.Fatalf("筛选项有 %d 个业务阶段,但测试只覆盖 %d 个", got, len(cases))
|
||||
// AI 规格匹配是映射来源筛选,不会取代订单当前的业务阶段。
|
||||
if got := len(SybStageOptions()) - 1; got != len(cases)+1 {
|
||||
t.Fatalf("筛选项有 %d 个业务阶段或来源筛选,但测试覆盖 %d 个业务阶段", got, len(cases))
|
||||
}
|
||||
if ParseSybStage(SybStageAIMatched) != SybStageAIMatched || SybStageLabel(SybStageAIMatched) != "AI规格匹配" {
|
||||
t.Fatal("AI 规格匹配筛选项未正确注册")
|
||||
}
|
||||
for _, tc := range cases {
|
||||
stage, text, _, action := sybStageFor(tc.context)
|
||||
|
||||
Reference in New Issue
Block a user