test: 补充形态生图模型配置

This commit is contained in:
GouJ committed 2026-09-25 00:34:55 +08:00
1 parent bb37c93439
commit cebe6cbb81
1 file changed
+17 -1
+17 -1
View File
@@ -10,6 +10,22 @@ import StyleImages from '@/features/visual-style/components/StyleImages.vue'
import { formFixture } from '@/features/subject-images/testing/fixtures'
import { requiredTextRule } from '@/lib/form-rules'
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: 'gallery-test', aspectRatio: '1:1' as const, imageProvider: 'qwen-image',
imageModel: 'qwen-image-3.0-pro', imageOptions: { size: '2048*2048' },
videoProvider: 'seedance', videoModel: 'seedance', videoOptions: {}
}
let wrapper: VueWrapper | undefined
afterEach(() => {
wrapper?.unmount()
@@ -74,7 +90,7 @@ describe('统一的 Naive UI 表单校验', () => {
it('图片宽高错误显示在两侧字段,补全后同时消失,切换目标清除校验状态', async () => {
wrapper = mount(GenerateImageDialog, {
attachTo: document.body,
props: { open: true, form: formFixture(), disabled: false }
props: { open: true, form: formFixture(), disabled: false, catalog: imageCatalog, profile: creativeProfile }
})
await flushPromises()
await input('#image-width', '1024')