feat(short-drama-agent-front): 完善分镜审核与制作准备流程

This commit is contained in:
GJ committed 2026-10-19 21:59:22 +08:00
1 parent c4b43b9725
commit 1da56e0d46
72 files changed
+2801 -528

No files matched your search

+23
View File
@@ -114,6 +114,29 @@ async function openProject(initialPath: string) {
}
describe('剧本完成前的下游访问限制', () => {
it('导航使用当前阶段结果,旧待审标记不盖过已审核状态,下游素材仍独立限制', async () => {
const id = 'current-review-navigation'
const state = readiness(id, false)
state.script = { ready: true, reason: null }
state.breakdown = { ready: true, reason: null }
state.storyboard = { ready: true, reason: null }
vi.mocked(projectsApi.stageReadiness).mockImplementation(async () => structuredClone(state))
vi.spyOn(projectsApi, 'detail').mockResolvedValue(project(id, 'completed'))
vi.spyOn(projectsApi, 'checkpoints').mockResolvedValue([{
checkpointId: 'old-pending-review', workflowName: 'breakdown', createdAt: '2026-10-01T00:00:00Z',
state: { storyboardNeedsManualReview: true, storyboardShotValidation: { valid: true, issues: [] } }
}])
const { mounted } = await openProject(`/projects/${id}/visual-style`)
expect(mounted).toHaveBeenCalledExactlyOnceWith('visual-style')
expect(wrapper!.find(`.n-menu a[href="/projects/${id}/visual-style"]`).exists()).toBe(true)
expect(wrapper!.find(`.n-menu a[href="/projects/${id}/subject-identity"]`).exists()).toBe(false)
expect(wrapper!.find(`.n-menu a[href="/projects/${id}/production"]`).exists()).toBe(false)
state.breakdown = { ready: false, reason: '当前分镜审核已失效,请重新核对。' }
await wrapper!.get('.probe-refresh').trigger('click')
await flushPromises()
expect(wrapper!.find('.workspace-probe').exists()).toBe(false)
expect(wrapper!.get('.project-access-gate').text()).toContain('当前分镜审核已失效')
})
it('身份请求不使用全局加载消息,完成和失败使用临时消息且不遗留横幅', async () => {
vi.useFakeTimers()
const id = 'identity-message-test'