@@ -12,7 +12,6 @@ import {
12
12
ViewChild ,
13
13
TrackByFunction ,
14
14
Type ,
15
- provideZoneChangeDetection ,
16
15
EventEmitter ,
17
16
ViewChildren ,
18
17
QueryList ,
@@ -30,7 +29,7 @@ import {NestedTreeControl} from './control/nested-tree-control';
30
29
import { CdkTreeModule , CdkTreeNodePadding } from './index' ;
31
30
import { CdkTree , CdkTreeNode } from './tree' ;
32
31
33
- describe ( 'CdkTree' , ( ) => {
32
+ describe ( 'CdkTree with TreeControl ' , ( ) => {
34
33
/** Represents an indent for expectNestedTreeToMatch */
35
34
const _ = { } ;
36
35
let dataSource : FakeDataSource ;
@@ -42,7 +41,6 @@ describe('CdkTree', () => {
42
41
TestBed . configureTestingModule ( {
43
42
imports : [ CdkTreeModule ] ,
44
43
providers : [
45
- provideZoneChangeDetection ( ) ,
46
44
{
47
45
provide : Directionality ,
48
46
useFactory : ( ) => ( dir = { value : 'ltr' , change : new EventEmitter < Direction > ( ) } ) ,
@@ -150,6 +148,7 @@ describe('CdkTree', () => {
150
148
151
149
it ( 'should be able to use units different from px for the indentation' , ( ) => {
152
150
component . indent = '15rem' ;
151
+ fixture . changeDetectorRef . markForCheck ( ) ;
153
152
fixture . detectChanges ( ) ;
154
153
155
154
const data = dataSource . data ;
@@ -166,6 +165,7 @@ describe('CdkTree', () => {
166
165
167
166
it ( 'should default to px if no unit is set for string value indentation' , ( ) => {
168
167
component . indent = '17' ;
168
+ fixture . changeDetectorRef . markForCheck ( ) ;
169
169
fixture . detectChanges ( ) ;
170
170
171
171
const data = dataSource . data ;
@@ -182,6 +182,7 @@ describe('CdkTree', () => {
182
182
183
183
it ( 'should be able to set zero as the indent level' , ( ) => {
184
184
component . paddingNodes . forEach ( node => ( node . level = 0 ) ) ;
185
+ fixture . changeDetectorRef . markForCheck ( ) ;
185
186
fixture . detectChanges ( ) ;
186
187
187
188
const data = dataSource . data ;
@@ -200,6 +201,7 @@ describe('CdkTree', () => {
200
201
const node = getNodes ( treeElement ) [ 0 ] ;
201
202
202
203
component . indent = 10 ;
204
+ fixture . changeDetectorRef . markForCheck ( ) ;
203
205
fixture . detectChanges ( ) ;
204
206
205
207
expect ( node . style . paddingLeft ) . toBe ( '10px' ) ;
@@ -391,6 +393,7 @@ describe('CdkTree', () => {
391
393
) ;
392
394
393
395
dataSource . addChild ( data [ 1 ] ) ;
396
+ fixture . changeDetectorRef . markForCheck ( ) ;
394
397
fixture . detectChanges ( ) ;
395
398
396
399
treeElement = fixture . nativeElement . querySelector ( 'cdk-tree' ) ;
@@ -771,6 +774,7 @@ describe('CdkTree', () => {
771
774
let data = dataSource . data ;
772
775
const child = dataSource . addChild ( data [ 1 ] , false ) ;
773
776
dataSource . addChild ( child , false ) ;
777
+ fixture . changeDetectorRef . markForCheck ( ) ;
774
778
fixture . detectChanges ( ) ;
775
779
776
780
( getNodes ( treeElement ) [ 1 ] as HTMLElement ) . click ( ) ;
@@ -793,6 +797,7 @@ describe('CdkTree', () => {
793
797
const child = dataSource . addChild ( data [ 1 ] , false ) ;
794
798
dataSource . addChild ( child , false ) ;
795
799
800
+ fixture . changeDetectorRef . markForCheck ( ) ;
796
801
fixture . detectChanges ( ) ;
797
802
798
803
expectNestedTreeToMatch (
@@ -1192,6 +1197,7 @@ describe('CdkTree', () => {
1192
1197
1193
1198
it ( 'ignores clicks on disabled items' , ( ) => {
1194
1199
dataSource . data [ 1 ] . isDisabled = true ;
1200
+ fixture . changeDetectorRef . markForCheck ( ) ;
1195
1201
fixture . detectChanges ( ) ;
1196
1202
1197
1203
nodes [ 1 ] . click ( ) ;
0 commit comments