Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
:sparkles: Tests and pre-request scripts are saved to collections. Fixes #643
Liyas Thomasac0a89ae269c
diff --git a/pages/index.vue b/pages/index.vueindex 672c6780c..b0345666e 100644--- a/pages/index.vue+++ b/pages/index.vue@@ -1528,6 +1528,14 @@ export default {this.rawInput = newValue.rawInputthis.contentType = newValue.contentTypethis.requestType = newValue.requestType+ if (newValue.preRequestScript) {+ this.showPreRequestScript = true+ this.preRequestScript = newValue.preRequestScript+ }+ if (newValue.testScript) {+ this.testsEnabled = true+ this.testScript = newValue.testScript+ }},editingRequest(newValue) {this.editRequest = newValue@@ -2570,6 +2578,8 @@ export default {rawInput: this.rawInput,contentType: this.contentType,requestType: this.requestType,+ preRequestScript: this.showPreRequestScript == true ? this.preRequestScript : null,+ testScript: this.testsEnabled == true ? this.testScript : null,}if (this.selectedRequest.url) {this.editRequest = Object.assign({}, this.selectedRequest, this.editRequest)