From b352560ee8d55cb86f650683503282fd37f2d212 Mon Sep 17 00:00:00 2001 From: GouJ Date: Thu, 24 Sep 2026 22:18:53 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=9B=B4=E6=96=B0=E9=80=89=E8=A7=92?= =?UTF-8?q?=E5=80=99=E9=80=89=E5=9B=BE=E7=89=87=E6=A8=A1=E5=9E=8B=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subject-identity/identity.test.ts | 41 +++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/tests/features/subject-identity/identity.test.ts b/tests/features/subject-identity/identity.test.ts index 260b711..7773acf 100644 --- a/tests/features/subject-identity/identity.test.ts +++ b/tests/features/subject-identity/identity.test.ts @@ -365,10 +365,43 @@ describe('身份图与母版契约', () => { expect(wrapper.emitted('anchor')).toEqual([['identity-image-1']]) }) - it('选角候选不再发送 Provider,不携带普通身份图视角字段', async () => { + it('选角候选发送当前图片 Provider 与动态参数,不携带旧宽高字段', async () => { wrapper = mount(CastingCandidateDialog, { attachTo: document.body, - props: { open: true, subjectId: 'subject-1', subjectName: '林夏', disabled: false } + props: { + open: true, + subjectId: 'subject-1', + subjectName: '林夏', + disabled: false, + catalog: { + defaults: { imageProvider: 'qwen-image', videoProvider: 'seedance' }, + images: [{ + type: 'image', + provider: 'qwen-image', + providerLabel: 'Qwen', + model: 'qwen-image-3.0-pro', + modelLabel: 'Qwen Image', + supported: true, + enabled: true, + isDefault: true, + capabilities: {}, + generationOptions: [], + defaults: { size: '1536*2688' }, + projectConstraints: [] + }], + videos: [] + }, + profile: { + projectId: 'project-1', + aspectRatio: '9:16', + imageProvider: 'qwen-image', + imageModel: 'qwen-image-3.0-pro', + imageOptions: { size: '1536*2688' }, + videoProvider: 'seedance', + videoModel: 'seedance', + videoOptions: {} + } + } }) await flushPromises() expect(document.body.textContent).toContain('不会复用当前身份母版') @@ -376,7 +409,9 @@ describe('身份图与母版契约', () => { await flushPromises() button('确认生成候选').click() await flushPromises() - expect(wrapper.emitted('generate')).toEqual([[{}]]) + expect(wrapper.emitted('generate')).toEqual([[ + { provider: 'qwen-image', generationOptions: { size: '1536*2688' } } + ]]) }) it('角色选角接口区分批量身份、候选生图与确认事务', async () => {