@@ -27,6 +27,7 @@ describe('SourceCatalogBrowserView',()=>{
|
||||
expect(html).toContain('aria-label="返回上一级"')
|
||||
expect(html).not.toContain('role="tree"')
|
||||
expect(html).not.toContain('目录树')
|
||||
for(const text of ['禁止导入即生效','<th>大小</th>','大小未提供','总大小','已知合计'])expect(html).not.toContain(text)
|
||||
expect(html).toContain('<details class="catalog-format-filter">')
|
||||
expect(html).toContain('<summary>文件格式筛选</summary>')
|
||||
expect(html).not.toMatch(/<details[^>]*class="catalog-format-filter"[^>]*open/)
|
||||
@@ -104,7 +105,7 @@ describe('SourceCatalogBrowserView',()=>{
|
||||
it('shows policy as a read-only table state and offers top-level policy buttons',()=>{
|
||||
const nested={...page,current:{...page.current,node_id:'folder-1',parent_node_id:'root-1',name:'01|产品总览与定位'},breadcrumbs:[...page.breadcrumbs,{node_id:'folder-1',name:'01|产品总览与定位'}],items:[node('可入队.pdf','file','file-ready'),node('已知目录','folder','folder-known'),{...node('大小未知目录','folder','folder-unknown'),subtree_bytes:0},{...node('只有元数据.pdf','file','file-meta'),size_bytes:undefined,routable_count:0}],total:4}
|
||||
const html=renderToStaticMarkup(<SourceCatalogBrowserView sources={[source]} selectedSource={source} page={nested} loading={false} error={null} routingCapabilities={{internal_enabled:true,external_enabled:true}} onSelectSource={vi.fn()} onOpenFolder={vi.fn()} onNavigateTo={vi.fn()} onBack={vi.fn()} onPageChange={vi.fn()} onRefresh={vi.fn()} onRoute={vi.fn()} />)
|
||||
for(const text of ['名称','处理策略','全选当前页','对内','对外','禁止导入','禁止导入即生效:待入库条目自动撤销','aria-label="选择可入队.pdf"','大小未提供','已知合计 1.0 KB'])expect(html).toContain(text)
|
||||
for(const text of ['名称','处理策略','全选当前页','对内','对外','禁止导入','aria-label="选择可入队.pdf"'])expect(html).toContain(text)
|
||||
for(const text of ['class="catalog-policy-actions"','class="internal-policy-button"','class="external-policy-button"','class="blocked-policy-button"','class="selected-count"'])expect(html).toContain(text)
|
||||
for(const text of ['操作人','判断原因','名称与处理策略','当前策略','选择策略','批量处理策略','应用策略','对内 + 对外','<select'])expect(html).not.toContain(text)
|
||||
expect(html).not.toContain('批量标注对内并入队')
|
||||
|
||||
Reference in New Issue
Block a user