@@ -622,6 +622,23 @@ describe('MDC-based MatTabGroup', () => {
622622 jasmine . objectContaining ( { index : 1 } ) ,
623623 ) ;
624624 } ) ) ;
625+
626+ it ( 'should be able to disable the pagination' , fakeAsync ( ( ) => {
627+ fixture . componentInstance . disablePagination = true ;
628+ fixture . detectChanges ( ) ;
629+ tick ( ) ;
630+
631+ for ( let i = 0 ; i < 50 ; i ++ ) {
632+ fixture . componentInstance . tabs . push ( { label : `Extra ${ i } ` , content : '' } ) ;
633+ }
634+
635+ fixture . detectChanges ( ) ;
636+ tick ( ) ;
637+
638+ expect (
639+ fixture . nativeElement . querySelector ( '.mat-mdc-tab-header-pagination-controls-enabled' ) ,
640+ ) . toBeFalsy ( ) ;
641+ } ) ) ;
625642 } ) ;
626643
627644 describe ( 'async tabs' , ( ) => {
@@ -1111,7 +1128,8 @@ class SimpleTabsTestApp {
11111128 <mat-tab-group class="tab-group"
11121129 [(selectedIndex)]="selectedIndex"
11131130 (focusChange)="handleFocus($event)"
1114- (selectedTabChange)="handleSelection($event)">
1131+ (selectedTabChange)="handleSelection($event)"
1132+ [disablePagination]="disablePagination">
11151133 <mat-tab *ngFor="let tab of tabs">
11161134 <ng-template mat-tab-label>{{tab.label}}</ng-template>
11171135 {{tab.content}}
@@ -1128,6 +1146,7 @@ class SimpleDynamicTabsTestApp {
11281146 selectedIndex : number = 1 ;
11291147 focusEvent : any ;
11301148 selectEvent : any ;
1149+ disablePagination = false ;
11311150 handleFocus ( event : any ) {
11321151 this . focusEvent = event ;
11331152 }
0 commit comments