@@ -208,6 +208,18 @@ describe('MatTabGroup', () => {
208208 expect ( tabs [ 1 ] . isActive ) . toBe ( false ) ;
209209 expect ( tabs [ 2 ] . isActive ) . toBe ( true ) ;
210210 } ) ;
211+
212+ it ( 'should fire animation done event' , fakeAsync ( ( ) => {
213+ fixture . detectChanges ( ) ;
214+
215+ spyOn ( fixture . componentInstance , 'animationDone' ) ;
216+ let tabLabel = fixture . debugElement . queryAll ( By . css ( '.mat-tab-label' ) ) [ 1 ] ;
217+ tabLabel . nativeElement . click ( ) ;
218+ fixture . detectChanges ( ) ;
219+ tick ( ) ;
220+
221+ expect ( fixture . componentInstance . animationDone ) . toHaveBeenCalled ( ) ;
222+ } ) ) ;
211223 } ) ;
212224
213225 describe ( 'disable tabs' , ( ) => {
@@ -430,6 +442,7 @@ describe('nested MatTabGroup with enabled animations', () => {
430442 [(selectedIndex)]="selectedIndex"
431443 [headerPosition]="headerPosition"
432444 [disableRipple]="disableRipple"
445+ (animationDone)="animationDone()"
433446 (focusChange)="handleFocus($event)"
434447 (selectedTabChange)="handleSelection($event)">
435448 <mat-tab>
@@ -460,6 +473,7 @@ class SimpleTabsTestApp {
460473 handleSelection ( event : any ) {
461474 this . selectEvent = event ;
462475 }
476+ animationDone ( ) { }
463477}
464478
465479@Component ( {
0 commit comments