test: 补充身份参考图模型配置

This commit is contained in:
GouJ committed 2026-09-24 22:54:15 +08:00
1 parent 97c43300e5
commit 50bcb0dd8b
1 file changed
+46 -3
@@ -43,6 +43,41 @@ function input(selector: string, value: string) {
item.dispatchEvent(new Event(item.tagName === 'SELECT' ? 'change' : 'input', { bubbles: true }))
}
const imageCatalog = {
defaults: { imageProvider: 'qwen-image', videoProvider: 'seedance' },
images: [{
type: 'image' as const,
provider: 'qwen-image',
providerLabel: 'Qwen',
model: 'qwen-image-3.0-pro',
modelLabel: 'Qwen Image',
supported: true as const,
enabled: true,
isDefault: true,
capabilities: {},
generationOptions: [{
key: 'size',
label: '图片尺寸',
type: 'size' as const,
required: true,
options: [{ label: '1:1 · 2048×2048', value: '2048*2048' }]
}],
defaults: { size: '2048*2048' },
projectConstraints: []
}],
videos: []
}
const creativeProfile = {
projectId: 'project-1',
aspectRatio: '1:1' as const,
imageProvider: 'qwen-image',
imageModel: 'qwen-image-3.0-pro',
imageOptions: { size: '2048*2048' },
videoProvider: 'seedance',
videoModel: 'seedance',
videoOptions: {}
}
describe('身份图与母版契约', () => {
it('详情大图 contain 完整显示,历史仍为 cover,缩略图只切换记录', async () => {
wrapper = mount(IdentityGallery, {
@@ -261,7 +296,9 @@ describe('身份图与母版契约', () => {
subjectId: 's1',
subjectName: '林夏',
images: [identityImageFixture()],
disabled: false
disabled: false,
catalog: imageCatalog,
profile: creativeProfile
}
})
await flushPromises()
@@ -297,7 +334,9 @@ describe('身份图与母版契约', () => {
subjectId: 's1',
subjectName: '林夏',
images: [identityImageFixture()],
disabled: false
disabled: false,
catalog: imageCatalog,
profile: creativeProfile
}
})
await flushPromises()
@@ -320,7 +359,11 @@ describe('身份图与母版契约', () => {
subjectName: '林夏',
module: 'character',
images: [identityImageFixture()],
disabled: false
disabled: false,
catalog: imageCatalog,
profile: creativeProfile,
catalog: imageCatalog,
profile: creativeProfile
}
})
await flushPromises()