test: 更新分镜页面时长预算新增 GET 后的请求计数断言

This commit is contained in:
GouJ committed 2026-10-15 18:21:14 +08:00
1 parent c456bf6865
commit 1b189228ce
1 file changed
+6 -2
+6 -2
View File
@@ -1808,7 +1808,9 @@ 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(9)
/** Duration Budget 新增一次只读 GET;镜头重生成不应增加额外写入。 */
expect(fetcher.mock.calls.filter(([, init]) => !init?.method || init.method === 'GET')).toHaveLength(10)
expect(fetcher.mock.calls.filter(([url]) => String(url).endsWith('/duration-budget'))).toHaveLength(1)
expect(fetcher.mock.calls.some(([url]) => String(url) === '/api/workflow-executions/page-execution-1')).toBe(
true
)
@@ -1903,7 +1905,9 @@ 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(5)
/** 切换剧集只增加当前集查询,项目时长预算只在挂载时读取一次。 */
expect(fetcher.mock.calls).toHaveLength(6)
expect(fetcher.mock.calls.filter(([url]) => String(url).endsWith('/duration-budget'))).toHaveLength(1)
expect(fetcher.mock.calls.every(([, init]) => !init?.method || init.method === 'GET')).toBe(true)
})