mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
5105160715
@ -84,7 +84,7 @@
|
||||
<if test="request.moduleId != null">
|
||||
AND api_scenario_module_id = #{request.moduleId}
|
||||
</if>
|
||||
and scenario_definition like CONCAT('%', #{request.id},'%')
|
||||
and scenario_definition like CONCAT('%', #{request.id},'%') and id != #{request.id}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" :title="$t('api_test.automation.case_ref')" :visible.sync="visible"
|
||||
<el-dialog :close-on-click-modal="false" :title="$t('api_test.automation.scenario_ref')" :visible.sync="visible"
|
||||
width="45%" :destroy-on-close="true">
|
||||
<span>{{ $t('api_test.automation.scenario_ref') }}:</span>
|
||||
<div class="refs" v-loading="scenarioLoading">
|
||||
|
@ -88,6 +88,9 @@
|
||||
} else {
|
||||
this.request = JSON.parse(this.currentApi.request);
|
||||
}
|
||||
if (!this.request.headers) {
|
||||
this.request.headers = [];
|
||||
}
|
||||
this.currentApi.request = this.request;
|
||||
return true;
|
||||
}
|
||||
@ -135,6 +138,9 @@
|
||||
if (!this.request.hashTree) {
|
||||
this.request.hashTree = [];
|
||||
}
|
||||
if (!this.request.body.binary) {
|
||||
this.request.body.binary = [];
|
||||
}
|
||||
// 处理导入数据缺失问题
|
||||
if (this.response.body) {
|
||||
let body = new Body();
|
||||
@ -145,6 +151,9 @@
|
||||
if (!body.kvs) {
|
||||
body.kvs = [];
|
||||
}
|
||||
if (!body.binary) {
|
||||
body.binary = [];
|
||||
}
|
||||
this.response.body = body;
|
||||
}
|
||||
if (this.currentApi.moduleId && this.currentApi.moduleId === "root") {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="min-width: 1000px;margin-bottom: 20px">
|
||||
<div style="min-width: 1200px;margin-bottom: 20px">
|
||||
<el-radio-group v-model="body.type" size="mini">
|
||||
<el-radio :disabled="isReadOnly" :label="type.FORM_DATA" @change="modeChange">
|
||||
{{ $t('api_test.definition.request.body_form_data') }}
|
||||
|
@ -16,7 +16,7 @@
|
||||
@click="active(apiCase)"/>
|
||||
<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"
|
||||
@blur="saveTestCase(apiCase)"/>
|
||||
@blur="saveTestCase(apiCase)" placeholder="请输入用例名称"/>
|
||||
<span v-else>
|
||||
{{apiCase.id ? apiCase.name:''}}
|
||||
<i class="el-icon-edit" style="cursor:pointer" @click="showInput(apiCase)"/>
|
||||
@ -149,7 +149,7 @@
|
||||
this.$emit('singleRun', 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);
|
||||
},
|
||||
|
||||
@ -182,6 +182,7 @@
|
||||
}
|
||||
let bodyFiles = this.getBodyUploadFiles(row);
|
||||
row.projectId = getCurrentProjectID();
|
||||
row.active = true;
|
||||
row.apiDefinitionId = row.apiDefinitionId || this.api.id;
|
||||
let url = "/api/testcase/create";
|
||||
if (row.id) {
|
||||
|
@ -187,7 +187,7 @@
|
||||
} else {
|
||||
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;
|
||||
this.apiCaseList.unshift(obj);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user