fix(short-drama-agent-front): 修复代码格式检查问题
This commit is contained in:
1 parent
81d6a85260
commit
48fce3975f
87 files changed
+5714
-1436
No files matched your search
@@ -1,5 +1,10 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { breakdownSnapshot, formalBreakdownSnapshot, recoveryOptions, workflowCheckpoints } from '@/features/workflows/selectors'
|
||||
import {
|
||||
breakdownSnapshot,
|
||||
formalBreakdownSnapshot,
|
||||
recoveryOptions,
|
||||
workflowCheckpoints
|
||||
} from '@/features/workflows/selectors'
|
||||
import type { Checkpoint } from '@/features/workflows/types'
|
||||
import type { BreakdownState } from '@/features/breakdown/types'
|
||||
|
||||
@@ -12,17 +17,27 @@ describe('Checkpoint 选择与恢复', () => {
|
||||
it('正式工作区不会读取未提交候选,已有正式成果也不会被新候选覆盖', () => {
|
||||
const candidate = checkpoint(2, { candidateOnly: true, subjectCandidates: [] })
|
||||
expect(formalBreakdownSnapshot([candidate])).toBeNull()
|
||||
const formal = checkpoint(1, { candidateOnly: true, candidateCommitted: true, storyboardPersisted: true, subjectCandidates: [], storyboardShotValidation: { valid: true, issues: [] } })
|
||||
expect(formalBreakdownSnapshot([formal, candidate])?.candidateCommitted).toBe(true)
|
||||
})
|
||||
it('顶层修复和正式提交结果覆盖同一检查点内的旧嵌套质量状态', () => {
|
||||
const result = breakdownSnapshot([checkpoint(1, {
|
||||
const formal = checkpoint(1, {
|
||||
candidateOnly: true,
|
||||
candidateCommitted: true,
|
||||
storyboardPersisted: true,
|
||||
storyboardShotValidation: { valid: true, issues: [] },
|
||||
breakdownResult: { storyboardShotValidation: { valid: false, issues: [{ episodeNo: 1, message: '旧错误' }] } }
|
||||
})])
|
||||
subjectCandidates: [],
|
||||
storyboardShotValidation: { valid: true, issues: [] }
|
||||
})
|
||||
expect(formalBreakdownSnapshot([formal, candidate])?.candidateCommitted).toBe(true)
|
||||
})
|
||||
it('顶层修复和正式提交结果覆盖同一检查点内的旧嵌套质量状态', () => {
|
||||
const result = breakdownSnapshot([
|
||||
checkpoint(1, {
|
||||
candidateOnly: true,
|
||||
candidateCommitted: true,
|
||||
storyboardPersisted: true,
|
||||
storyboardShotValidation: { valid: true, issues: [] },
|
||||
breakdownResult: {
|
||||
storyboardShotValidation: { valid: false, issues: [{ episodeNo: 1, message: '旧错误' }] }
|
||||
}
|
||||
})
|
||||
])
|
||||
expect(result?.breakdownResult?.storyboardShotValidation).toEqual({ valid: true, issues: [] })
|
||||
})
|
||||
it('按 graph 隔离并保持输入不可变', () => {
|
||||
|
||||
Reference in new issue
Block a user