feat(short-drama-agent-front): 新增拆解候选与质量修订

This commit is contained in:
GJ committed 2026-10-17 08:25:16 +08:00
1 parent 49ad08a63e
commit 3414cc8232
32 files changed
+2319 -454

No files matched your search

@@ -1,6 +1,6 @@
import { afterEach, describe, expect, it, vi } from 'vitest'
import { productionApi } from '@/features/production/api'
import { validateProductionScope } from '@/features/production/useAdvancedProduction'
import { productionResumeIssues, validateProductionScope } from '@/features/production/useAdvancedProduction'
import type { ProductionStartInput } from '@/features/production/types'
afterEach(() => vi.unstubAllGlobals())
@@ -59,4 +59,23 @@ describe('生产后端真实请求契约', () => {
validateProductionScope({ startFrom: 'subjectImages', stopAfter: 'subjectImages', videoPromptLimit: 1 })
).toBe('')
})
it('指定续跑阶段时要求已有有效资产,不能把可生成误判为已完成', () => {
const stage = { total: 1, planned: 1, skipped: 0, upstreamResolvable: 0, manualBlocked: 0 }
const plan = { subjectImages: stage, keyframes: stage }
expect(productionResumeIssues(plan, {})).toEqual([])
expect(productionResumeIssues(plan, { startFrom: 'subjectImages' }).join()).toContain('角色身份')
expect(productionResumeIssues(plan, { startFrom: 'keyframes' }).join()).toContain('主体参考图')
expect(productionResumeIssues(plan, { startFrom: 'videoPrompts' }).join()).toContain('有效首帧')
expect(
productionResumeIssues(
{
characterIdentity: { total: 1, ready: 1, pending: 0, autoResolvable: 0, manualBlocked: 0 },
subjectImages: { ...stage, skipped: 1, planned: 0 },
keyframes: { ...stage, skipped: 1, planned: 0 }
},
{ startFrom: 'videoPrompts' }
)
).toEqual([])
})
})