test: 更新选角候选图片模型参数

This commit is contained in:
GouJ committed 2026-09-24 22:18:53 +08:00
1 parent cafd14ea0e
commit b352560ee8
1 file changed
+38 -3
@@ -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 () => {