fix(接口测试): 修复自定义脚本导入api时不展示没有case接口的问题
--bug=1010932 --user=宋天阳 【接口测试】github#11239,接口定义不创建CASE,在场景中前后置脚本添加从API定义导入关联时不显示没有CASE的接口 https://www.tapd.cn/55049933/s/1115387
This commit is contained in:
parent
0219728c98
commit
9d32473a9b
|
@ -25,7 +25,7 @@
|
|||
ref="apitable">
|
||||
|
||||
<template v-slot:header>
|
||||
<ms-environment-select :project-id="projectId" v-if="isTestPlan" :is-read-only="isReadOnly"
|
||||
<ms-environment-select :project-id="projectId" v-if="isTestPlan || isScript" :is-read-only="isReadOnly"
|
||||
@setEnvironment="setEnvironment" ref="msEnvironmentSelect"/>
|
||||
</template>
|
||||
|
||||
|
@ -80,6 +80,12 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isScript: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
isApiListEnable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<slot name="version"></slot>
|
||||
</template>
|
||||
|
||||
<ms-environment-select :project-id="projectId" v-if="isTestPlan" :is-read-only="isReadOnly"
|
||||
<ms-environment-select :project-id="projectId" v-if="isTestPlan || isScript" :is-read-only="isReadOnly"
|
||||
@setEnvironment="setEnvironment" ref="msEnvironmentSelect"/>
|
||||
|
||||
<el-input :placeholder="$t('commons.search_by_name_or_id')" @blur="initTable"
|
||||
|
@ -174,6 +174,12 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isScript: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
isReadOnly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
@setProject="setProject"
|
||||
@save="save"
|
||||
:plan-id="planId"
|
||||
:dialog-title="dialogTitle"
|
||||
ref="baseRelevance">
|
||||
|
||||
<template v-slot:aside>
|
||||
|
@ -24,7 +25,8 @@
|
|||
:select-node-ids="selectNodeIds"
|
||||
:is-api-list-enable="isApiListEnable"
|
||||
:project-id="projectId"
|
||||
:is-test-plan="true"
|
||||
:is-test-plan="isTestPlan"
|
||||
:is-script="isScript"
|
||||
:plan-id="planId"
|
||||
@isApiListEnableChange="isApiListEnableChange"
|
||||
ref="apiList"/>
|
||||
|
@ -35,7 +37,8 @@
|
|||
:select-node-ids="selectNodeIds"
|
||||
:is-api-list-enable="isApiListEnable"
|
||||
:project-id="projectId"
|
||||
:is-test-plan="true"
|
||||
:is-test-plan="isTestPlan"
|
||||
:is-script="isScript"
|
||||
:plan-id="planId"
|
||||
@isApiListEnableChange="isApiListEnableChange"
|
||||
ref="apiCaseList"/>
|
||||
|
@ -68,6 +71,7 @@ export default {
|
|||
currentModule: null,
|
||||
selectNodeIds: [],
|
||||
moduleOptions: {},
|
||||
dialogTitle:this.$t('test_track.plan_view.relevance_test_case'),
|
||||
trashEnable: false,
|
||||
isApiListEnable: true,
|
||||
condition: {},
|
||||
|
@ -79,12 +83,42 @@ export default {
|
|||
props: {
|
||||
planId: {
|
||||
type: String
|
||||
},
|
||||
isTestPlan: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
isScript: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if(this.isScript){
|
||||
if(this.isApiListEnable){
|
||||
this.dialogTitle = this.$t('permission.project_api_definition.import_api');
|
||||
}else {
|
||||
this.dialogTitle = this.$t('permission.project_track_case.import');
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
planId() {
|
||||
this.condition.planId = this.planId;
|
||||
},
|
||||
isApiListEnable(){
|
||||
if(this.isScript){
|
||||
if(this.isApiListEnable){
|
||||
this.dialogTitle = this.$t('permission.project_api_definition.import_api');
|
||||
}else {
|
||||
this.dialogTitle = this.$t('permission.project_track_case.import');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<custom-function-relate ref="customFunctionRelate" @addCustomFuncScript="handleCodeTemplate"/>
|
||||
<!--接口列表-->
|
||||
<api-func-relevance @save="apiSave" @close="apiClose" ref="apiFuncRelevance"/>
|
||||
<api-func-relevance @save="apiSave" :is-test-plan="false" :is-script="true" @close="apiClose" ref="apiFuncRelevance"/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue