feat(qa-ops): 重做四页布局与周报草稿导出
build / build (push) Successful in 1m3s

This commit is contained in:
姚章浩
2026-10-18 20:00:38 +08:00
parent 3e7fcce0b1
commit 93aabc8a81
18 changed files with 1037 additions and 157 deletions
+14 -1
View File
@@ -1,6 +1,6 @@
import { renderToStaticMarkup } from 'react-dom/server'
import { describe, expect, it, vi } from 'vitest'
import { QAOperationsView } from './QAOperations'
import { QAOperationsTabs, QAOperationsView } from './QAOperations'
import type { QARecord, QARecordPage } from './qaOps'
import { restoreWorkspace } from './workspace'
@@ -50,6 +50,19 @@ const props = {
}
describe('QA operations workbench', () => {
it('uses the four requested destinations in their fixed order', () => {
const html = renderToStaticMarkup(<QAOperationsTabs view="records" onChange={vi.fn()} />)
const labels = ['问题流水', '问题统计看板', '区域配置', '周报生成']
for (const label of labels) expect(html).toContain(label)
for (let i = 1; i < labels.length; i++) expect(html.indexOf(labels[i - 1])).toBeLessThan(html.indexOf(labels[i]))
expect(html).not.toContain('部门/区域保留源快照')
})
it('removes explanatory banners without hiding errors or any required column', () => {
const html = renderToStaticMarkup(<QAOperationsView {...props} />)
expect(html).not.toContain('本次读取')
expect(html).not.toContain('固定显示完整字段')
expect(html).not.toContain('DobotAI 2.0 / 钉钉')
})
it('shows all required columns even when empty and keeps false/downvotes visible', () => {
const html = renderToStaticMarkup(<QAOperationsView {...props} />)
expect(html).toContain('原始问题')