test: 补充形态生图模型配置
This commit is contained in:
1 parent
bb37c93439
commit
cebe6cbb81
1 file changed
+17
-1
@@ -10,6 +10,22 @@ import StyleImages from '@/features/visual-style/components/StyleImages.vue'
|
|||||||
import { formFixture } from '@/features/subject-images/testing/fixtures'
|
import { formFixture } from '@/features/subject-images/testing/fixtures'
|
||||||
import { requiredTextRule } from '@/lib/form-rules'
|
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
|
let wrapper: VueWrapper | undefined
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
wrapper?.unmount()
|
wrapper?.unmount()
|
||||||
@@ -74,7 +90,7 @@ describe('统一的 Naive UI 表单校验', () => {
|
|||||||
it('图片宽高错误显示在两侧字段,补全后同时消失,切换目标清除校验状态', async () => {
|
it('图片宽高错误显示在两侧字段,补全后同时消失,切换目标清除校验状态', async () => {
|
||||||
wrapper = mount(GenerateImageDialog, {
|
wrapper = mount(GenerateImageDialog, {
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
props: { open: true, form: formFixture(), disabled: false }
|
props: { open: true, form: formFixture(), disabled: false, catalog: imageCatalog, profile: creativeProfile }
|
||||||
})
|
})
|
||||||
await flushPromises()
|
await flushPromises()
|
||||||
await input('#image-width', '1024')
|
await input('#image-width', '1024')
|
||||||
|
|||||||
Reference in new issue
Block a user