From 533765214aa30dae90517fdd9c8c16703371ef20 Mon Sep 17 00:00:00 2001 From: Liyulun <466214245@qq.com> Date: Tue, 14 Jul 2020 14:46:36 +0800 Subject: [PATCH] fix(module: tree): fix nzBlockNode not work (#5507) * fix(module: tree): fix nzBlockNode not work * test: add test for nzBlockNode --- components/tree/tree.component.ts | 6 +++--- components/tree/tree.spec.ts | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/tree/tree.component.ts b/components/tree/tree.component.ts index fadf2f7b57b..c022d2408b7 100644 --- a/components/tree/tree.component.ts +++ b/components/tree/tree.component.ts @@ -59,12 +59,12 @@ const NZ_CONFIG_COMPONENT_NAME = 'tree';
-
+
{ fixture.detectChanges(); expect((nativeElement.querySelector("[title='0-2']") as HTMLElement).querySelector('.ant-tree-indent')).toBeDefined(); })); + + it('should nzBlockNode work', fakeAsync(() => { + const { fixture, nativeElement } = testBed; + fixture.detectChanges(); + const treeElement = nativeElement.querySelector('.ant-tree') as HTMLElement; + expect(treeElement.classList).toContain('ant-tree-block-node'); + })); }); });