fix(接口自动化): 修改用例缺陷
This commit is contained in:
parent
8e7b1f7489
commit
fb46812176
|
@ -16,7 +16,7 @@
|
||||||
@click="active(apiCase)"/>
|
@click="active(apiCase)"/>
|
||||||
<el-input v-if="!apiCase.id || isShowInput" size="small" v-model="apiCase.name" :name="index" :key="index"
|
<el-input v-if="!apiCase.id || isShowInput" size="small" v-model="apiCase.name" :name="index" :key="index"
|
||||||
class="ms-api-header-select" style="width: 180px"
|
class="ms-api-header-select" style="width: 180px"
|
||||||
@blur="saveTestCase(apiCase)"/>
|
@blur="saveTestCase(apiCase)" placeholder="请输入用例名称"/>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{apiCase.id ? apiCase.name:''}}
|
{{apiCase.id ? apiCase.name:''}}
|
||||||
<i class="el-icon-edit" style="cursor:pointer" @click="showInput(apiCase)"/>
|
<i class="el-icon-edit" style="cursor:pointer" @click="showInput(apiCase)"/>
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
this.$emit('singleRun', data);
|
this.$emit('singleRun', data);
|
||||||
},
|
},
|
||||||
copyCase(data) {
|
copyCase(data) {
|
||||||
let obj = {name: "copy_" + data.name, priority: data.priority, active: false, request: data.request};
|
let obj = {name: "copy_" + data.name, priority: data.priority, active: true, request: data.request};
|
||||||
this.$emit('copyCase', obj);
|
this.$emit('copyCase', obj);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -182,6 +182,7 @@
|
||||||
}
|
}
|
||||||
let bodyFiles = this.getBodyUploadFiles(row);
|
let bodyFiles = this.getBodyUploadFiles(row);
|
||||||
row.projectId = getCurrentProjectID();
|
row.projectId = getCurrentProjectID();
|
||||||
|
row.active = true;
|
||||||
row.apiDefinitionId = row.apiDefinitionId || this.api.id;
|
row.apiDefinitionId = row.apiDefinitionId || this.api.id;
|
||||||
let url = "/api/testcase/create";
|
let url = "/api/testcase/create";
|
||||||
if (row.id) {
|
if (row.id) {
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
} else {
|
} else {
|
||||||
request = JSON.parse(this.api.request);
|
request = JSON.parse(this.api.request);
|
||||||
}
|
}
|
||||||
let obj = {apiDefinitionId: this.api.id, name: '', priority: 'P0', active: false};
|
let obj = {apiDefinitionId: this.api.id, name: '', priority: 'P0', active: true};
|
||||||
obj.request = request;
|
obj.request = request;
|
||||||
this.apiCaseList.unshift(obj);
|
this.apiCaseList.unshift(obj);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue