test: 提升生产能力测试辅助函数作用域
This commit is contained in:
1 parent
375c4de7cc
commit
89feacc1a2
1 file changed
+8
-5
@@ -29,6 +29,10 @@ afterEach(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
/** 所有预检均是模拟 GET;生成接口只记录契约,不调用真实 Provider。 */
|
/** 所有预检均是模拟 GET;生成接口只记录契约,不调用真实 Provider。 */
|
||||||
|
function stageFixture() {
|
||||||
|
return { total: 1, planned: 1, skipped: 0, upstreamResolvable: 0, manualBlocked: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
function server() {
|
function server() {
|
||||||
const context = testProjectContext()
|
const context = testProjectContext()
|
||||||
const form = formFixture('capability-test')
|
const form = formFixture('capability-test')
|
||||||
@@ -70,17 +74,16 @@ function server() {
|
|||||||
},
|
},
|
||||||
videoGenerationResult: { total: 1, created: 1, skipped: 0, inProgress: 0, blocked: 0, failed: 0 }
|
videoGenerationResult: { total: 1, created: 1, skipped: 0, inProgress: 0, blocked: 0, failed: 0 }
|
||||||
}
|
}
|
||||||
const stage = () => ({ total: 1, planned: 1, skipped: 0, upstreamResolvable: 0, manualBlocked: 0 })
|
|
||||||
const plan = {
|
const plan = {
|
||||||
projectId: 'capability-test',
|
projectId: 'capability-test',
|
||||||
completed: false,
|
completed: false,
|
||||||
stage: 'subject_images',
|
stage: 'subject_images',
|
||||||
hasManualBlockers: false,
|
hasManualBlockers: false,
|
||||||
manualBlocked: 0,
|
manualBlocked: 0,
|
||||||
subjectImages: stage(),
|
subjectImages: stageFixture(),
|
||||||
keyframes: stage(),
|
keyframes: stageFixture(),
|
||||||
videoPrompts: stage(),
|
videoPrompts: stageFixture(),
|
||||||
videos: stage(),
|
videos: stageFixture(),
|
||||||
details: {
|
details: {
|
||||||
subjectImages: [
|
subjectImages: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user