File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -81,13 +81,14 @@ describe('CdkTable', () => {
81
81
expect ( row ) . toBeRole ( 'row' ) ;
82
82
getCells ( row ) . forEach ( cell => expect ( cell ) . toBeRole ( 'gridcell' ) ) ;
83
83
} ) ;
84
+ } ) ;
85
+ } ) ;
84
86
85
- // Check that if the component was created with a custom role, that it does not override it.
86
- fixture = TestBed . createComponent ( CustomRoleCdkTableApp ) ;
87
- fixture . detectChanges ( ) ;
87
+ it ( 'should not clobber an existing table role' , ( ) => {
88
+ fixture = TestBed . createComponent ( CustomRoleCdkTableApp ) ;
89
+ fixture . detectChanges ( ) ;
88
90
89
- expect ( fixture . nativeElement . querySelector ( 'cdk-table' ) ) . toBeRole ( 'custom-role' ) ;
90
- } ) ;
91
+ expect ( fixture . nativeElement . querySelector ( 'cdk-table' ) ) . toBeRole ( 'treegrid' ) ;
91
92
} ) ;
92
93
93
94
it ( 'should re-render the rows when the data changes' , ( ) => {
@@ -263,7 +264,7 @@ class SimpleCdkTableApp {
263
264
264
265
@Component ( {
265
266
template : `
266
- <cdk-table [dataSource]="dataSource" role="custom-role ">
267
+ <cdk-table [dataSource]="dataSource" role="treegrid ">
267
268
<ng-container cdkColumnDef="column_a">
268
269
<cdk-header-cell *cdkHeaderCellDef> Column A</cdk-header-cell>
269
270
<cdk-cell *cdkCellDef="let row"> {{row.a}}</cdk-cell>
You can’t perform that action at this time.
0 commit comments