@@ -7,11 +7,12 @@ import {
77 TestBed ,
88 tick
99} from '@angular/core/testing' ;
10- import { MatTable , MatTableDataSource , MatTableModule } from './index' ;
10+ import { MatTable , MatTableModule } from './index' ;
1111import { DataSource } from '@angular/cdk/table' ;
1212import { BehaviorSubject , Observable } from 'rxjs' ;
1313import { MatSort , MatSortHeader , MatSortModule } from '@angular/material/sort' ;
14- import { MatPaginator , MatPaginatorModule } from '@angular/material-experimental/mdc-paginator' ;
14+ import { MatPaginator , MatPaginatorModule } from '@angular/material/paginator' ;
15+ import { MatTableDataSource } from '@angular/material/table' ;
1516import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
1617
1718describe ( 'MDC-based MatTable' , ( ) => {
@@ -28,7 +29,6 @@ describe('MDC-based MatTable', () => {
2829 StickyTableApp ,
2930 TableWithNgContainerRow ,
3031 NestedTableApp ,
31- MatFlexTableApp ,
3232 ] ,
3333 } ) . compileComponents ( ) ;
3434 } ) ) ;
@@ -164,14 +164,6 @@ describe('MDC-based MatTable', () => {
164164 expect ( tbody . textContent . trim ( ) ) . toContain ( 'No data' ) ;
165165 } ) ;
166166
167- it ( 'should set the content styling class on the tbody' , ( ) => {
168- let fixture = TestBed . createComponent ( NativeHtmlTableApp ) ;
169- fixture . detectChanges ( ) ;
170-
171- const tbodyElement = fixture . nativeElement . querySelector ( 'tbody' ) ;
172- expect ( tbodyElement . classList ) . toContain ( 'mdc-data-table__content' ) ;
173- } ) ;
174-
175167 } ) ;
176168
177169 it ( 'should render with MatTableDataSource and sort' , ( ) => {
@@ -221,13 +213,6 @@ describe('MDC-based MatTable', () => {
221213 } ) . not . toThrow ( ) ;
222214 } ) ) ;
223215
224- it ( 'should be able to render a flexbox-based table' , ( ) => {
225- expect ( ( ) => {
226- const fixture = TestBed . createComponent ( MatFlexTableApp ) ;
227- fixture . detectChanges ( ) ;
228- } ) . not . toThrow ( ) ;
229- } ) ;
230-
231216 describe ( 'with MatTableDataSource and sort/pagination/filter' , ( ) => {
232217 let tableElement : HTMLElement ;
233218 let fixture : ComponentFixture < ArrayDataSourceMatTableApp > ;
@@ -976,45 +961,6 @@ class TableWithNgContainerRow {
976961}
977962
978963
979- @Component ( {
980- template : `
981- <mat-table [dataSource]="dataSource">
982- <ng-container matColumnDef="column_a">
983- <mat-header-cell *matHeaderCellDef> Column A</mat-header-cell>
984- <mat-cell *matCellDef="let row"> {{row.a}}</mat-cell>
985- <mat-footer-cell *matFooterCellDef> Footer A</mat-footer-cell>
986- </ng-container>
987-
988- <ng-container matColumnDef="column_b">
989- <mat-header-cell *matHeaderCellDef> Column B</mat-header-cell>
990- <mat-cell *matCellDef="let row"> {{row.b}}</mat-cell>
991- <mat-footer-cell *matFooterCellDef> Footer B</mat-footer-cell>
992- </ng-container>
993-
994- <ng-container matColumnDef="column_c">
995- <mat-header-cell *matHeaderCellDef> Column C</mat-header-cell>
996- <mat-cell *matCellDef="let row"> {{row.c}}</mat-cell>
997- <mat-footer-cell *matFooterCellDef> Footer C</mat-footer-cell>
998- </ng-container>
999-
1000- <ng-container matColumnDef="special_column">
1001- <mat-cell *matCellDef="let row"> fourth_row </mat-cell>
1002- </ng-container>
1003-
1004- <mat-header-row *matHeaderRowDef="columnsToRender"></mat-header-row>
1005- <mat-row *matRowDef="let row; columns: columnsToRender"></mat-row>
1006- <div *matNoDataRow>No data</div>
1007- <mat-footer-row *matFooterRowDef="columnsToRender"></mat-footer-row>
1008- </mat-table>
1009- `
1010- } )
1011- class MatFlexTableApp {
1012- dataSource : FakeDataSource | null = new FakeDataSource ( ) ;
1013- columnsToRender = [ 'column_a' , 'column_b' , 'column_c' ] ;
1014- @ViewChild ( MatTable ) table : MatTable < TestData > ;
1015- }
1016-
1017-
1018964function getElements ( element : Element , query : string ) : Element [ ] {
1019965 return [ ] . slice . call ( element . querySelectorAll ( query ) ) ;
1020966}
0 commit comments