修正创作进度耗时计算

This commit is contained in:
2026-04-26 16:14:46 +08:00
parent 47ef9b9ca6
commit 79048a8c16
2 changed files with 28 additions and 1 deletions

View File

@@ -128,6 +128,19 @@ test('maps running draft_foundation operation to refined generation progress ste
expect(isDraftFoundationOperationRunning(baseOperation)).toBe(true);
});
test('calculates elapsed time from operation startedAt before local fallback', () => {
const progress = buildAgentDraftFoundationGenerationProgress(
{
...baseOperation,
startedAt: '1970-01-01T00:00:01.000Z',
},
4_000,
6_000,
);
expect(progress?.elapsedMs).toBe(5_000);
});
test('maps auto asset phases to refined generation progress steps', () => {
const progress = buildAgentDraftFoundationGenerationProgress(
{