fix(short-drama-agent-front): 优化工作区提示与弹窗布局

This commit is contained in:
GJ committed 2026-10-09 18:31:09 +08:00
1 parent 5b134207b8
commit 72a86171dc
35 files changed
+586 -378

No files matched your search

+7 -4
View File
@@ -1,6 +1,6 @@
import { h } from 'vue'
import { createMemoryHistory, createRouter } from 'vue-router'
import { flushPromises, mount, type VueWrapper } from '@vue/test-utils'
import { DOMWrapper, flushPromises, mount, type VueWrapper } from '@vue/test-utils'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { readFileSync } from 'node:fs'
import App from '@/App.vue'
@@ -291,9 +291,12 @@ describe('剧本完成前的下游访问限制', () => {
})
await flushPromises()
expect(wrapper!.get('.operation-guide').text()).toContain('缺少镜头主首帧')
expect(wrapper!.get('.operation-guide').text()).toContain('先生成并确认主首帧')
await wrapper!.get('.operation-guide button').trigger('click')
/** 操作失败改为临时消息,但保留直接定位首帧生成的恢复入口。 */
const message = new DOMWrapper(document.querySelector('.n-message')!)
expect(wrapper!.find('.operation-guide').exists()).toBe(false)
expect(message.text()).toContain('还没有可用首帧,请先生成并确认首帧。')
expect(message.get('button').text()).toBe('先生成主首帧')
await message.get('button').trigger('click')
await flushPromises()
expect(router.currentRoute.value.path).toBe(`/projects/${projectId}/production`)