diff --git a/tests/features/subject-identity/identity.test.ts b/tests/features/subject-identity/identity.test.ts index 7773acf..aae5cd0 100644 --- a/tests/features/subject-identity/identity.test.ts +++ b/tests/features/subject-identity/identity.test.ts @@ -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()