File tree 1 file changed +6
-4
lines changed
src/material-experimental/mdc-tabs/tab-nav-bar
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', () => {
147
147
expect ( tabLinkElement . classList ) . toContain ( 'mat-mdc-tab-disabled' ) ;
148
148
} ) ;
149
149
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 ( ( ) => {
151
151
const inkBar = fixture . componentInstance . tabNavBar . _inkBar ;
152
152
153
153
spyOn ( inkBar , 'alignToElement' ) ;
154
154
155
155
dirChange . next ( ) ;
156
+ tick ( ) ;
156
157
fixture . detectChanges ( ) ;
157
158
158
159
expect ( inkBar . alignToElement ) . toHaveBeenCalled ( ) ;
159
- } ) ;
160
+ } ) ) ;
160
161
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 ( ( ) => {
162
163
const inkBar = fixture . componentInstance . tabNavBar . _inkBar ;
163
164
164
165
spyOn ( inkBar , 'alignToElement' ) ;
165
166
166
167
fixture . componentInstance . tabs = [ 1 , 2 , 3 , 4 ] ;
167
168
fixture . detectChanges ( ) ;
169
+ tick ( ) ;
168
170
169
171
expect ( inkBar . alignToElement ) . toHaveBeenCalled ( ) ;
170
- } ) ;
172
+ } ) ) ;
171
173
172
174
it ( 'should re-align the ink bar when the tab labels change the width' , done => {
173
175
const inkBar = fixture . componentInstance . tabNavBar . _inkBar ;
You can’t perform that action at this time.
0 commit comments