feat: 完善日报语音转写与全部聊天分目录导出

This commit is contained in:
电摇小子
2026-08-11 02:59:54 +08:00
parent d1a090bb6b
commit 7a5499f093
28 changed files with 1909 additions and 193 deletions
@@ -9,6 +9,7 @@ const baseProps = {
previewBytes: 0,
selfInfo: null,
selectedCount: 1,
allExport: false,
jobId: 'fixture-job',
onCancel: vi.fn(),
onReveal: vi.fn()
@@ -70,4 +71,34 @@ describe('export progress panel', () => {
expect(progressbar).toHaveAttribute('aria-valuenow', '31')
expect(progressbar.querySelector('span')).toHaveStyle({ width: '31%' })
})
it('shows the current conversation and overall position for all export', () => {
render(
<ExportPreviewPanel
{...baseProps}
allExport
selectedCount={30}
progress={{
jobId: 'fixture-job',
phase: 'media',
processed: 5,
total: 12,
percent: 36,
currentTargetIndex: 11,
currentTargetCount: 30,
currentTargetName: '项目讨论群',
currentTargetType: 'group'
}}
includeVoiceTranscripts={false}
zip={false}
/>
)
expect(screen.getByText('群聊')).toBeVisible()
expect(screen.getByText('第 11/30 个:项目讨论群')).toBeVisible()
expect(screen.getByRole('progressbar', { name: '导出进度' })).toHaveAttribute(
'aria-valuenow',
'36'
)
})
})