feat(short-drama-agent-front): 完善视觉资产审核流程
This commit is contained in:
1 parent
dc8bb17a23
commit
b88ad8770f
45 files changed
+2258
-352
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { imagePreviewFixture } from '../../fixtures/image-preview'
|
||||
import { approvedCharacter, imagePreviewFixture } from '../../fixtures/image-preview'
|
||||
import { imageCatalog, generationProfile } from '../../fixtures/generation'
|
||||
import { flushPromises, mount, type VueWrapper } from '@vue/test-utils'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
@@ -259,6 +259,31 @@ describe('身份图与母版契约', () => {
|
||||
expect(wrapper.emitted('regenerate')).toEqual([['failed-front']])
|
||||
})
|
||||
|
||||
it('角色交付分项失败时不能以总结果通过开启选角', async () => {
|
||||
const candidate = identityImageFixture({ id: 'candidate', isAnchor: false })
|
||||
const failed = approvedCharacter(candidate.id)
|
||||
failed.characterCheckResults![0] = {
|
||||
check: 'presentation',
|
||||
status: 'failed',
|
||||
evidence: '胸口出现未经授权的文字。'
|
||||
}
|
||||
wrapper = mount(IdentityGallery, {
|
||||
attachTo: document.body,
|
||||
props: {
|
||||
subjectName: '林夏',
|
||||
module: 'character',
|
||||
identityLocked: false,
|
||||
disabled: false,
|
||||
images: [candidate],
|
||||
validationResult: failed
|
||||
}
|
||||
})
|
||||
await flushPromises()
|
||||
expect(button('确认选角并锁定').disabled).toBe(true)
|
||||
expect(wrapper.text()).toContain('胸口出现未经授权的文字。')
|
||||
expect(wrapper.text()).toContain('跨图身份一致性 · 不适用')
|
||||
expect(wrapper.emitted('anchor')).toBeUndefined()
|
||||
})
|
||||
it('明确确认目标后才提交指定候选,刷新同一母版保持管理弹窗,新母版返回后关闭弹窗', async () => {
|
||||
const anchor = identityImageFixture({ id: 'anchor' })
|
||||
const candidate = identityImageFixture({ id: 'candidate', isAnchor: false })
|
||||
@@ -269,7 +294,8 @@ describe('身份图与母版契约', () => {
|
||||
module: 'character',
|
||||
identityLocked: true,
|
||||
disabled: false,
|
||||
images: [anchor, candidate]
|
||||
images: [anchor, candidate],
|
||||
validationResult: approvedCharacter(candidate.id)
|
||||
}
|
||||
})
|
||||
button('管理候选(1)').click()
|
||||
@@ -464,7 +490,8 @@ describe('身份图与母版契约', () => {
|
||||
module: 'character',
|
||||
identityLocked: false,
|
||||
disabled: false,
|
||||
images: [identityImageFixture({ isAnchor: true })]
|
||||
images: [identityImageFixture({ isAnchor: true })],
|
||||
validationResult: approvedCharacter('identity-image-1')
|
||||
}
|
||||
})
|
||||
button('确认选角并锁定').click()
|
||||
|
||||
Reference in new issue
Block a user