refactor: 将资产库移至全局导航

This commit is contained in:
GouJ
2026-09-22 09:28:38 +08:00
parent b834d1d259
commit eec957a2e4
5 changed files with 136 additions and 6 deletions
+4 -4
View File
@@ -107,7 +107,7 @@ describe('剧本完成前的下游访问限制', () => {
expect(wrapper!.find(`.n-menu a[href="/projects/unfinished/${path}"]`).exists()).toBe(false)
}
expect(mounted).not.toHaveBeenCalled()
expect(wrapper!.findAll('.n-menu [aria-disabled="true"]')).toHaveLength(7)
expect(wrapper!.findAll('.n-menu [aria-disabled="true"]')).toHaveLength(6)
await wrapper!.get('.project-access-gate button').trigger('click')
await flushPromises()
expect(router.currentRoute.value.path).toBe('/projects/unfinished/create-drama')
@@ -147,7 +147,7 @@ describe('剧本完成前的下游访问限制', () => {
expect(wrapper!.findAll('.n-menu a')).toHaveLength(9)
await router.push('/projects/second/production')
await flushPromises()
expect(wrapper!.findAll('.n-menu a')).toHaveLength(2)
expect(wrapper!.findAll('.n-menu a')).toHaveLength(3)
expect(wrapper!.find('.workspace-probe').exists()).toBe(false)
resolveSecond(project('second', 'draft'))
await flushPromises()
@@ -155,7 +155,7 @@ describe('剧本完成前的下游访问限制', () => {
expect(mounted).toHaveBeenCalledExactlyOnceWith('production')
await router.push('/projects')
await flushPromises()
expect(wrapper!.findAll('.n-menu a')).toHaveLength(1)
expect(wrapper!.findAll('.n-menu a')).toHaveLength(2)
})
it('读取失败保持锁定;错误区重试成功后解锁且不恢复项目标题栏', async () => {
@@ -166,7 +166,7 @@ describe('剧本完成前的下游访问限制', () => {
vi.spyOn(projectsApi, 'checkpoints').mockResolvedValue([])
const { mounted } = await openProject('/projects/retry/storyboard')
expect(mounted).not.toHaveBeenCalled()
expect(wrapper!.findAll('.n-menu a')).toHaveLength(2)
expect(wrapper!.findAll('.n-menu a')).toHaveLength(3)
expect(wrapper!.find('.project-header').exists()).toBe(false)
await wrapper!.get('.project-notices button').trigger('click')
await flushPromises()