fix(接口测试): 用例触发方式统一改成手动触发
This commit is contained in:
parent
e6f921547a
commit
a89b86ac6b
|
@ -121,7 +121,6 @@ export default {
|
|||
{text: this.$t('commons.trigger_mode.manual'), value: 'MANUAL'},
|
||||
{text: this.$t('commons.trigger_mode.schedule'), value: 'SCHEDULE'},
|
||||
{text: this.$t('commons.trigger_mode.api'), value: 'API'},
|
||||
{text: this.$t('commons.trigger_mode.case'), value: 'CASE'},
|
||||
{text: this.$t('api_test.automation.batch_execute'), value: 'BATCH'},
|
||||
|
||||
],
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<span v-if="triggerMode === 'SCHEDULE'">{{$t('commons.trigger_mode.schedule')}}</span>
|
||||
<span v-if="triggerMode === 'TEST_PLAN_SCHEDULE'">{{$t('commons.trigger_mode.schedule')}}</span>
|
||||
<span v-if="triggerMode === 'API'">{{$t('commons.trigger_mode.api')}}</span>
|
||||
<span v-if="triggerMode === 'CASE'">{{$t('commons.trigger_mode.case')}}</span>
|
||||
<span v-if="triggerMode === 'BATCH'">{{$t('api_test.automation.batch_execute')}}</span>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -185,7 +185,6 @@ export default {
|
|||
{text: this.$t('commons.trigger_mode.manual'), value: 'MANUAL'},
|
||||
{text: this.$t('commons.trigger_mode.schedule'), value: 'SCHEDULE'},
|
||||
{text: this.$t('commons.trigger_mode.api'), value: 'API'},
|
||||
{text: this.$t('commons.trigger_mode.case'), value: 'CASE'},
|
||||
],
|
||||
buttons: [
|
||||
{
|
||||
|
|
|
@ -47,15 +47,24 @@
|
|||
<div v-for="item in taskData" :key="item.id" style="margin-bottom: 5px">
|
||||
<el-card class="ms-card-task" @click.native="showReport(item,$event)">
|
||||
<span>{{ item.name }} </span><br/>
|
||||
<span>执行器:{{ item.actuator }} 由 {{ item.executor }} {{
|
||||
item.executionTime | timestampFormatDate
|
||||
}} {{ getMode(item.triggerMode) }}</span><br/>
|
||||
<span>
|
||||
执行器:{{ item.actuator }} 由 {{ item.executor }}
|
||||
{{ item.executionTime | timestampFormatDate }}
|
||||
{{ getMode(item.triggerMode) }}
|
||||
</span>
|
||||
<br/>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-progress :percentage="getPercentage(item.executionStatus)" :format="format"/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>{{ item.executionStatus }}</span>
|
||||
<span v-if="item.executionStatus && item.executionStatus.toLowerCase() === 'error'" class="ms-task-error">
|
||||
error
|
||||
</span>
|
||||
<span v-else-if="item.executionStatus && item.executionStatus.toLowerCase() === 'success'" class="ms-task-success">
|
||||
success
|
||||
</span>
|
||||
<span v-else>{{ item.executionStatus ? item.executionStatus.toLowerCase() : item.executionStatus }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
@ -98,7 +107,6 @@ export default {
|
|||
{id: 'BATCH', label: this.$t('api_test.automation.batch_execute')},
|
||||
{id: 'SCHEDULE', label: this.$t('commons.trigger_mode.schedule')},
|
||||
{id: 'MANUAL', label: this.$t('commons.trigger_mode.manual')},
|
||||
{id: 'CASE', label: this.$t('commons.trigger_mode.case')},
|
||||
{id: 'API', label: 'API'}
|
||||
],
|
||||
runStatus: [
|
||||
|
@ -224,9 +232,6 @@ export default {
|
|||
if (mode === 'API') {
|
||||
return this.$t('commons.trigger_mode.api');
|
||||
}
|
||||
if (mode === 'CASE') {
|
||||
return this.$t('commons.trigger_mode.case');
|
||||
}
|
||||
if (mode === 'BATCH') {
|
||||
return this.$t('api_test.automation.batch_execute');
|
||||
}
|
||||
|
@ -338,4 +343,12 @@ export default {
|
|||
.item {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.ms-task-error {
|
||||
color: #F56C6C;
|
||||
}
|
||||
|
||||
.ms-task-success {
|
||||
color: #67C23A;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -245,7 +245,7 @@ export default {
|
|||
runArr.push({
|
||||
id: loadCase.loadCaseId,
|
||||
testPlanLoadId: loadCase.id,
|
||||
triggerMode: 'CASE'
|
||||
triggerMode: 'MANUAL'
|
||||
});
|
||||
});
|
||||
let obj = {config: config, requests: runArr, userId: getCurrentUser().id};
|
||||
|
@ -259,7 +259,7 @@ export default {
|
|||
runArr.push( {
|
||||
id: loadCase.loadCaseId,
|
||||
testPlanLoadId: loadCase.id,
|
||||
triggerMode: 'CASE'
|
||||
triggerMode: 'MANUAL'
|
||||
})
|
||||
});
|
||||
let obj = {config:config,requests:runArr,userId:getCurrentUser().id};
|
||||
|
@ -376,7 +376,7 @@ export default {
|
|||
this.$post('/test/plan/load/case/run', {
|
||||
id: loadCase.loadCaseId,
|
||||
testPlanLoadId: loadCase.id,
|
||||
triggerMode: 'CASE'
|
||||
triggerMode: 'MANUAL'
|
||||
}).then(() => {
|
||||
this.$notify.success({
|
||||
title: loadCase.caseName,
|
||||
|
|
Loading…
Reference in New Issue