feat(short-drama-agent-front): 新增项目标题输入

This commit is contained in:
GJ
2026-09-21 14:32:59 +08:00
parent c1ec88daf9
commit 227db5450d
5 changed files with 58 additions and 5 deletions
+2 -1
View File
@@ -110,11 +110,12 @@ describe('后端 API 契约', () => {
)
vi.stubGlobal('fetch', fetcher)
expect(await projectsApi.list()).toEqual([{ id: 'p1' }])
expect(await projectsApi.create({ topic: '故事', style: '悬疑', episodeCount: 3 })).toEqual({
expect(await projectsApi.create({ title: '测试剧本', topic: '故事', style: '悬疑', episodeCount: 3 })).toEqual({
projectId: 'p2',
status: 'generating'
})
expect(JSON.parse(fetcher.mock.calls[1]![1].body as string)).toEqual({
title: '测试剧本',
topic: '故事',
style: '悬疑',
episodeCount: 3