From 50bcb0dd8b498348e91465d71efdbff4e3534280 Mon Sep 17 00:00:00 2001 From: GouJ Date: Thu, 24 Sep 2026 22:54:15 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=A1=A5=E5=85=85=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E5=8F=82=E8=80=83=E5=9B=BE=E6=A8=A1=E5=9E=8B=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subject-identity/identity.test.ts | 49 +++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) 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()