fix(short-drama-agent-front): 优化工作区提示与弹窗布局
This commit is contained in:
1 parent
5b134207b8
commit
72a86171dc
35 files changed
+586
-378
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { productionMessage, productionIssueText } from '../../../src/features/production/production-messages'
|
||||
|
||||
/** 真实后端首帧问题改为中文处理建议,不暴露实现名称和内部编号。 */
|
||||
describe('镜头生产用户提示', () => {
|
||||
it('就绪问题和素材查询的质量失败使用同一中文提示,方便页面去重', () => {
|
||||
const expected = '首帧画面检查未通过,请重新生成或修复首帧。'
|
||||
expect(
|
||||
productionIssueText({
|
||||
code: 'failed_keyframe_quality',
|
||||
reason: 'Primary Keyframe 最新视觉质量校验未通过,请先重新生成合格首帧'
|
||||
})
|
||||
).toBe(expected)
|
||||
expect(
|
||||
productionMessage(
|
||||
'Storyboard Shot Primary Keyframe 最新视觉校验未通过,请先修复首帧: cmunpp5b7003hk6ldk2ekw3k5'
|
||||
)
|
||||
).toBe(expected)
|
||||
})
|
||||
it('提示词与新首帧不匹配时说明更新哪个内容', () => {
|
||||
expect(
|
||||
productionMessage(
|
||||
'Storyboard Shot Video Prompt 未绑定当前 Primary Keyframe,请先重新生成 Video Prompt: cmunpp5b7003hk6ldk2ekw3k5'
|
||||
)
|
||||
).toBe('视频提示词与当前首帧不一致,请重新生成视频提示词。')
|
||||
})
|
||||
it('位置绑定变化说明需要更新首帧,不显示英文接口术语', () => {
|
||||
expect(productionMessage('Primary Keyframe 的空间目标绑定已变化,需要重新生成并校验首帧')).toBe(
|
||||
'镜头画面设置已调整,请重新生成并检查首帧。'
|
||||
)
|
||||
})
|
||||
it('保留已有中文原因并移除内部镜头编号', () => {
|
||||
expect(productionMessage('主体参考图已更新: cmunpp5b7003hk6ldk2ekw3k5')).toBe('主体参考图已更新')
|
||||
})
|
||||
it('英文连接失败转为可操作提示', () => {
|
||||
expect(productionMessage('fetch failed')).toBe('暂时无法连接服务,请稍后重新获取。')
|
||||
})
|
||||
it('视频自己的检查问题保留视频对象,不误写成首帧问题', () => {
|
||||
const message = '视频画面检查未通过,请重新生成视频。'
|
||||
expect(productionMessage(message)).toBe(message)
|
||||
})
|
||||
it('后台状态不确定时保留不要重复提交的提醒', () => {
|
||||
const message = '请求等待超时。后台任务可能仍在运行,请先刷新状态,不要重复提交。'
|
||||
expect(productionMessage(message)).toBe(message)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user