fix(接口测试): 修复JsonSchema中的样式问题
--bug=1020800 --user=宋天阳 【接口测试】github#20570,接口场景测试 JSON请求体中 json数组中的mock函数无效 https://www.tapd.cn/55049933/s/1316138
This commit is contained in:
parent
6beadcb67a
commit
17b3a03791
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="json-schema-editor" style="padding: 0 10px">
|
||||
<el-row class="row" :gutter="10">
|
||||
<el-row class="row" :gutter="10" v-if="reloadSelfOver">
|
||||
<el-col :style="{ minWidth: `${200 - 10 * deep}px` }" class="ms-col-name">
|
||||
<div :style="{ marginLeft: `${10 * deep}px` }" class="ms-col-name-c" />
|
||||
<span
|
||||
|
@ -401,6 +401,7 @@ export default {
|
|||
countAdd: 1,
|
||||
modalVisible: false,
|
||||
reloadItemOver: true,
|
||||
reloadSelfOver: true,
|
||||
advancedValue: {},
|
||||
addProp: {}, // 自定义属性
|
||||
customProps: [],
|
||||
|
@ -484,15 +485,19 @@ export default {
|
|||
changeAllItemsType(changeType) {
|
||||
if (this.isArray(this.pickValue) && this.pickValue.items && this.pickValue.items.length > 0) {
|
||||
this.pickValue.items.forEach((item) => {
|
||||
item.type = changeType;
|
||||
delete item['properties'];
|
||||
delete item['items'];
|
||||
delete item['required'];
|
||||
delete item['mock'];
|
||||
this.$set(item, 'type', changeType);
|
||||
if (changeType === 'array') {
|
||||
this.$set(item, 'items', [{ type: 'string', mock: { mock: '' } }]);
|
||||
}
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.reloadSelf();
|
||||
this.reloadItems();
|
||||
});
|
||||
}
|
||||
},
|
||||
onCheck(e) {
|
||||
|
@ -609,6 +614,13 @@ export default {
|
|||
this.reloadItemOver = true;
|
||||
});
|
||||
},
|
||||
|
||||
reloadSelf() {
|
||||
this.reloadSelfOver = false;
|
||||
this.$nextTick(() => {
|
||||
this.reloadSelfOver = true;
|
||||
});
|
||||
},
|
||||
editScenarioAdvance(data) {
|
||||
this.$emit('editScenarioAdvance', data);
|
||||
},
|
||||
|
|
|
@ -130,9 +130,6 @@ export default {
|
|||
},
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
this.search();
|
||||
},
|
||||
methods: {
|
||||
clickRow(row, column) {
|
||||
if (column.property !== 'status') {
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.apache.ibatis.session.ExecutorType;
|
|||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.mybatis.spring.SqlSessionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -561,6 +560,11 @@ public class TestPlanReportService {
|
|||
resourceId = planExecutionQueues.get(0).getResourceId();
|
||||
testPlanExecutionQueueMapper.deleteByExample(testPlanExecutionQueueExample);
|
||||
}
|
||||
|
||||
testPlanReportMapper.updateByPrimaryKey(testPlanReport);
|
||||
//发送通知
|
||||
testPlanMessageService.checkTestPlanStatusAndSendMessage(testPlanReport, content, isSendMessage);
|
||||
|
||||
if (runMode != null && StringUtils.equalsIgnoreCase(runMode, RunModeConstants.SERIAL.name()) && resourceId != null) {
|
||||
TestPlanExecutionQueueExample queueExample = new TestPlanExecutionQueueExample();
|
||||
queueExample.createCriteria().andReportIdIsNotNull().andResourceIdEqualTo(resourceId);
|
||||
|
@ -577,10 +581,8 @@ public class TestPlanReportService {
|
|||
runRequest.setReportId(testPlanExecutionQueue.getReportId());
|
||||
testPlanService.runPlan(runRequest);
|
||||
}
|
||||
testPlanReportMapper.updateByPrimaryKey(testPlanReport);
|
||||
|
||||
}
|
||||
//发送通知
|
||||
testPlanMessageService.checkTestPlanStatusAndSendMessage(testPlanReport, content, isSendMessage);
|
||||
return testPlanReport;
|
||||
}
|
||||
|
||||
|
@ -1053,7 +1055,7 @@ public class TestPlanReportService {
|
|||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if(extReport != null) {
|
||||
if (extReport != null) {
|
||||
BeanUtils.copyBean(testPlanReportDTO, extReport);
|
||||
}
|
||||
return testPlanReportDTO;
|
||||
|
@ -1375,7 +1377,7 @@ public class TestPlanReportService {
|
|||
example.setOrderByClause("create_time desc");
|
||||
example.createCriteria().andTestPlanIdEqualTo(planId);
|
||||
List<TestPlanReport> testPlanReports = testPlanReportMapper.selectByExample(example);
|
||||
if(CollectionUtils.isNotEmpty(testPlanReports)){
|
||||
if (CollectionUtils.isNotEmpty(testPlanReports)) {
|
||||
return testPlanReports.get(0).getId();
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue