From 1b189228ce6a0c8ca3409f1f706624bc189786b6 Mon Sep 17 00:00:00 2001 From: GouJ Date: Thu, 15 Oct 2026 18:21:14 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=9B=B4=E6=96=B0=E5=88=86=E9=95=9C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=B6=E9=95=BF=E9=A2=84=E7=AE=97=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20GET=20=E5=90=8E=E7=9A=84=E8=AF=B7=E6=B1=82=E8=AE=A1?= =?UTF-8?q?=E6=95=B0=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/features/workflows/pages.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) })