diff --git a/apps/dashboard/web/src/apps/dashboard/tools/TextEditor.vue b/apps/dashboard/web/src/apps/dashboard/tools/TextEditor.vue index cea529c09f..adb2ea41f2 100644 --- a/apps/dashboard/web/src/apps/dashboard/tools/TextEditor.vue +++ b/apps/dashboard/web/src/apps/dashboard/tools/TextEditor.vue @@ -436,17 +436,15 @@ export default { } this.selectedAnonymousOption = 'Sample data' }, - setMessageJson(result) { + setMessageJson(result, doNotUpdateAPIjson) { this.messageJson = result.messageJson this.sampleDataListForTestRun = result.sampleDataListForTestRun }, - setSelectedMethod(testId) { + setSelectedMethod(testId, doNotUpdateAPIjson) { let testName = this.findTestLabelFromTestValue(testId) this.changeValue(testName) this.defaultTest = testId - this.selectedUrl = {} - this.messageJson = {} this.runTest = false let pathname = window.location.pathname @@ -456,9 +454,10 @@ export default { if (!(this.mapRequestsToId[testId] && this.mapRequestsToId[testId].length > 0)) { testId = Object.keys(this.mapRequestsToId)[0] } - - if (this.mapRequestsToId[testId] && this.mapRequestsToId[testId][0]) { - + debugger + if (this.mapRequestsToId[testId] && this.mapRequestsToId[testId][0] && !doNotUpdateAPIjson) { + this.selectedUrl = {} + this.messageJson = {} let obj = { apiCollectionId: this.mapRequestsToId[testId][0].apiCollectionId, url: this.mapRequestsToId[testId][0].url, @@ -507,7 +506,7 @@ export default { color: 'green' }); await this.refreshTestTemplates() - this.setSelectedMethod(resp.finalTestId) + this.setSelectedMethod(resp.finalTestId, true) }) } },