diff --git a/api-test/frontend/src/business/definition/components/assertion/ApiAssertionJsonPath.vue b/api-test/frontend/src/business/definition/components/assertion/ApiAssertionJsonPath.vue index a2058c405d..8ecab4fc50 100644 --- a/api-test/frontend/src/business/definition/components/assertion/ApiAssertionJsonPath.vue +++ b/api-test/frontend/src/business/definition/components/assertion/ApiAssertionJsonPath.vue @@ -114,7 +114,9 @@ export default { this.jsonPath.description = this.jsonPath.expression + " expect: " + (this.jsonPath.expect ? this.jsonPath.expect : ''); }, copyRow() { - this.list.splice(this.index + 1, 0, this.getJSONPath()); + let jsonPath = new JSONPath(this.jsonPath); + jsonPath.description = jsonPath.expression + " expect: " + (jsonPath.expect ? jsonPath.expect : ''); + this.list.splice(this.index + 1, 0, jsonPath); } } } diff --git a/api-test/frontend/src/business/definition/components/assertion/ApiAssertionRegex.vue b/api-test/frontend/src/business/definition/components/assertion/ApiAssertionRegex.vue index 02682b2f36..22600283e7 100644 --- a/api-test/frontend/src/business/definition/components/assertion/ApiAssertionRegex.vue +++ b/api-test/frontend/src/business/definition/components/assertion/ApiAssertionRegex.vue @@ -99,7 +99,9 @@ export default { this.regex.description = this.regex.subject + " has: " + this.regex.expression; }, copyRow() { - this.list.splice(this.index + 1, 0, this.getRegex()); + let regex = new Regex(this.regex); + regex.description = regex.subject + " has: " + regex.expression; + this.list.splice(this.index + 1, 0, regex); } } }