@@ -7,11 +7,12 @@ import {
7
7
TestBed ,
8
8
tick
9
9
} from '@angular/core/testing' ;
10
- import { MatTable , MatTableDataSource , MatTableModule } from './index' ;
10
+ import { MatTable , MatTableModule } from './index' ;
11
11
import { DataSource } from '@angular/cdk/table' ;
12
12
import { BehaviorSubject , Observable } from 'rxjs' ;
13
13
import { 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' ;
15
16
import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
16
17
17
18
describe ( 'MDC-based MatTable' , ( ) => {
@@ -28,7 +29,6 @@ describe('MDC-based MatTable', () => {
28
29
StickyTableApp ,
29
30
TableWithNgContainerRow ,
30
31
NestedTableApp ,
31
- MatFlexTableApp ,
32
32
] ,
33
33
} ) . compileComponents ( ) ;
34
34
} ) ) ;
@@ -164,14 +164,6 @@ describe('MDC-based MatTable', () => {
164
164
expect ( tbody . textContent . trim ( ) ) . toContain ( 'No data' ) ;
165
165
} ) ;
166
166
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
-
175
167
} ) ;
176
168
177
169
it ( 'should render with MatTableDataSource and sort' , ( ) => {
@@ -221,13 +213,6 @@ describe('MDC-based MatTable', () => {
221
213
} ) . not . toThrow ( ) ;
222
214
} ) ) ;
223
215
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
-
231
216
describe ( 'with MatTableDataSource and sort/pagination/filter' , ( ) => {
232
217
let tableElement : HTMLElement ;
233
218
let fixture : ComponentFixture < ArrayDataSourceMatTableApp > ;
@@ -976,45 +961,6 @@ class TableWithNgContainerRow {
976
961
}
977
962
978
963
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
-
1018
964
function getElements ( element : Element , query : string ) : Element [ ] {
1019
965
return [ ] . slice . call ( element . querySelectorAll ( query ) ) ;
1020
966
}
0 commit comments