feat(short-drama-agent-front): 接入人工动作修订与视频版本权限

This commit is contained in:
GJ committed 2026-10-14 13:44:02 +08:00
1 parent 7a60db3ced
commit fa76165960
38 files changed
+2003 -158

No files matched your search

+21
View File
@@ -254,3 +254,24 @@ describe('后端 API 契约', () => {
}
})
})
/** 同步版本冲突保留顶层错误码,资源与版本 ID 只位于 details。 */
it('保留版本冲突的顶层 code 与独立 details', async () => {
const details = { shotId: 's1', currentActiveRevisionId: 'r2' }
vi.stubGlobal(
'fetch',
vi
.fn<typeof fetch>()
.mockResolvedValue(
new Response(
JSON.stringify({ code: 'MOTION_PLAN_REVISION_CONFLICT', message: '生效版本变化', details }),
{ status: 409 }
)
)
)
await expect(request('/test')).rejects.toMatchObject({
status: 409,
code: 'MOTION_PLAN_REVISION_CONFLICT',
details
})
})