Skip to content

Commit 98f4932

Browse files
committed
change to treegrid
1 parent 1e900fd commit 98f4932

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/lib/core/data-table/data-table.spec.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)