fix: 测试项目上下文补齐阶段状态

This commit is contained in:
GouJ committed 2026-09-26 21:22:20 +08:00
1 parent 3d888ce28d
commit 90048c0b28
1 file changed
+12 -2
+12 -2
View File
@@ -1,6 +1,6 @@
import { computed, ref } from 'vue'
import { vi } from 'vitest'
import type { ProjectDetail } from '../features/projects/types'
import type { ProjectDetail, ProjectStageReadiness } from '../features/projects/types'
import type { Checkpoint } from '../features/workflows/types'
import type { useProjectData } from '../features/projects/context'
@@ -18,11 +18,21 @@ export function testProjectContext(id = 'capability-test'): ReturnType<typeof us
characters: [],
world: null
}
const data = ref({ project, checkpoints: [] as Checkpoint[] })
const stageReadiness: ProjectStageReadiness = {
projectId: id,
script: { ready: true, reason: null },
breakdown: { ready: true, reason: null },
visualStyle: { ready: true, reason: null },
identity: { ready: true, reason: null },
subjectAssets: { ready: true, reason: null },
storyboard: { ready: true, reason: null }
}
const data = ref({ project, checkpoints: [] as Checkpoint[], stageReadiness })
return {
data,
project: computed(() => data.value.project),
checkpoints: computed(() => data.value.checkpoints),
stageReadiness: computed(() => data.value.stageReadiness),
loading: ref(false),
error: ref(''),
updatedAt: ref(''),