fix(qa): 首批即显并统一五字段后端筛选
build / build (push) Successful in 1m19s

列表正文改为按需读取;保留完整导出、版本隔离和有效标签筛选。
验证:前端全量、Go全量及隔离PG全mirror竞态通过;覆盖首批回调、续载失败与筛选分页。
This commit is contained in:
姚章浩
2026-10-25 12:45:31 +08:00
parent 65653e5c01
commit 00c4c13283
26 changed files with 836 additions and 39 deletions
+21
View File
@@ -0,0 +1,21 @@
import { describe, it, expect } from 'vitest'
import { buildQAWeeklyCSV } from './qaWeekly'
import { parseQualityFilters, qualityFiltersKey } from './qaOps'
import type { QARecordPage, QARecord } from './qaOps'
describe('quality filter and full-export contracts', () => {
it('compares filters independently of property ordering and rejects unknown fields', () => {
expect(qualityFiltersKey({ coverage: '是', is_correct: '否' })).toBe(
qualityFiltersKey({ is_correct: '否', coverage: '是' })
)
expect(() => parseQualityFilters({ tenant: 'x' })).toThrow()
expect(() => parseQualityFilters({ coverage: 4 })).toThrow()
})
it('rejects a complete-count page of truncated previews as a full export', () => {
const page = {
has_more: false,
total: 1,
items: [{ id: 'fixture', content_projection: 'summary' } as QARecord],
} as QARecordPage
expect(() => buildQAWeeklyCSV(page)).toThrow('预览')
})
})