diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.test.ts b/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.test.ts new file mode 100644 index 000000000..1ea14ec73 --- /dev/null +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.test.ts @@ -0,0 +1,23 @@ +import { describe, expect, it } from 'vitest'; + +import { + appendWorkflowCheckPrompt, + workflowStepLabel, +} from './workflowCompletionNotice'; + +describe('workflow completion notice helpers', () => { + it('appends the review prompt without duplicating it', () => { + expect(appendWorkflowCheckPrompt('已应用 3 条建议。')).toBe( + '已应用 3 条建议,请检查。', + ); + expect(appendWorkflowCheckPrompt('已应用 3 条建议,请检查。')).toBe( + '已应用 3 条建议,请检查。', + ); + }); + + it('maps every workflow step to a user-facing label', () => { + expect(workflowStepLabel('reference-analysis')).toBe('分析参考图'); + expect(workflowStepLabel('structure-recognition')).toBe('识别界面结构'); + expect(workflowStepLabel('visual-binding')).toBe('绑定视觉素材'); + }); +});