test: 补充形态生图模型配置
This commit is contained in:
1 parent
ad279f5556
commit
e0f88b1e40
1 file changed
+18
-2
@@ -10,6 +10,22 @@ import { useSubjectImages } from '@/features/subject-images/useSubjectImages'
|
||||
import FormPromptDialog from '@/features/subject-images/components/FormPromptDialog.vue'
|
||||
import GenerateImageDialog from '@/features/subject-images/components/GenerateImageDialog.vue'
|
||||
|
||||
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
|
||||
const projectId = 'capability-test'
|
||||
/** 从实际挂载的确认弹窗查找操作按钮。 */
|
||||
@@ -162,7 +178,7 @@ describe('形态正式提示词与批量配置', () => {
|
||||
})
|
||||
it('正式提示词确认必须勾选,未确认不发送事件', async () => {
|
||||
const form = formFixture()
|
||||
wrapper = mount(FormPromptDialog, { attachTo: document.body, props: { open: true, disabled: false, form } })
|
||||
wrapper = mount(FormPromptDialog, { attachTo: document.body, props: { open: true, disabled: false, form, catalog: imageCatalog, profile: creativeProfile } })
|
||||
await flushPromises()
|
||||
find('生成正式提示词').click()
|
||||
await flushPromises()
|
||||
@@ -178,7 +194,7 @@ describe('形态正式提示词与批量配置', () => {
|
||||
const form = formFixture()
|
||||
form.appearancePrompt = null
|
||||
form.generationPrompt = null
|
||||
wrapper = mount(GenerateImageDialog, { attachTo: document.body, props: { open: true, disabled: false, form } })
|
||||
wrapper = mount(GenerateImageDialog, { attachTo: document.body, props: { open: true, disabled: false, form, catalog: imageCatalog, profile: creativeProfile } })
|
||||
await flushPromises()
|
||||
document.querySelector<HTMLElement>('#confirm-image-cost')!.click()
|
||||
await flushPromises()
|
||||
|
||||
Reference in new issue
Block a user