File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -611,6 +611,19 @@ describe('CdkTable', () => {
611
611
it ( 'should not clobber an existing table role' , ( ) => {
612
612
setupTableTestApp ( CustomRoleCdkTableApp ) ;
613
613
expect ( tableElement . getAttribute ( 'role' ) ) . toBe ( 'treegrid' ) ;
614
+
615
+ expect ( getHeaderRows ( tableElement ) [ 0 ] . getAttribute ( 'role' ) ) . toBe ( 'row' ) ;
616
+ const header = getHeaderRows ( tableElement ) [ 0 ] ;
617
+ getHeaderCells ( header ) . forEach ( cell => {
618
+ expect ( cell . getAttribute ( 'role' ) ) . toBe ( 'columnheader' ) ;
619
+ } ) ;
620
+
621
+ getRows ( tableElement ) . forEach ( row => {
622
+ expect ( row . getAttribute ( 'role' ) ) . toBe ( 'row' ) ;
623
+ getCells ( row ) . forEach ( cell => {
624
+ expect ( cell . getAttribute ( 'role' ) ) . toBe ( 'gridcell' ) ;
625
+ } ) ;
626
+ } ) ;
614
627
} ) ;
615
628
616
629
it ( 'should throw an error if two column definitions have the same name' , ( ) => {
You can’t perform that action at this time.
0 commit comments