perf(short-drama-agent-front): 优化制作工作台交互与移动端布局
This commit is contained in:
1 parent
b5eaed3981
commit
54a381ebd3
37 files changed
+1217
-426
No files matched your search
@@ -84,19 +84,33 @@ describe('精简公开资产回归', () => {
|
||||
const wrapper = mount(ShotProductionAssets, { props: { projectId, shot, disabled: false } })
|
||||
try {
|
||||
await flushPromises()
|
||||
expect(wrapper.find('video').exists()).toBe(true)
|
||||
/** 未确认的候选不出现在主区,只在管理弹窗中播放和检查。 */
|
||||
expect(wrapper.find('video').exists()).toBe(false)
|
||||
expect(wrapper.text()).toContain('尚无已确认主视频')
|
||||
await wrapper
|
||||
.findAll('button')
|
||||
.find(button => button.text() === '管理候选(1)')!
|
||||
.trigger('click')
|
||||
await flushPromises()
|
||||
expect(document.querySelector('video')).not.toBeNull()
|
||||
expect(wrapper.text()).not.toContain('自动校验中')
|
||||
expect(wrapper.findAll('button').some(button => button.text() === '设为主视频')).toBe(false)
|
||||
expect(
|
||||
[...document.querySelectorAll('button')].some(button => button.textContent?.trim() === '设为主视频')
|
||||
).toBe(false)
|
||||
const session = qualitySession(
|
||||
qualityKey(projectId, { kind: 'video', shotId: shot.shotId, assetId: video.id, title: '' })
|
||||
)
|
||||
session.videoValidation = validation
|
||||
await flushPromises()
|
||||
expect(wrapper.findAll('button').some(button => button.text() === '设为主视频')).toBe(true)
|
||||
expect(
|
||||
[...document.querySelectorAll('button')].some(button => button.textContent?.trim() === '设为主视频')
|
||||
).toBe(true)
|
||||
expect(sessionVideoValidation('other-project', shot.shotId, video.id)).toBeNull()
|
||||
session.videoValidation = { ...validation, passed: false }
|
||||
await flushPromises()
|
||||
expect(wrapper.findAll('button').some(button => button.text() === '设为主视频')).toBe(false)
|
||||
expect(
|
||||
[...document.querySelectorAll('button')].some(button => button.textContent?.trim() === '设为主视频')
|
||||
).toBe(false)
|
||||
expect(fetcher.mock.calls.every(([, options]) => options?.method === 'GET')).toBe(true)
|
||||
} finally {
|
||||
wrapper.unmount()
|
||||
@@ -170,7 +184,7 @@ describe('精简公开资产回归', () => {
|
||||
try {
|
||||
await flushPromises()
|
||||
expect(wrapper.findAll('.keyframe-card')).toHaveLength(1)
|
||||
expect(wrapper.find('.primary-keyframe-mark').attributes('aria-label')).toBe('当前主首帧')
|
||||
expect(wrapper.find('.keyframe-card').text()).toContain('主首帧')
|
||||
expect(wrapper.findAll('button').some(item => item.text().includes('设为主首帧'))).toBe(false)
|
||||
|
||||
await wrapper
|
||||
|
||||
Reference in new issue
Block a user