Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
1288f6ecf9
|
@ -0,0 +1,21 @@
|
|||
package io.metersphere.commons.utils;
|
||||
|
||||
import io.metersphere.controller.request.OrderRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ServiceUtils {
|
||||
|
||||
public static List<OrderRequest> getDefaultOrder(List<OrderRequest> orders) {
|
||||
if (orders == null || orders.size() < 1) {
|
||||
OrderRequest orderRequest = new OrderRequest();
|
||||
orderRequest.setName("update_time");
|
||||
orderRequest.setType("desc");
|
||||
orders = new ArrayList<>();
|
||||
orders.add(orderRequest);
|
||||
return orders;
|
||||
}
|
||||
return orders;
|
||||
}
|
||||
}
|
|
@ -10,7 +10,9 @@ import io.metersphere.commons.exception.MSException;
|
|||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.BeanUtils;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.commons.utils.ServiceUtils;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.controller.request.OrderRequest;
|
||||
import io.metersphere.excel.domain.ExcelErrData;
|
||||
import io.metersphere.excel.domain.ExcelResponse;
|
||||
import io.metersphere.excel.domain.TestCaseExcelData;
|
||||
|
@ -101,6 +103,7 @@ public class TestCaseService {
|
|||
}
|
||||
|
||||
public List<TestCaseDTO> listTestCase(QueryTestCaseRequest request) {
|
||||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||
return extTestCaseMapper.list(request);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,9 @@ import io.metersphere.base.mapper.ext.ExtTestPlanTestCaseMapper;
|
|||
import io.metersphere.commons.constants.TestPlanTestCaseStatus;
|
||||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.BeanUtils;
|
||||
import io.metersphere.commons.utils.ServiceUtils;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.controller.request.OrderRequest;
|
||||
import io.metersphere.controller.request.member.QueryMemberRequest;
|
||||
import io.metersphere.service.UserService;
|
||||
import io.metersphere.track.dto.TestPlanCaseDTO;
|
||||
|
@ -41,6 +43,7 @@ public class TestPlanTestCaseService {
|
|||
ExtTestPlanTestCaseMapper extTestPlanTestCaseMapper;
|
||||
|
||||
public List<TestPlanCaseDTO> list(QueryTestPlanCaseRequest request) {
|
||||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||
List<TestPlanCaseDTO> list = extTestPlanTestCaseMapper.list(request);
|
||||
QueryMemberRequest queryMemberRequest = new QueryMemberRequest();
|
||||
queryMemberRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
|
|
|
@ -51,11 +51,16 @@
|
|||
|
||||
methods: {
|
||||
add: function () {
|
||||
this.list.push(new Regex(this.regex));
|
||||
this.list.push(this.getRegex());
|
||||
this.callback();
|
||||
},
|
||||
remove: function () {
|
||||
this.list.splice(this.index, 1);
|
||||
},
|
||||
getRegex() {
|
||||
let regex = new Regex(this.regex);
|
||||
regex.description = regex.subject + " has: " + regex.expression;
|
||||
return regex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ class JMXGenerator {
|
|||
}
|
||||
|
||||
if (assertions.duration.isValid()) {
|
||||
let name = "Response In Time :" + assertions.duration.value
|
||||
let name = "Response In Time: " + assertions.duration.value
|
||||
httpSamplerProxy.put(new DurationAssertion(name, assertions.duration.value));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,13 +40,7 @@
|
|||
},
|
||||
deleteClickStop() {
|
||||
this.$emit('deleteClickStop');
|
||||
},
|
||||
/* removeClick(){
|
||||
this.$emit('removeClick');
|
||||
},
|
||||
removeClickStop(){
|
||||
this.$emit('removeClickStop')
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
</el-row>
|
||||
<el-row type="flex" justify="center" style="margin-top: 10px;">
|
||||
<el-col :span="20">
|
||||
<el-form-item>
|
||||
<el-form-item prop="prerequisite">
|
||||
<el-input :disabled="readOnly" v-model="form.prerequisite"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
|
@ -233,6 +233,7 @@
|
|||
priority :[{required: true, message: this.$t('test_track.case.input_priority'), trigger: 'change'}],
|
||||
type :[{required: true, message: this.$t('test_track.case.input_type'), trigger: 'change'}],
|
||||
method :[{required: true, message: this.$t('test_track.case.input_method'), trigger: 'change'}],
|
||||
prerequisite :[{ max: 300, message: this.$t('test_track.length_less_than') + '300', trigger: 'blur'}],
|
||||
remark :[{ max: 300, message: this.$t('test_track.length_less_than') + '300', trigger: 'blur'}]
|
||||
},
|
||||
formLabelWidth: "120px",
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
statusChange(status) {
|
||||
this.testCase.status = status;
|
||||
},
|
||||
saveCase(isContinuous) {
|
||||
saveCase() {
|
||||
let param = {};
|
||||
param.id = this.testCase.id;
|
||||
param.status = this.testCase.status;
|
||||
|
@ -238,22 +238,14 @@
|
|||
param.results = JSON.stringify(param.results);
|
||||
param.issues = JSON.stringify(this.testCase.issues);
|
||||
this.$post('/test/plan/case/edit', param, () => {
|
||||
if (isContinuous) {
|
||||
this.updateTestCases(param);
|
||||
return;
|
||||
}
|
||||
this.$refs.drawer.closeDrawer();
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.$emit('refresh');
|
||||
});
|
||||
},
|
||||
handleNext() {
|
||||
this.saveCase(true);
|
||||
this.index++;
|
||||
this.getTestCase(this.index);
|
||||
},
|
||||
handlePre() {
|
||||
this.saveCase(true);
|
||||
this.index--;
|
||||
this.getTestCase(this.index);
|
||||
},
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
<el-col :span="12">
|
||||
<span>{{$t('report.test_start_time')}}:</span>
|
||||
<span v-if="!isReport">{{reportInfo.startTime}}</span>
|
||||
<el-date-picker v-if="isReport" size="mini" type="date" :placeholder="$t('test_track.commons.select_date')" v-model="reportInfo.startTime"/>
|
||||
<el-date-picker v-if="isReport" size="mini" type="date" :placeholder="$t('commons.select_date')" v-model="reportInfo.startTime"/>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>{{$t('report.test_end_time')}}:</span>
|
||||
<span v-if="!isReport">{{reportInfo.endTime}}</span>
|
||||
<el-date-picker v-if="isReport" size="mini" type="date" :placeholder="$t('test_track.commons.select_date')" v-model="reportInfo.endTime"/>
|
||||
<el-date-picker v-if="isReport" size="mini" type="date" :placeholder="$t('commons.select_date')" v-model="reportInfo.endTime"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ export default {
|
|||
'weeks_6': 'Sat',
|
||||
'test_unit': 'tests',
|
||||
'remove': 'Remove',
|
||||
'remove_cancel': 'Remove Failed',
|
||||
'remove_cancel': 'Remove Cancel',
|
||||
'remove_success': 'Remove Success',
|
||||
'tips': 'The authentication information has expired, please login again'
|
||||
},
|
||||
|
|
|
@ -88,7 +88,7 @@ export default {
|
|||
'port_cannot_be_empty': '端口号不能为空',
|
||||
'account_cannot_be_empty': '帐户不能为空',
|
||||
'remove': '移除',
|
||||
'remove_cancel': '移除失败',
|
||||
'remove_cancel': '移除取消',
|
||||
'remove_success': '移除成功',
|
||||
'tips': '认证信息已过期,请重新登录'
|
||||
},
|
||||
|
|
|
@ -88,7 +88,7 @@ export default {
|
|||
'port_cannot_be_empty': '埠號不能為空',
|
||||
'account_cannot_be_empty': '帳戶不能為空',
|
||||
'remove': '移除',
|
||||
'remove_cancel': '移除失敗',
|
||||
'remove_cancel': '移除取消',
|
||||
'remove_success': '移除成功',
|
||||
'tips': '认認證資訊已過期,請重新登入'
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue