fix(short-drama-agent-front): 显示首帧警告镜头并支持定位刷新
This commit is contained in:
1 parent
383c4f2308
commit
83482a70c5
4 files changed
+109
-26
No files matched your search
@@ -59,7 +59,7 @@ function jsonResponse(data: unknown) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 为页面模拟请求补齐正式模型目录和配置,后台启动返回 202 句柄,结果只从任务 GET 读取;响应逐次复制避免消费同一正文。
|
||||
* 为页面模拟请求补齐模型配置与只读时长审计,后台启动返回 202 句柄,结果只从任务 GET 读取;响应逐次复制避免消费同一正文。
|
||||
* @param fetcher 业务 API 模拟请求
|
||||
*/
|
||||
function stubFetch(fetcher: Mock<typeof fetch>) {
|
||||
@@ -70,6 +70,15 @@ function stubFetch(fetcher: Mock<typeof fetch>) {
|
||||
const path = String(url)
|
||||
if (path.endsWith('/generation-models')) return jsonResponse(imageCatalog)
|
||||
if (path.endsWith('/creative-profile')) return jsonResponse(generationProfile(fixture.id))
|
||||
if (path.endsWith('/storyboard/duration-audit'))
|
||||
return jsonResponse({
|
||||
projectId: fixture.id,
|
||||
episodeCount: 2,
|
||||
beatCount: 4,
|
||||
shotCount: 4,
|
||||
warningCount: 0,
|
||||
issues: []
|
||||
})
|
||||
if (path.includes('/workflow-executions/')) return jsonResponse(executions.get(path.split('/').at(-1)!))
|
||||
const response = await implementation(url, init)
|
||||
const workflowName = path.endsWith('/storyboard-directions/generate')
|
||||
@@ -1724,7 +1733,7 @@ describe('工作台页面交互', () => {
|
||||
expect(wrapper!.text()).toContain('新标题和剧情详情尚未提供')
|
||||
expect(drawerPanel().text()).toContain('本集新镜头已保存')
|
||||
expect(drawerPanel().text()).toContain('2 个镜头')
|
||||
expect(fetcher.mock.calls.filter(([, init]) => !init?.method || init.method === 'GET')).toHaveLength(8)
|
||||
expect(fetcher.mock.calls.filter(([, init]) => !init?.method || init.method === 'GET')).toHaveLength(9)
|
||||
expect(fetcher.mock.calls.some(([url]) => String(url) === '/api/workflow-executions/page-execution-1')).toBe(
|
||||
true
|
||||
)
|
||||
@@ -1819,7 +1828,8 @@ describe('工作台页面交互', () => {
|
||||
expect(wrapper!.getComponent(ShotDesign).props('shot').shotId).toBe('shot-db-2-1')
|
||||
expect(wrapper!.text()).toContain('第2集镜头1')
|
||||
expect(wrapper!.text()).not.toContain('第1集镜头1')
|
||||
expect(fetcher.mock.calls).toHaveLength(4)
|
||||
expect(fetcher.mock.calls).toHaveLength(5)
|
||||
expect(fetcher.mock.calls.every(([, init]) => !init?.method || init.method === 'GET')).toBe(true)
|
||||
})
|
||||
|
||||
it('首次分镜读取失败时禁用生成,重试恢复后才允许操作', async () => {
|
||||
|
||||
Reference in new issue
Block a user