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', () => {
8181 expect ( row ) . toBeRole ( 'row' ) ;
8282 getCells ( row ) . forEach ( cell => expect ( cell ) . toBeRole ( 'gridcell' ) ) ;
8383 } ) ;
84+ } ) ;
85+ } ) ;
8486
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 ( ) ;
8890
89- expect ( fixture . nativeElement . querySelector ( 'cdk-table' ) ) . toBeRole ( 'custom-role' ) ;
90- } ) ;
91+ expect ( fixture . nativeElement . querySelector ( 'cdk-table' ) ) . toBeRole ( 'treegrid' ) ;
9192 } ) ;
9293
9394 it ( 'should re-render the rows when the data changes' , ( ) => {
@@ -263,7 +264,7 @@ class SimpleCdkTableApp {
263264
264265@Component ( {
265266 template : `
266- <cdk-table [dataSource]="dataSource" role="custom-role ">
267+ <cdk-table [dataSource]="dataSource" role="treegrid ">
267268 <ng-container cdkColumnDef="column_a">
268269 <cdk-header-cell *cdkHeaderCellDef> Column A</cdk-header-cell>
269270 <cdk-cell *cdkCellDef="let row"> {{row.a}}</cdk-cell>
You can’t perform that action at this time.
0 commit comments