Merge branch 'v1.8' of github.com:metersphere/metersphere into v1.8
This commit is contained in:
commit
9107a21d74
|
@ -30,6 +30,7 @@ import io.metersphere.commons.utils.*;
|
|||
import io.metersphere.controller.request.ScheduleRequest;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.job.sechedule.ApiScenarioTestJob;
|
||||
import io.metersphere.job.sechedule.SwaggerUrlImportJob;
|
||||
import io.metersphere.job.sechedule.TestPlanTestJob;
|
||||
import io.metersphere.service.ScheduleService;
|
||||
import io.metersphere.track.dto.TestPlanDTO;
|
||||
|
@ -816,7 +817,9 @@ public class ApiAutomationService {
|
|||
if (StringUtils.equals(request.getGroup(), ScheduleGroup.TEST_PLAN_TEST.name())) {
|
||||
scheduleService.addOrUpdateCronJob(
|
||||
request, TestPlanTestJob.getJobKey(request.getResourceId()), TestPlanTestJob.getTriggerKey(request.getResourceId()), TestPlanTestJob.class);
|
||||
} else {
|
||||
}else if(StringUtils.equals(request.getGroup(), ScheduleGroup.SWAGGER_IMPORT.name())){
|
||||
scheduleService.addOrUpdateCronJob(request, SwaggerUrlImportJob.getJobKey(request.getResourceId()), SwaggerUrlImportJob.getTriggerKey(request.getResourceId()), SwaggerUrlImportJob.class);
|
||||
} else{
|
||||
scheduleService.addOrUpdateCronJob(
|
||||
request, ApiScenarioTestJob.getJobKey(request.getResourceId()), ApiScenarioTestJob.getTriggerKey(request.getResourceId()), ApiScenarioTestJob.class);
|
||||
}
|
||||
|
|
|
@ -67,6 +67,16 @@ public class TestCaseDataListener extends EasyExcelListener<TestCaseExcelData> {
|
|||
break;
|
||||
}
|
||||
}
|
||||
//增加字数校验,每一层不能超过100字
|
||||
for (int i = 0; i < nodes.length; i++) {
|
||||
String nodeStr = nodes[i];
|
||||
if(StringUtils.isNotEmpty(nodeStr)){
|
||||
if(nodeStr.trim().length()>100){
|
||||
stringBuilder.append(Translator.get("module") + Translator.get("test_track.length_less_than") + "100:"+nodeStr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (StringUtils.equals(data.getType(), TestCaseConstants.Type.Functional.getValue()) && StringUtils.equals(data.getMethod(), TestCaseConstants.Method.Auto.getValue())) {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<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)" :placeholder="$t('commons.input_name')" ref="nameEdit"/>
|
||||
@blur="saveTestCase(apiCase,true)" :placeholder="$t('commons.input_name')" ref="nameEdit"/>
|
||||
<span v-else>
|
||||
{{ apiCase.id ? apiCase.name : '' }}
|
||||
<i class="el-icon-edit" style="cursor:pointer" @click="showInput(apiCase)" v-tester/>
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
<el-col :span="4">
|
||||
<div class="tag-item" @click.stop>
|
||||
<ms-input-tag :currentScenario="apiCase" ref="tag" @keyup.enter.native="saveTestCase(apiCase)"/>
|
||||
<ms-input-tag :currentScenario="apiCase" ref="tag" @keyup.enter.native="saveTestCase(apiCase,true)"/>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
|
@ -291,7 +291,7 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
saveCase(row) {
|
||||
saveCase(row,hideAlert) {
|
||||
let tmp = JSON.parse(JSON.stringify(row));
|
||||
this.isShowInput = false;
|
||||
if (this.validate(tmp)) {
|
||||
|
@ -328,16 +328,18 @@
|
|||
row.createTime = data.createTime;
|
||||
row.updateTime = data.updateTime;
|
||||
if (!row.message) {
|
||||
if(!hideAlert){
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.$emit('refresh');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
saveTestCase(row) {
|
||||
saveTestCase(row,hideAlert) {
|
||||
if (this.api.saved) {
|
||||
this.addModule(row);
|
||||
} else {
|
||||
this.saveCase(row);
|
||||
this.saveCase(row,hideAlert);
|
||||
}
|
||||
},
|
||||
showInput(row) {
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</el-aside>
|
||||
<el-main style="padding: 0px 0px 0px 0px; line-height: 40px; text-align: center;">
|
||||
<span v-if="interfaceCoverage === 'waitting...'">
|
||||
{{interfaceCoverage}}
|
||||
<i class="el-icon-loading lading-icon"></i>
|
||||
</span>
|
||||
<span v-else class="rows-count-number">
|
||||
{{interfaceCoverage}}
|
||||
|
@ -161,7 +161,11 @@ export default {
|
|||
color: var(--count_number);
|
||||
margin:20px auto;
|
||||
}
|
||||
|
||||
.lading-icon{
|
||||
font-size: 25px;
|
||||
color: var(--count_number);
|
||||
font-weight: bold;
|
||||
}
|
||||
.main-number-show {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
|
|
Loading…
Reference in New Issue