File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/material-experimental/mdc-tabs/tab-nav-bar Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -147,27 +147,29 @@ describe('MDC-based MatTabNavBar', () => {
147147 expect ( tabLinkElement . classList ) . toContain ( 'mat-mdc-tab-disabled' ) ;
148148 } ) ;
149149
150- it ( 'should re-align the ink bar when the direction changes' , ( ) => {
150+ it ( 'should re-align the ink bar when the direction changes' , fakeAsync ( ( ) => {
151151 const inkBar = fixture . componentInstance . tabNavBar . _inkBar ;
152152
153153 spyOn ( inkBar , 'alignToElement' ) ;
154154
155155 dirChange . next ( ) ;
156+ tick ( ) ;
156157 fixture . detectChanges ( ) ;
157158
158159 expect ( inkBar . alignToElement ) . toHaveBeenCalled ( ) ;
159- } ) ;
160+ } ) ) ;
160161
161- it ( 'should re-align the ink bar when the tabs list change' , ( ) => {
162+ it ( 'should re-align the ink bar when the tabs list change' , fakeAsync ( ( ) => {
162163 const inkBar = fixture . componentInstance . tabNavBar . _inkBar ;
163164
164165 spyOn ( inkBar , 'alignToElement' ) ;
165166
166167 fixture . componentInstance . tabs = [ 1 , 2 , 3 , 4 ] ;
167168 fixture . detectChanges ( ) ;
169+ tick ( ) ;
168170
169171 expect ( inkBar . alignToElement ) . toHaveBeenCalled ( ) ;
170- } ) ;
172+ } ) ) ;
171173
172174 it ( 'should re-align the ink bar when the tab labels change the width' , done => {
173175 const inkBar = fixture . componentInstance . tabNavBar . _inkBar ;
You can’t perform that action at this time.
0 commit comments