From 246059af4c37f4c1275247dcf88a5dc90b339a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 24 Sep 2026 16:25:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E6=A0=87=E7=AD=BE=E7=94=A8=E4=BE=8B=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/workflowCompletionNotice.test.ts 改为遍历 UI_EDITOR_STEPS 逐一比对 workflowStepLabel(step.id) 与 step.label,断言里写死的 reference-analysis 步骤已在「前端移除分析参考图步骤与界面图元编辑」中退役,导致用例在 HEAD 上必然失败 --- .../tests/workflowCompletionNotice.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts b/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts index af3f2d1cc..ca52a001f 100644 --- a/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts +++ b/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts @@ -4,6 +4,7 @@ import { appendWorkflowCheckPrompt, workflowStepLabel, } from '../src/view/ui-editor/components/workflowCompletionNotice'; +import { UI_EDITOR_STEPS } from '../src/view/ui-editor/model'; describe('workflow completion notice helpers', () => { it('appends the review prompt to a terminal status', () => { @@ -12,9 +13,10 @@ describe('workflow completion notice helpers', () => { ); }); - it('maps every workflow step to a user-facing label', () => { - expect(workflowStepLabel('reference-analysis')).toBe('分析参考图'); - expect(workflowStepLabel('structure-recognition')).toBe('识别界面结构'); - expect(workflowStepLabel('asset-separation')).toBe('自动切分素材'); + it('maps every catalog step to its user-facing label', () => { + // 按步骤目录取标签:步骤退役或新增时用例会跟着目录走,不再断言已删除的步骤。 + for (const step of UI_EDITOR_STEPS) { + expect(workflowStepLabel(step.id)).toBe(step.label); + } }); });