@@ -442,7 +442,7 @@ describe('CdkTree', () => {
442442 fixture . detectChanges ( ) ;
443443 } ) ;
444444
445- it ( 'should expand/collapse the node' , ( ) => {
445+ it ( 'should expand/collapse the node multiple times ' , ( ) => {
446446 component . toggleRecursively = false ;
447447 let data = dataSource . data ;
448448 const child = dataSource . addChild ( data [ 1 ] , false ) ;
@@ -477,6 +477,17 @@ describe('CdkTree', () => {
477477 [ `topping_3 - cheese_3 + base_3` ] ) ;
478478 expect ( component . treeControl . expansionModel . selected . length )
479479 . toBe ( 0 , `Expect node collapsed` ) ;
480+
481+ ( getNodes ( treeElement ) [ 1 ] as HTMLElement ) . click ( ) ;
482+ fixture . detectChanges ( ) ;
483+
484+ expect ( component . treeControl . expansionModel . selected . length )
485+ . toBe ( 1 , `Expect node expanded` ) ;
486+ expectNestedTreeToMatch ( treeElement ,
487+ [ `topping_1 - cheese_1 + base_1` ] ,
488+ [ `topping_2 - cheese_2 + base_2` ] ,
489+ [ _ , `topping_4 - cheese_4 + base_4` ] ,
490+ [ `topping_3 - cheese_3 + base_3` ] ) ;
480491 } ) ;
481492
482493 it ( 'should expand/collapse the node recursively' , ( ) => {
0 commit comments