Skip to content

Commit 5534f1e

Browse files
authored
Chore: Fix broken tests (#6458)
## Motivation for features / changes Somehow some tests got broken on master and caused nightly to fail https://github.com/tensorflow/tensorboard/actions/runs/5377348327/jobs/9755711856#step:11:2529
1 parent 2f8c65f commit 5534f1e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tensorboard/webapp/core/views/layout_test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ describe('layout test', () => {
8686
dispatchedActions.push(action);
8787
});
8888
store.overrideSelector(getSideBarWidthInPercent, 10);
89+
// When the runs table is full screen the width is overridden to 100%.
90+
store.overrideSelector(getRunsTableFullScreen, false);
8991
});
9092

9193
afterEach(() => {

tensorboard/webapp/runs/views/runs_table/runs_data_table.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ export class RunsDataTable {
8989
}
9090

9191
getRunIds() {
92-
return this.data.map((row) => row.id);
92+
return (this.data || []).map((row) => row.id);
9393
}
9494

9595
allRowsSelected() {
96-
return this.data.every((row) => row['selected']);
96+
return (this.data || []).every((row) => row['selected']);
9797
}
9898

9999
someRowsSelected() {
100-
return this.data.some((row) => row['selected']);
100+
return (this.data || []).some((row) => row['selected']);
101101
}
102102

103103
onFilterKeyUp(event: KeyboardEvent) {

0 commit comments

Comments
 (0)