diff --git a/tests/features/workflows/pages.test.ts b/tests/features/workflows/pages.test.ts index 16316be..1aacd70 100644 --- a/tests/features/workflows/pages.test.ts +++ b/tests/features/workflows/pages.test.ts @@ -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) })