按已确认需求提供独立安全模型配置、真实探测、正式字典字段评估与原问题译中,持久批次支持只补空白、暂停恢复、有限重试、幂等和逐字段依据。覆盖固定规则、本地语言、组织关联与主表有效看板共用治理侧读模型,保留源生产和冻结历史。 验证:完整 make verify 退出0,702项Go与329项前端通过;默认118项外部/隔离集成明确跳过,另跑完整镜像及组织隔离PG竞态。12并发、输入漂移、过期租约、暂停/恢复及有限重试通过。用户授权的百炼 deepseek-v4.1-flash 完成真实后台与浏览器评估/翻译;552行、16列、11块看板及完整PNG、独立配置页测试/保存、重开恢复和零JS异常通过。仅非业务样本外发,自动处理关闭,原payload不变。 上线前治理库已做导出快照原生备份并真实恢复,60表行数与17个QA表内容哈希一致;不修改DobotAI生产或隧道。本提交时尚未部署,线上验收须独立完成。
This commit is contained in:
@@ -50,6 +50,71 @@ const props = {
|
||||
}
|
||||
|
||||
describe('QA operations workbench', () => {
|
||||
it('shows each persisted AI task in the existing operation cell and explains positive master coverage', () => {
|
||||
const withTasks = {
|
||||
...item,
|
||||
background_tasks: [
|
||||
{
|
||||
id: 'w',
|
||||
record_id: item.id,
|
||||
kind: 'evaluation' as const,
|
||||
state: 'running' as const,
|
||||
stage: 'request',
|
||||
attempt: 1,
|
||||
error_code: '',
|
||||
skip_reason: '',
|
||||
started_at: '2026-10-19T00:00:00Z',
|
||||
updated_at: '2026-10-19T00:00:01Z',
|
||||
},
|
||||
],
|
||||
}
|
||||
const detail = {
|
||||
...item,
|
||||
record_origin: 'dobotai_2_0' as const,
|
||||
coverage: { state: 'checked' as const, verdict: 'covered' as const, rule_version: 'master-answer-substring-v2' },
|
||||
}
|
||||
const html = renderToStaticMarkup(
|
||||
<QAOperationsView {...props} page={{ ...page, items: [withTasks] }} detail={detail} />
|
||||
)
|
||||
expect(html).toContain('字段分析:执行中')
|
||||
expect(html).toContain('已覆盖:成功读取且非空答案未包含')
|
||||
expect(html).toContain('字段结论与依据')
|
||||
})
|
||||
|
||||
it('hides only the two requested advisory warnings, not real errors', () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<QAOperationsView
|
||||
{...props}
|
||||
status={{
|
||||
state: 'connected',
|
||||
code: '',
|
||||
warnings: ['database_temp_enabled', 'database_transport_unencrypted', 'fixture_other_warning'],
|
||||
read_only: true,
|
||||
source_version: '2.0',
|
||||
channel: 'dingtalk',
|
||||
}}
|
||||
error="fixture real read failure"
|
||||
/>
|
||||
)
|
||||
expect(html).not.toContain('数据库仍允许临时对象')
|
||||
expect(html).not.toContain('数据库连接未启用 TLS')
|
||||
expect(html).toContain('数据源有待审核的安全告警')
|
||||
expect(html).toContain('fixture real read failure')
|
||||
})
|
||||
it('keeps a name-only person summary with the original available separately', () => {
|
||||
const detail = { ...item, trigger_person: JSON.stringify({ name: '示例姓名', unionId: 'fixture-union' }) }
|
||||
const html = renderToStaticMarkup(<QAOperationsView {...props} detail={detail} />)
|
||||
expect(html).toContain('<dd>示例姓名</dd>')
|
||||
expect(html).toContain('原始人员信息')
|
||||
expect(html).toContain('fixture-union')
|
||||
})
|
||||
it('provides a row-level detail target and categorical color tags without adding business columns', () => {
|
||||
const html = renderToStaticMarkup(<QAOperationsView {...props} />)
|
||||
expect(html).toContain('data-qa-row="fixture"')
|
||||
expect(html).toContain('双击行查看详情')
|
||||
expect(html).toContain('qa-field-tag')
|
||||
})
|
||||
|
||||
it('uses the four requested destinations in their fixed order', () => {
|
||||
const html = renderToStaticMarkup(<QAOperationsTabs view="records" onChange={vi.fn()} />)
|
||||
const labels = ['问题流水', '问题统计看板', '区域配置', '周报生成']
|
||||
|
||||
Reference in New Issue
Block a user