Skip to content

Commit 179c1fc

Browse files
committed
更新 PageContainer 测试用例,修正面包屑渲染逻辑的验证,确保在 breadcrumbRender={false} 时面包屑被正确禁用。
1 parent 0047143 commit 179c1fc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/layout/pageContainer.test.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,10 @@ describe('PageContainer', () => {
558558
/>,
559559
);
560560

561-
await waitFor(() => {
562-
html.findByAltText('diss');
563-
});
564-
565-
expect(!!html.container.innerText).toBe(false);
561+
// 当 breadcrumbRender={false} 时,面包屑应该被禁用
562+
expect(
563+
html.container.querySelector('.ant-page-header-has-breadcrumb'),
564+
).toBeNull();
566565

567566
html.rerender(
568567
<PageContainer

0 commit comments

Comments
 (0)