fix(接口自动化): 系统设置,并发数设置后批量执行接口用例提示操作成功问题修复
This commit is contained in:
parent
114dad6ec5
commit
da620b78b0
|
@ -92,7 +92,7 @@
|
|||
this.getResult();
|
||||
this.$emit('autoCheckStatus'); // 执行结束后,自动更新计划状态
|
||||
}, error => {
|
||||
this.$emit('runRefresh', {});
|
||||
this.$emit('errorRefresh', {});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
<el-row>
|
||||
<el-col :span="api.protocol==='HTTP'? 3:5">
|
||||
<el-checkbox v-model="isSelectAll" class="select-all"/>
|
||||
<span class="variable-combine"> {{api.name}}</span>
|
||||
<el-tooltip :content="api.name">
|
||||
<span class="ms-col-name"> {{api.name}}</span>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="api.protocol==='HTTP'? 1:3">
|
||||
<el-tag size="mini" :style="{'background-color': getColor(true, api.method), border: getColor(true, api.method)}" class="api-el-tag">
|
||||
|
@ -176,4 +178,14 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.ms-col-name {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
overflow-x: hidden;
|
||||
padding-bottom: 0;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card style="margin-top: 5px" @click.native="selectTestCase(apiCase,$event)">
|
||||
<div @click="active(apiCase)" v-if="type!=='detail'">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-col :span="3">
|
||||
<el-row>
|
||||
<el-col :span="2" style="margin-top: 5px">
|
||||
<el-checkbox class="item-select" v-model="apiCase.selected"/>
|
||||
|
@ -14,47 +14,45 @@
|
|||
<div class="el-step__icon is-text ms-api-col">
|
||||
<div class="el-step__icon-inner">{{ index + 1 }}</div>
|
||||
</div>
|
||||
<label class="ms-api-label">{{ $t('test_track.case.priority') }}</label>
|
||||
<el-select size="small" v-model="apiCase.priority" class="ms-api-select" @change="changePriority(apiCase)">
|
||||
<el-select size="mini" v-model="apiCase.priority" class="ms-api-select" @change="changePriority(apiCase)">
|
||||
<el-option v-for="grd in priorities" :key="grd.id" :label="grd.name" :value="grd.id"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-col :span="api.protocol==='HTTP'?6:10">
|
||||
<span @click.stop>
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': apiCase.active}" @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,true)" :placeholder="$t('commons.input_name')" ref="nameEdit"/>
|
||||
<span v-else>
|
||||
{{ apiCase.id ? apiCase.name : '' }}
|
||||
<span>{{ apiCase.id ? apiCase.name : '' }}</span>
|
||||
<i class="el-icon-edit" style="cursor:pointer" @click="showInput(apiCase)" v-tester/>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div v-if="apiCase.id" style="color: #999999;font-size: 12px">
|
||||
<span v-if="api.protocol==='HTTP'">
|
||||
<el-tag size="mini"
|
||||
:style="{'background-color': getColor(true, apiCase.request.method), border: getColor(true, apiCase.request.method)}"
|
||||
class="api-el-tag">
|
||||
{{ apiCase.request.method }}
|
||||
</el-tag>
|
||||
{{apiCase.request.path}}
|
||||
<br/>
|
||||
</span>
|
||||
<span>
|
||||
{{ apiCase.createTime | timestampFormatDate }}
|
||||
{{ apiCase.createUser }} {{ $t('api_test.definition.request.create_info') }}
|
||||
</span>
|
||||
<!--<span>-->
|
||||
<!--{{ apiCase.createTime | timestampFormatDate }}-->
|
||||
<!--{{ apiCase.createUser }} {{ $t('api_test.definition.request.create_info') }}-->
|
||||
<!--</span>-->
|
||||
<span style="margin-left: 10px">
|
||||
{{ apiCase.updateTime | timestampFormatDate }}
|
||||
{{ apiCase.updateUser }} {{ $t('api_test.definition.request.update_info') }}
|
||||
</span>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="api.protocol==='HTTP'?4:0">
|
||||
<span v-if="api.protocol==='HTTP'">
|
||||
<el-tag size="mini" :style="{'background-color': getColor(true, apiCase.request.method), border: getColor(true, apiCase.request.method)}"
|
||||
class="api-el-tag">
|
||||
{{ apiCase.request.method }}
|
||||
</el-tag>
|
||||
<el-tooltip :content="apiCase.request.path">
|
||||
<span class="ms-col-name">{{apiCase.request.path}}</span>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="tag-item" @click.stop>
|
||||
<ms-input-tag :currentScenario="apiCase" ref="tag" @keyup.enter.native="saveTestCase(apiCase,true)"/>
|
||||
|
@ -88,12 +86,12 @@
|
|||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
|
||||
<!-- 请求参数-->
|
||||
<el-collapse-transition>
|
||||
<div v-if="apiCase.active||type==='detail'">
|
||||
<el-divider></el-divider>
|
||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||
<ms-api-request-form :isShowEnable="true" :showScript="true" :is-read-only="isReadOnly" :headers="apiCase.request.headers " :request="apiCase.request" v-if="api.protocol==='HTTP'"/>
|
||||
<ms-tcp-basis-parameters :showScript="true" :request="apiCase.request" v-if="api.method==='TCP' && apiCase.request.esbDataStruct == null"/>
|
||||
|
@ -247,8 +245,6 @@
|
|||
}
|
||||
data.message = true;
|
||||
data.request.useEnvironment = this.environment;
|
||||
//this.saveTestCase(data);
|
||||
|
||||
this.$emit('singleRun', data);
|
||||
},
|
||||
copyCase(data) {
|
||||
|
@ -399,8 +395,8 @@
|
|||
|
||||
<style scoped>
|
||||
.ms-api-select {
|
||||
margin-left: 20px;
|
||||
width: 80px;
|
||||
margin-left: 10px;
|
||||
width: 65px;
|
||||
}
|
||||
|
||||
.ms-api-header-select {
|
||||
|
@ -446,12 +442,21 @@
|
|||
}
|
||||
|
||||
.api-el-tag {
|
||||
margin-left: 20px;
|
||||
margin-right: 10px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.tag-item {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.ms-col-name {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
overflow-x: hidden;
|
||||
padding-bottom: 0;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
width: 150px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
:apiCaseList="apiCaseList"
|
||||
:is-read-only="isReadOnly"
|
||||
:project-id="projectId"
|
||||
:useEnvironment="useEnvironment"
|
||||
:useEnvironment="environment"
|
||||
:is-case-edit="isCaseEdit"
|
||||
ref="header"
|
||||
/>
|
||||
|
@ -41,7 +41,7 @@
|
|||
|
||||
<!-- 执行组件 -->
|
||||
<ms-run :debug="false" :reportId="reportId" :run-data="runData" :env-map="envMap"
|
||||
@runRefresh="runRefresh" ref="runTest"/>
|
||||
@runRefresh="runRefresh" @errorRefresh="errorRefresh" ref="runTest"/>
|
||||
<!--批量编辑-->
|
||||
<ms-batch-edit ref="batchEdit" @batchEdit="batchEdit" :typeArr="typeArr" :value-arr="valueArr"/>
|
||||
</div>
|
||||
|
@ -113,7 +113,6 @@
|
|||
method: REQ_METHOD,
|
||||
},
|
||||
envMap: new Map,
|
||||
useEnvironment: "",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -211,7 +210,11 @@
|
|||
this.batchEdit(obj);
|
||||
this.$success(this.$t('organization.integration.successful_operation'));
|
||||
},
|
||||
|
||||
errorRefresh() {
|
||||
this.batchLoadingIds = [];
|
||||
this.singleLoading = false;
|
||||
this.singleRunId = "";
|
||||
},
|
||||
refresh() {
|
||||
this.getApiTest();
|
||||
this.$emit('refresh');
|
||||
|
@ -222,7 +225,7 @@
|
|||
});
|
||||
},
|
||||
getApiTest(addCase) {
|
||||
this.useEnvironment = "";
|
||||
this.environment = "";
|
||||
if (this.api) {
|
||||
this.condition.projectId = this.projectId;
|
||||
if (this.isCaseEdit) {
|
||||
|
@ -251,9 +254,8 @@
|
|||
}
|
||||
});
|
||||
this.apiCaseList = data;
|
||||
if (!this.useEnvironment && this.apiCaseList[0] && this.apiCaseList[0].request && this.apiCaseList[0].request.useEnvironment) {
|
||||
this.useEnvironment = this.apiCaseList[0].request.useEnvironment;
|
||||
this.environment = this.useEnvironment;
|
||||
if (this.apiCaseList[0] && this.apiCaseList[0].request && this.apiCaseList[0].request.useEnvironment) {
|
||||
this.environment = this.apiCaseList[0].request.useEnvironment;
|
||||
}
|
||||
if (addCase && this.apiCaseList.length === 0 && !this.loaded) {
|
||||
this.addCase();
|
||||
|
@ -262,7 +264,6 @@
|
|||
}
|
||||
},
|
||||
getApiTestToRunTestCase(testCaseId) {
|
||||
this.useEnvironment = "";
|
||||
if (this.api) {
|
||||
this.condition.projectId = this.projectId;
|
||||
if (this.isCaseEdit) {
|
||||
|
@ -291,14 +292,12 @@
|
|||
|
||||
})
|
||||
this.apiCaseList = data;
|
||||
if (!this.useEnvironment && this.apiCaseList[0] && this.apiCaseList[0].request && this.apiCaseList[0].request.useEnvironment) {
|
||||
this.useEnvironment = this.apiCaseList[0].request.useEnvironment;
|
||||
this.environment = this.useEnvironment;
|
||||
if (this.apiCaseList[0] && this.apiCaseList[0].request && this.apiCaseList[0].request.useEnvironment) {
|
||||
this.environment = this.apiCaseList[0].request.useEnvironment;
|
||||
}
|
||||
if (this.apiCaseList.length === 0 && !this.loaded) {
|
||||
this.addCase();
|
||||
}
|
||||
|
||||
this.apiCaseList.forEach(apicase => {
|
||||
if (apicase.id === testCaseId) {
|
||||
let data = apicase;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e50f0463826ac4d7837ea3a237333827774a1b19
|
||||
Subproject commit e7709b9a340394e78610b91105b2cec0f1b8289d
|
Loading…
Reference in New Issue