让工作流步骤标签用例跟随步骤目录
tests/workflowCompletionNotice.test.ts 改为遍历 UI_EDITOR_STEPS 逐一比对 workflowStepLabel(step.id) 与 step.label,断言里写死的 reference-analysis 步骤已在「前端移除分析参考图步骤与界面图元编辑」中退役,导致用例在 HEAD 上必然失败
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user