Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,27 +147,29 @@ describe('MDC-based MatTabNavBar', () => {
expect(tabLinkElement.classList).toContain('mat-mdc-tab-disabled');
});

it('should re-align the ink bar when the direction changes', () => {
it('should re-align the ink bar when the direction changes', fakeAsync(() => {
const inkBar = fixture.componentInstance.tabNavBar._inkBar;

spyOn(inkBar, 'alignToElement');

dirChange.next();
tick();
fixture.detectChanges();

expect(inkBar.alignToElement).toHaveBeenCalled();
});
}));

it('should re-align the ink bar when the tabs list change', () => {
it('should re-align the ink bar when the tabs list change', fakeAsync(() => {
const inkBar = fixture.componentInstance.tabNavBar._inkBar;

spyOn(inkBar, 'alignToElement');

fixture.componentInstance.tabs = [1, 2, 3, 4];
fixture.detectChanges();
tick();

expect(inkBar.alignToElement).toHaveBeenCalled();
});
}));

it('should re-align the ink bar when the tab labels change the width', done => {
const inkBar = fixture.componentInstance.tabNavBar._inkBar;
Expand Down