fix(qa): 表头筛选并统一未覆盖正确性待确认
build / build (push) Successful in 1m17s

修正筛选入口位置:五项条件在表头就地选择,保持完整集筛选与无感续载。
统一固定规则:未覆盖一律待确认,原问答/人工模型证据不改写,已覆盖仍保留点踩优先。
验证:行为红绿、前端/Go全套及隔离PostgreSQL全mirror竞态通过;完整本地门禁与原生备份真实恢复通过。
This commit is contained in:
姚章浩
2026-10-25 13:58:08 +08:00
parent 80d5078363
commit 09b2c1dce5
26 changed files with 378 additions and 119 deletions
+15 -3
View File
@@ -52,6 +52,18 @@ const props = {
}
describe('QA operations workbench', () => {
it('puts all five selectors in their own table header cells, including empty filtered results', () => {
const filtering = { filters: { coverage: '否' }, onFiltersChange: vi.fn() }
for (const value of [page, { ...page, items: [], total: 0, has_more: false }]) {
const html = renderToStaticMarkup(<QAOperationsView {...props} {...filtering} page={value} />)
const head = html.slice(html.indexOf('<thead>'), html.indexOf('</thead>'))
expect((head.match(/<select/g) ?? []).length).toBe(5)
for (const label of ['是否覆盖', '是否正确', '产品分类', '问题类型', '根因分析'])
expect(head).toContain('aria-label="筛选' + label + '"')
expect(html).toContain('清除字段筛选')
}
})
it('keeps the first rows interactive while later batches load or fail', () => {
const prefix = { ...page, total: 2, has_more: true, next_cursor: 'next' }
const loading = renderToStaticMarkup(<QAOperationsView {...props} page={prefix} loading={true} />)
@@ -235,10 +247,10 @@ it('names the ledger explicitly as 问题流水表', () => {
expect(html).toContain('>问题流水表</button>')
})
it('keeps five field filters in a dedicated wrapped row after all primary query actions', () => {
it('styles filters inside the header instead of reserving a separate query row', () => {
const css = readFileSync(new URL('./qaOps.css', import.meta.url), 'utf8')
expect(css).not.toMatch(/\.qa-ops-query\s*\{[^}]*flex-wrap:\s*nowrap/)
expect(css).toMatch(/\.qa-field-filters\s*\{[^}]*order:\s*1/)
expect(css).toContain('.qa-header-field-filter select')
expect(css).not.toContain('.qa-field-filters')
})
it('uses matching query/sync action sizing and keeps synchronization status outside the button baseline', () => {