Skip to content

Commit 00f1c58

Browse files
authored
Fixed test group results table to display extra_info field from all test groups (#7710)
1 parent 2ca6a7b commit 00f1c58

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Fix name column search in graders table (#7693)
1414
- Check against mtime instead of atime for clean up of git repo directories in tmp folder (#7706)
1515
- Update Model: Fix level validation checks through use of a custom validator (#7696)
16+
- Fixed test group results table to display `extra_info` field from all test groups (#7710)
1617

1718
### 🔧 Internal changes
1819
- Updated Github Actions CI to use cache-apt-pkgs to speed up workflow runs (#7645)

app/javascript/Components/test_run_table.jsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,21 @@ class TestGroupResultTable extends React.Component {
309309
};
310310

311311
render() {
312-
const extraInfo = this.props.data[0]["test_group_results.extra_info"];
312+
const seen = new Set();
313+
const extraInfo = this.props.data
314+
.reduce((acc, test_data) => {
315+
const id = test_data["test_groups.id"];
316+
const name = (test_data["test_groups.name"] || "").trim();
317+
const info = (test_data["test_group_results.extra_info"] || "").trim();
318+
319+
if (!seen.has(id) && info) {
320+
seen.add(id);
321+
acc.push(`[${name}]`, info);
322+
}
323+
324+
return acc;
325+
}, [])
326+
.join("\n");
313327
let extraInfoDisplay;
314328
if (extraInfo) {
315329
extraInfoDisplay = (

0 commit comments

Comments
 (0)