import { renderToStaticMarkup } from 'react-dom/server' import { describe, expect, it, vi } from 'vitest' import { ScopeRuleEditor } from './ScopeRuleEditor' describe('ScopeRuleEditor',()=>{ it('explains directory inheritance and keeps production publication separate',()=>{ const html=renderToStaticMarkup() for(const text of ['此目录及子目录','当前设置:对内','由 engineer 设置','移除本级设置,恢复继承','不会自动发布到生产']) expect(html).toContain(text) expect(html).not.toContain('操作人{ const html=renderToStaticMarkup() expect(html).toContain('整个来源') expect(html).toContain('当前没有本级设置') expect(html).toContain('拟修改为') expect(html).toContain('选择新范围') expect(html).not.toContain('移除本级设置') }) })