This commit is contained in:
2026-04-25 22:19:04 +08:00
parent 2ebfd1cf55
commit 8404081d7b
149 changed files with 10508 additions and 2732 deletions

View File

@@ -185,11 +185,30 @@ test('keeps failed draft foundation progress on explicit failure state instead o
expect(progress?.phaseId).toBe('failed');
expect(progress?.phaseLabel).toBe('底稿生成失败');
expect(progress?.phaseDetail).toContain('角色主形象补齐失败');
expect(progress?.overallProgress).toBeLessThan(100);
expect(progress?.estimatedRemainingMs).toBeNull();
expect(progress?.steps.some((step) => step.label === '编译草稿卡')).toBe(true);
expect(progress?.steps.some((step) => step.status === 'active')).toBe(false);
expect(progress?.steps.filter((step) => step.status === 'completed').length).toBeGreaterThan(0);
});
test('estimates draft generation wait time from phase duration model instead of linear progress', () => {
const progress = buildAgentDraftFoundationGenerationProgress(
{
...baseOperation,
phaseLabel: '生成幕背景图',
phaseDetail: '正在生成幕背景图 1/6潮汐码头。',
progress: 98,
updatedAt: '1970-01-01T00:00:01.000Z',
},
1_000,
6_000,
);
expect(progress?.estimatedRemainingMs).toBeGreaterThan(80_000);
expect(progress?.estimatedRemainingMs).toBeLessThan(140_000);
});
test('builds readable draft setting text from creator intent first', () => {
const settingText = buildAgentDraftFoundationSettingText(baseSession);