diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java b/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java index 64ec5780c1..45ab26da49 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java @@ -16,16 +16,19 @@ public class KeyValue { private boolean enable; public KeyValue() { + this.enable = true; } public KeyValue(String name, String value) { this.name = name; this.value = value; + this.enable = true; } public KeyValue(String name, String value, String description) { this.name = name; this.value = value; + this.enable = true; this.description = description; } } diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index c2dacf960c..cf6b065263 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit c2dacf960cdb1ed35664bdd3432120b1203b73d8 +Subproject commit cf6b06526324326a563d933e07118fac014a63b4 diff --git a/frontend/src/business/components/api/test/components/ApiKeyValue.vue b/frontend/src/business/components/api/test/components/ApiKeyValue.vue index 5cd862e449..f1362e6322 100644 --- a/frontend/src/business/components/api/test/components/ApiKeyValue.vue +++ b/frontend/src/business/components/api/test/components/ApiKeyValue.vue @@ -103,7 +103,7 @@ }, }, created() { - if (this.items.length === 0) { + if (this.items.length === 0 || this.items[this.items.length - 1].name) { this.items.push(new KeyValue({enable: true})); } } diff --git a/frontend/src/business/components/api/test/components/ApiVariable.vue b/frontend/src/business/components/api/test/components/ApiVariable.vue index 68d02ab625..cd36f59bf1 100644 --- a/frontend/src/business/components/api/test/components/ApiVariable.vue +++ b/frontend/src/business/components/api/test/components/ApiVariable.vue @@ -168,7 +168,7 @@ } }, created() { - if (this.parameters.length === 0) { + if (this.parameters.length === 0 || this.parameters[this.parameters.length - 1].name) { this.parameters.push(new KeyValue( {type: 'text', enable: true, uuid: this.uuid(), contentType: 'text/plain'})); } } diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index cc38137a69..06d935cd1d 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit cc38137a69a0f20fadece9c0f9f50a9468c4ace9 +Subproject commit 06d935cd1d22ab36f09763745c2aff8ad3fb08c1