新增本周直接查询按钮,所选范围自动分批读取并校验总数、重复与游标完整性;删除手动加载更多,固定展示完整字段,空列不隐藏,不伪造译文或评估。 验证:全量、固定列及本周入口回归先红后绿;完整make verify通过,前端273通过;真实只读源浏览器默认及快捷查询均639条全部唯一展示,14必需字段按序,右侧字段可达、手机无外溢、JS异常0。无新增迁移或源库写入。
This commit is contained in:
@@ -50,17 +50,40 @@ const props = {
|
||||
}
|
||||
|
||||
describe('QA operations workbench', () => {
|
||||
it('shows populated columns in required order and keeps false/downvotes visible', () => {
|
||||
it('shows all required columns even when empty and keeps false/downvotes visible', () => {
|
||||
const html = renderToStaticMarkup(<QAOperationsView {...props} />)
|
||||
expect(html).toContain('原始问题')
|
||||
expect(html.indexOf('AI答案')).toBeLessThan(html.indexOf('是否覆盖'))
|
||||
expect(html.indexOf('是否正确')).toBeLessThan(html.indexOf('提问时间'))
|
||||
expect(html).toContain('否(点踩)')
|
||||
expect(html).toContain('是否正确')
|
||||
expect(html).not.toContain('<th>部门</th>')
|
||||
expect(html).not.toContain('<th>产品分类</th>')
|
||||
expect(html).toContain('<th>部门</th>')
|
||||
expect([...html.matchAll(/<th>(.*?)<\/th>/g)].slice(0, 14).map((match) => match[1])).toEqual([
|
||||
'中文问题',
|
||||
'AI答案',
|
||||
'是否覆盖',
|
||||
'是否正确',
|
||||
'产品分类',
|
||||
'问题类型',
|
||||
'根因分析',
|
||||
'提问时间',
|
||||
'提问人',
|
||||
'原始问题',
|
||||
'语言',
|
||||
'流程触发人员信息',
|
||||
'部门',
|
||||
'区域',
|
||||
])
|
||||
expect(html).toContain('<th>产品分类</th>')
|
||||
expect(html).not.toContain('<script>not executable</script>')
|
||||
})
|
||||
it('never shows a load-more control for the all-records table', () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<QAOperationsView {...props} page={{ ...page, total: 2, has_more: true, next_cursor: 'next' }} />
|
||||
)
|
||||
expect(html).not.toContain('加载更多')
|
||||
expect(html).not.toContain('空列按整个筛选结果隐藏')
|
||||
})
|
||||
it('distinguishes an unavailable source from a successful empty query', () => {
|
||||
const html = renderToStaticMarkup(<QAOperationsView {...props} page={null} error="只读源不可用" />)
|
||||
expect(html).toContain('role="alert"')
|
||||
|
||||
Reference in New Issue
Block a user