import { renderToStaticMarkup } from 'react-dom/server' import { describe,expect,it,vi } from 'vitest' import { ReleasePlannerView } from './ReleasePlanner' import { simulatedReleaseCandidates } from './releasePlanner' describe('ReleasePlannerView',()=>{ it('shows a four-step document release plan with explicit closure and production gates',()=>{ const html=renderToStaticMarkup() for(const text of ['本地模拟发布准备','1. 选择文档','2. 检查数据闭包','3. 锁定清单','4. 生产负责人授权','[模拟] CR5用户手册.pdf','切片 186','向量 186','Wiki 完整','图谱 完整','闭包完整','文档级:','闭包可独立验证','整知识库:','Wiki或图谱共享','推荐方式','文档级同步','生产发布已关闭','生产备份到OSS:尚未配置'])expect(html).toContain(text) expect(html).not.toContain('>授权生产发布') }) it('forces whole knowledge-base mode for shared graph data and blocks failed parsing',()=>{ const whole=renderToStaticMarkup() expect(whole).toContain('整知识库同步') expect(whole).toContain('图谱 共享,需整库') const failed=renderToStaticMarkup() expect(failed).toContain('当前清单不能同步') expect(failed).toContain('闭包不完整') }) })