fix(short-drama-agent-front): 修复代码格式检查问题

This commit is contained in:
GJ committed 2026-10-21 17:04:02 +08:00
1 parent 81d6a85260
commit 48fce3975f
87 files changed
+5714 -1436

No files matched your search

+16 -3
View File
@@ -78,8 +78,18 @@ describe('候选提交资格', () => {
vi.stubGlobal('fetch', fetcher)
await breakdownApi.revalidateCandidate('p/id')
await breakdownApi.candidateCommitPreview('p/id')
await breakdownApi.repairCandidateSubject('p/id', { expectedCheckpointId: 'current', episodeNo: 1, beatNo: 2, shotNo: 3, subjectRef: '@PR0001', formId: 'existing-form' })
await breakdownApi.repairCandidateActions('p/id', { expectedCheckpointId: 'current', repairs: [{ episodeNo: 1, beatNo: 2, shotNo: 3, actionId: 'action-1', description: '人物伸手拿起铜铃' }] })
await breakdownApi.repairCandidateSubject('p/id', {
expectedCheckpointId: 'current',
episodeNo: 1,
beatNo: 2,
shotNo: 3,
subjectRef: '@PR0001',
formId: 'existing-form'
})
await breakdownApi.repairCandidateActions('p/id', {
expectedCheckpointId: 'current',
repairs: [{ episodeNo: 1, beatNo: 2, shotNo: 3, actionId: 'action-1', description: '人物伸手拿起铜铃' }]
})
expect(fetcher.mock.calls.map(call => call[0])).toEqual([
'/api/projects/p%2Fid/breakdown/candidate-revalidation',
'/api/projects/p%2Fid/breakdown/candidate-commit-preview',
@@ -89,6 +99,9 @@ describe('候选提交资格', () => {
expect(fetcher.mock.calls.map(call => call[1]?.method)).toEqual(['GET', 'GET', 'POST', 'POST'])
const body = fetcher.mock.calls[3]?.[1]?.body
if (typeof body !== 'string') throw new Error('请求缺少 JSON 正文')
expect(JSON.parse(body)).toEqual({ expectedCheckpointId: 'current', repairs: [{ episodeNo: 1, beatNo: 2, shotNo: 3, actionId: 'action-1', description: '人物伸手拿起铜铃' }] })
expect(JSON.parse(body)).toEqual({
expectedCheckpointId: 'current',
repairs: [{ episodeNo: 1, beatNo: 2, shotNo: 3, actionId: 'action-1', description: '人物伸手拿起铜铃' }]
})
})
})