Skip to content

Commit 2b68513

Browse files
authored
Clean Up: Use MatIconTestingModule in data table test (#6425)
## Motivation for features / changes The errors from using the regular MatIconModule in the test file does not effect the test. However, they do produce a lot of error logs. This eliminates those error logs which helps a lot when debugging. ## Technical description of changes Just a simple swap for our internal MatIconTestingModule which is used elsewhere and should have been used here from teh start.
1 parent 12e6bc3 commit 2b68513

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

tensorboard/webapp/widgets/data_table/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ tf_ts_library(
127127
":data_table",
128128
":types",
129129
"//tensorboard/webapp/angular:expect_angular_core_testing",
130-
"//tensorboard/webapp/angular:expect_angular_material_icon",
130+
"//tensorboard/webapp/testing:mat_icon",
131131
"@npm//@angular/core",
132132
"@npm//@angular/forms",
133133
"@npm//@angular/platform-browser",

tensorboard/webapp/widgets/data_table/data_table_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515

1616
import {Component, Input, ViewChild} from '@angular/core';
1717
import {ComponentFixture, TestBed} from '@angular/core/testing';
18-
import {MatIconModule} from '@angular/material/icon';
18+
import {MatIconTestingModule} from '../../testing/mat_icon_module';
1919
import {By} from '@angular/platform-browser';
2020
import {
2121
ColumnHeader,
@@ -80,7 +80,7 @@ describe('data table', () => {
8080
DataTableComponent,
8181
HeaderCellComponent,
8282
],
83-
imports: [MatIconModule, DataTableModule],
83+
imports: [MatIconTestingModule, DataTableModule],
8484
}).compileComponents();
8585
});
8686

tensorboard/webapp/widgets/data_table/header_cell_component_test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@ limitations under the License.
1515

1616
import {Component, Input, ViewChild} from '@angular/core';
1717
import {ComponentFixture, TestBed} from '@angular/core/testing';
18-
import {MatIconTestingModule} from '@angular/material/icon/testing';
18+
import {MatIconTestingModule} from '../../testing/mat_icon_module';
1919
import {By} from '@angular/platform-browser';
2020
import {
2121
ColumnHeader,
2222
ColumnHeaderType,
23-
TableData,
2423
SortingInfo,
2524
SortingOrder,
2625
} from './types';
27-
import {DataTableComponent} from './data_table_component';
2826
import {DataTableModule} from './data_table_module';
2927
import {HeaderCellComponent} from './header_cell_component';
3028

0 commit comments

Comments
 (0)