File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,16 @@ describe('MdTooltip', () => {
5454
5555 // After the tooltip delay elapses, expect that the tooltip is not visible.
5656 tick ( TOOLTIP_HIDE_DELAY ) ;
57+ fixture . detectChanges ( ) ;
5758 expect ( tooltipDirective . _isTooltipVisible ( ) ) . toBe ( false ) ;
59+
60+ // On animation complete, should expect that the tooltip has been detached.
61+ fixture . whenStable ( ) . then ( ( ) => {
62+ expect ( tooltipDirective . _tooltipInstance ) . toBeNull ( ) ;
63+ } ) ;
5864 } ) ) ;
5965
60- it ( 'should not follow through with hide if show is called after' , fakeAsync ( ( ) => {
66+ it ( 'should not follow through with hide if show is called after' , fakeAsync ( ( ) => {
6167 tooltipDirective . show ( ) ;
6268 expect ( tooltipDirective . _isTooltipVisible ( ) ) . toBe ( true ) ;
6369
Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ export class TooltipComponent {
268268 _afterVisibilityAnimation ( e : AnimationTransitionEvent ) : void {
269269 if ( e . toState === 'hidden' && ! this . isVisible ( ) ) {
270270 this . _onHide . next ( ) ;
271+
271272 }
272273 }
273274
You can’t perform that action at this time.
0 commit comments