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', () => {
54
54
55
55
// After the tooltip delay elapses, expect that the tooltip is not visible.
56
56
tick ( TOOLTIP_HIDE_DELAY ) ;
57
+ fixture . detectChanges ( ) ;
57
58
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
+ } ) ;
58
64
} ) ) ;
59
65
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 ( ( ) => {
61
67
tooltipDirective . show ( ) ;
62
68
expect ( tooltipDirective . _isTooltipVisible ( ) ) . toBe ( true ) ;
63
69
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ export class TooltipComponent {
262
262
_afterVisibilityAnimation ( e : AnimationTransitionEvent ) : void {
263
263
if ( e . toState === 'hidden' && ! this . isVisible ( ) ) {
264
264
this . _onHide . next ( ) ;
265
+
265
266
}
266
267
}
267
268
You can’t perform that action at this time.
0 commit comments