diff --git a/center/src/main/java/com/microsoft/hydralab/center/service/TestDataService.java b/center/src/main/java/com/microsoft/hydralab/center/service/TestDataService.java index 5e29012ff..2ad31d828 100644 --- a/center/src/main/java/com/microsoft/hydralab/center/service/TestDataService.java +++ b/center/src/main/java/com/microsoft/hydralab/center/service/TestDataService.java @@ -271,6 +271,7 @@ public void saveTestRunGPTSuggestion(TestRun testRun, String suggestion) { public void saveTestCaseGPTSuggestion(AndroidTestUnit testCase, String suggestion) { testCase.setSuggestion(suggestion); androidTestUnitRepository.save(testCase); + keyValueRepository.saveAndroidTestUnit(testCase); } public TestRun findTestRunById(String testRunId) { diff --git a/react/src/component/PropertyTable.jsx b/react/src/component/PropertyTable.jsx index a4e4852c3..f83cd20c6 100644 --- a/react/src/component/PropertyTable.jsx +++ b/react/src/component/PropertyTable.jsx @@ -71,7 +71,7 @@ export default class AdaptivePropertyTable extends React.Component { {key} - {showedValueElement ? showedValueElement : value.toString()} + { showedValueElement ? showedValueElement : value.toString() } ) } else { @@ -105,14 +105,24 @@ export default class AdaptivePropertyTable extends React.Component { } - return - - {titlePart} - - {pList} - -
-
+ return
+ + + {titlePart} + + {pList} + +
+
+ + + + + + +
+
+
} componentDidMount() { diff --git a/react/src/component/SearchView.jsx b/react/src/component/SearchView.jsx index 8f543ab1a..a80072367 100644 --- a/react/src/component/SearchView.jsx +++ b/react/src/component/SearchView.jsx @@ -199,15 +199,35 @@ export default class SearchView extends BaseView { const vList = [res.data.content.videoBlobUrl + '?' + require('local-storage').get('FileToken')] const info = res.data.content.videoTimeTagArr const properties = [] + const suggestions = [] for (var k in details) { if (k === "stream") { continue } - properties.push({ k: k, v: details[k] }) + if (k === "suggestion") { + const obj = JSON.parse(details[k]); + for (const [key, value] of Object.entries(obj)) { + suggestions.push({ k: key, v: value }) + } + } + else { + properties.push({ k: k, v: details[k] }) + } } + this.setState({ - infoDisplay:
+ infoDisplay:
+ + { + suggestions.length > 0 ? + { + return
{value}
+ }} /> : null + } {