feat(qaops): 完成详情下拉与每周自动保存草稿
build / build (push) Successful in 1m7s

详情使用共享主表字典,稀疏修改所选字段并保留原始问答及旧复核审计。
月周统计提供文本和下拉双入口;每租户每周一份持久草稿,按技能六节双语模板真实预填。
加入幂等自动保存、冲突保留、未知响应重试、切周及离开保护和schema58非破坏降级保护。

验证:完整make verify、隔离PostgreSQL全mirror竞态回归、真实恢复库浏览器验收通过。
浏览器实测字段精确读回、月周双输入、模板预填、MD/CSV、自动保存、冲突、失败重试与API重启恢复。
未连接或改写DobotAI生产源库,未运行付费模型;提交时尚未部署。
This commit is contained in:
姚章浩
2026-10-20 05:41:57 +08:00
parent 154b0b62ad
commit 87f97a2f9b
47 changed files with 2587 additions and 180 deletions
+17
View File
@@ -0,0 +1,17 @@
import { renderToStaticMarkup } from 'react-dom/server'
import { describe, it, expect, vi } from 'vitest'
import { QAPeriodInput } from './QAPeriodInput'
describe('one period value with two input methods', () => {
it('offers a text input and dropdown for both months and ISO weeks', () => {
for (const kind of ['month', 'week'] as const) {
const value = kind === 'month' ? '2026-10' : '2026-W43'
const html = renderToStaticMarkup(
<QAPeriodInput kind={kind} label="统计周期" ariaLabel="测试周期" value={value} max={value} onChange={vi.fn()} />
)
expect(html).toContain('type="text"')
expect(html).toContain('<select')
expect(html).toContain(`value="${value}"`)
expect(html).toContain('测试周期下拉选择')
}
})
})