refactor(接口测试): 修复引用场景被删除,还可以执行的缺陷

--bug=1013861 --user=王孝刚 【接口自动化】A场景引用了B场景,删除B场景,引用的场景B还可以执行
https://www.tapd.cn/55049933/s/1176826
This commit is contained in:
wxg0103 2022-06-08 18:36:59 +08:00 committed by f2c-ci-robot[bot]
parent f177f905a3
commit e2221d3d0e
4 changed files with 22 additions and 13 deletions

View File

@ -159,7 +159,7 @@
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>ms-jmeter-core</artifactId>
<version>1.1.9</version>
<version>1.2.0</version>
<exclusions>
<exclusion>
<artifactId>netty</artifactId>

View File

@ -39,15 +39,17 @@
<slot name="button" v-if="showVersion"></slot>
<el-tooltip :content="$t('test_resource_pool.enable_disable')" placement="top" v-if="showBtn">
<el-switch v-model="data.enable" class="enable-switch" size="mini" :disabled="(data.disabled && !data.root) || !showVersion"/>
<el-switch v-model="data.enable" class="enable-switch" size="mini"
:disabled="(data.disabled && !data.root) || !showVersion || isDeleted"/>
</el-tooltip>
<el-button v-if="showVersion && showCopy" size="mini" icon="el-icon-copy-document" circle @click="copyRow"
style="padding: 5px"
:disabled="(data.disabled && !data.root) || !showVersion "/>
:disabled="(data.disabled && !data.root) || !showVersion || isDeleted"/>
<el-button v-show="isSingleButton" size="mini" icon="el-icon-delete" type="danger" style="padding: 5px" circle @click="remove"
:disabled="(data.disabled && !data.root) || !showVersion "/>
<el-button v-show="isSingleButton" size="mini" icon="el-icon-delete" type="danger" style="padding: 5px" circle
@click="remove"
:disabled="(data.disabled && !data.root) || !showVersion || isDeleted"/>
<step-extend-btns style="display: contents"
:data="data"
@ -154,14 +156,18 @@ export default {
environmentType: String,
environmentGroupId: String,
envMap: Map,
showEnable : {
showEnable: {
type: Boolean,
default : true
default: true
},
showCopy : {
showCopy: {
type: Boolean,
default : true
default: true
},
isDeleted: {
type: Boolean,
default: false
}
},
watch: {
'$store.state.selectStep': function () {
@ -198,7 +204,7 @@ export default {
if (this.data.type === 'ConstantTimer' || this.data.type === 'Assertions') {
return (!this.innerStep || this.showBtn && (!this.data.disabled || this.data.root) && this.showVersion && this.stepFilter.get('ALlSamplerStep').indexOf(this.data.type) === -1);
}
return (this.showBtn && (!this.data.disabled || this.data.root) && this.showVersion && this.stepFilter.get('ALlSamplerStep').indexOf(this.data.type) === -1);
return (this.showBtn && (!this.data.disabled || this.data.root || this.isDeleted) && this.showVersion && this.stepFilter.get('ALlSamplerStep').indexOf(this.data.type) === -1);
},
},
methods: {

View File

@ -6,6 +6,7 @@
@active="active"
:is-show-name-input="!isDeletedOrRef"
:data="request"
:is-deleted="request.referenced==='REF' && !isShowNum"
:draggable="draggable"
:color="displayColor.color"
:background-color="displayColor.backgroundColor"
@ -256,12 +257,13 @@ export default {
if (this.request.hashTree) {
this.setOwnEnvironment(this.request.hashTree);
}
if (this.request.id && this.request.referenced === 'REF') {
this.request.disabled = true;
}
if (this.request.num) {
this.isShowNum = true;
this.request.root = true;
if (this.request.id && this.request.referenced === 'REF') {
this.request.disabled = true;
}
} else {
this.isShowNum = false;
}

View File

@ -11,6 +11,7 @@
:is-disabled="true"
:is-max="isMax"
:show-btn="showBtn"
:is-deleted="scenario.referenced==='REF' && ! isShowNum"
:show-version="showVersion"
color="#606266"
background-color="#F4F4F5"