fix(short-drama-agent-front): 显示首帧警告镜头并支持定位刷新

This commit is contained in:
GJ committed 2026-10-12 19:02:29 +08:00
1 parent 383c4f2308
commit 83482a70c5
4 files changed
+109 -26

No files matched your search

@@ -445,6 +445,32 @@ describe('过期首帧到具体素材定位', () => {
expect(wrapper!.text()).toContain('待处理首帧关联此素材')
expect(fetcher.mock.calls.filter(([url]) => String(url).endsWith('/references'))).toHaveLength(1)
})
it('警告列出具体集数与镜头,可定位关联素材或打开对应生产镜头', async () => {
const { router, fetcher } = await gallery()
const warning = wrapper!.get('[data-keyframe-impact]')
expect(warning.text()).toContain('第 2 集 · BEAT 2 / 镜头 1')
const shotLink = warning.get('a[data-impact-shot-link]')
const location = new URL(shotLink.attributes('href')!, 'http://localhost')
expect(location.pathname).toBe('/projects/capability-test/production')
expect(location.searchParams.get('episodeNo')).toBe('2')
expect(location.searchParams.get('shotId')).toBe('shot-target')
await warning.get('[data-impact-materials]').trigger('click')
await flushPromises()
expect(router.currentRoute.value.query.sourceShotId).toBe('shot-target')
expect(wrapper!.get('.asset-impact-context').text()).toContain('雨夜形态')
expect(fetcher.mock.calls.every(([, init]) => init?.method === 'GET')).toBe(true)
})
it('警告重新检查后移除已恢复的镜头,不继续展示旧结果', async () => {
const { keyframes, videos, fetcher } = await gallery()
keyframes.items[0]!.primaryKeyframeStale = false
videos.items[0]!.issues = []
await wrapper!.get('[data-refresh-keyframe-impact]').trigger('click')
await flushPromises()
expect(wrapper!.find('[data-keyframe-impact]').exists()).toBe(false)
expect(fetcher.mock.calls.every(([, init]) => init?.method === 'GET')).toBe(true)
})
it('镜头导航与筛选共行,无关联说明时不留横条,查看全部素材清除定位和筛选', async () => {
const { references, router, fetcher } = await gallery()
references.references = []