Merge remote-tracking branch 'origin/master'

This commit is contained in:
Captain.B 2021-03-25 11:20:46 +08:00
commit 4aadacdf98
5 changed files with 25 additions and 18 deletions

View File

@ -103,6 +103,9 @@ public class MsHTTPSamplerProxy extends MsTestElement {
HTTPSamplerProxy sampler = new HTTPSamplerProxy(); HTTPSamplerProxy sampler = new HTTPSamplerProxy();
sampler.setEnabled(this.isEnable()); sampler.setEnabled(this.isEnable());
sampler.setName(this.getName()); sampler.setName(this.getName());
if (StringUtils.isEmpty(this.getName())) {
sampler.setName("HTTPSamplerProxy");
}
String name = this.getParentName(this.getParent()); String name = this.getParentName(this.getParent());
if (StringUtils.isNotEmpty(name) && !config.isOperating()) { if (StringUtils.isNotEmpty(name) && !config.isOperating()) {
sampler.setName(this.getName() + "<->" + name); sampler.setName(this.getName() + "<->" + name);
@ -126,7 +129,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
// 添加环境中的公共变量 // 添加环境中的公共变量
Arguments arguments = this.addArguments(config); Arguments arguments = this.addArguments(config);
if (arguments != null) { if (arguments != null) {
tree.add(config.valueSupposeMock(arguments)); tree.add(ParameterConfig.valueSupposeMock(arguments));
} }
try { try {
if (config.isEffective(this.getProjectId())) { if (config.isEffective(this.getProjectId())) {

View File

@ -239,10 +239,7 @@ insert into system_header (type, props)
values ('test_case_list', values ('test_case_list',
'[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]'); '[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]');
insert into system_header (type, props) insert into system_header (type, props)
values ('test_case_list',
'[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]');
insert into system_header (type, props)
values ('test_plan_scenario_case', values ('test_plan_scenario_case',
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'); '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]');
alter table system_header add primary key(type);

View File

@ -24,8 +24,7 @@
<el-button :disabled="scenarioDefinition.length < 1" size="mini" type="primary" v-prevent-re-click @click="runDebug">{{$t('api_test.request.debug')}}</el-button> <el-button :disabled="scenarioDefinition.length < 1" size="mini" type="primary" v-prevent-re-click @click="runDebug">{{$t('api_test.request.debug')}}</el-button>
<font-awesome-icon class="ms-alt-ico" :icon="['fa', 'compress-alt']" size="lg" @click="unFullScreen"/> <font-awesome-icon class="ms-alt-ico" :icon="['fa', 'compress-alt']" size="lg" @click="unFullScreen"/>
<!-- <i class="el-icon-close alt-ico-close" @click="close"/>-->
<i class="el-icon-close alt-ico-close" @click="close"/>
</div> </div>
</div> </div>
</template> </template>
@ -124,16 +123,11 @@
.ms-header-right { .ms-header-right {
float: right; float: right;
width: 420px; width: 380px;
margin-top: 2px; margin-top: 4px;
z-index: 1; z-index: 1;
} }
.ms-alt-ico {
font-size: 16px;
margin: 10px 10px 0px;
}
.alt-ico-close { .alt-ico-close {
font-size: 18px; font-size: 18px;
margin: 10px 10px 10px; margin: 10px 10px 10px;
@ -144,6 +138,12 @@
cursor: pointer; cursor: pointer;
} }
.ms-alt-ico {
color: #8c939d;
font-size: 16px;
margin: 10px 30px 0px;
}
.ms-alt-ico:hover { .ms-alt-ico:hover {
color: black; color: black;
cursor: pointer; cursor: pointer;

View File

@ -13,7 +13,7 @@
<el-table-column type="selection"/> <el-table-column type="selection"/>
<el-table-column width="40" :resizable="false" align="center"> <el-table-column width="40" :resizable="false" align="center">
<template v-slot:default="{row}"> <template v-slot:default="{row}">
<show-more-btn :is-show="isSelect(row)" :buttons="buttons" :size="selectRows.length"/> <show-more-btn :is-show="isSelect(row)" :buttons="buttons" :size="selectRows.size"/>
</template> </template>
</el-table-column> </el-table-column>
<template v-for="(item, index) in tableLabel"> <template v-for="(item, index) in tableLabel">

View File

@ -313,10 +313,17 @@ export default {
this.$post("/test/case/review/projects", {reviewId: this.reviewId}, res => { this.$post("/test/case/review/projects", {reviewId: this.reviewId}, res => {
let data = res.data; let data = res.data;
if (data) { if (data) {
this.currentProject = data[0];
this.projects = data; this.projects = data;
const index = data.findIndex(d => d.id === this.$store.state.projectId);
if (index !== -1) {
this.projectId = data[index].id;
this.projectName = data[index].name;
this.currentProject = data[index];
} else {
this.projectId = data[0].id; this.projectId = data[0].id;
this.projectName = data[0].name; this.projectName = data[0].name;
this.currentProject = data[0];
}
} }
}) })
} }