246059af4c
tests/workflowCompletionNotice.test.ts 改为遍历 UI_EDITOR_STEPS 逐一比对 workflowStepLabel(step.id) 与 step.label,断言里写死的 reference-analysis 步骤已在「前端移除分析参考图步骤与界面图元编辑」中退役,导致用例在 HEAD 上必然失败
23 lines
790 B
TypeScript
23 lines
790 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
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', () => {
|
|
expect(appendWorkflowCheckPrompt('已应用 3 条建议。')).toBe(
|
|
'已应用 3 条建议,请检查。',
|
|
);
|
|
});
|
|
|
|
it('maps every catalog step to its user-facing label', () => {
|
|
// 按步骤目录取标签:步骤退役或新增时用例会跟着目录走,不再断言已删除的步骤。
|
|
for (const step of UI_EDITOR_STEPS) {
|
|
expect(workflowStepLabel(step.id)).toBe(step.label);
|
|
}
|
|
});
|
|
});
|