fix: 脑图用例顺序优化
This commit is contained in:
parent
1f4ed04192
commit
712c0d69c6
|
@ -506,6 +506,9 @@ public class ApiTestCaseService {
|
|||
if (CollectionUtils.isEmpty(request.getSelectIds())) {
|
||||
return;
|
||||
}
|
||||
// 尽量保持与用例顺序一致
|
||||
Collections.reverse(request.getSelectIds());
|
||||
|
||||
ApiTestCaseExample example = new ApiTestCaseExample();
|
||||
example.createCriteria().andApiDefinitionIdIn(request.getSelectIds());
|
||||
List<ApiTestCase> apiTestCases = apiTestCaseMapper.selectByExample(example);
|
||||
|
@ -517,6 +520,9 @@ public class ApiTestCaseService {
|
|||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
// 尽量保持与用例顺序一致
|
||||
Collections.reverse(ids);
|
||||
|
||||
ApiTestCaseExample example = new ApiTestCaseExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
List<ApiTestCase> apiTestCases = apiTestCaseMapper.selectByExample(example);
|
||||
|
|
|
@ -348,6 +348,7 @@ public class TestCaseReviewService {
|
|||
if (testCaseIds.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果是关联全部指令则根据条件查询未关联的案例
|
||||
if (testCaseIds.get(0).equals("all")) {
|
||||
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInReview(request.getRequest());
|
||||
|
@ -356,6 +357,9 @@ public class TestCaseReviewService {
|
|||
}
|
||||
}
|
||||
|
||||
// 尽量保持与用例顺序一致
|
||||
Collections.reverse(testCaseIds);
|
||||
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||
TestCaseReviewTestCaseMapper batchMapper = sqlSession.getMapper(TestCaseReviewTestCaseMapper.class);
|
||||
Long nextOrder = ServiceUtils.getNextOrder(request.getReviewId(), extTestReviewCaseMapper::getLastOrder);
|
||||
|
|
|
@ -87,6 +87,9 @@ public class TestPlanLoadCaseService {
|
|||
TestPlanLoadCaseMapper testPlanLoadCaseMapper = sqlSession.getMapper(TestPlanLoadCaseMapper.class);
|
||||
Long nextOrder = ServiceUtils.getNextOrder(request.getTestPlanId(), extTestPlanLoadCaseMapper::getLastOrder);
|
||||
|
||||
// 尽量保持与用例顺序一致
|
||||
Collections.reverse(caseIds);
|
||||
|
||||
for (String id : caseIds) {
|
||||
TestPlanLoadCase t = new TestPlanLoadCase();
|
||||
t.setId(UUID.randomUUID().toString());
|
||||
|
|
|
@ -525,6 +525,9 @@ public class TestPlanService {
|
|||
return;
|
||||
}
|
||||
|
||||
// 尽量保持与用例顺序一致
|
||||
Collections.reverse(testCaseIds);
|
||||
|
||||
TestCaseExample testCaseExample = new TestCaseExample();
|
||||
testCaseExample.createCriteria().andIdIn(testCaseIds);
|
||||
List<TestCase> testCaseList = testCaseMapper.selectByExample(testCaseExample);
|
||||
|
|
|
@ -71,7 +71,19 @@ name: "TestPlanMinder",
|
|||
methods: {
|
||||
handleAfterMount() {
|
||||
listenNodeSelected(() => {
|
||||
let param = {
|
||||
loadSelectNodes(this.getParam(), getPlanCasesForMinder, this.setParamCallback);
|
||||
});
|
||||
listenBeforeExecCommand((even) => {
|
||||
if (even.commandName === 'expandtolevel') {
|
||||
let level = Number.parseInt(even.commandArgs);
|
||||
handleExpandToLevel(level, even.minder.getRoot(), this.getParam(), getPlanCasesForMinder, this.setParamCallback);
|
||||
}
|
||||
});
|
||||
|
||||
tagBatch([...this.tags, this.$t('test_track.plan.plan_status_prepare')]);
|
||||
},
|
||||
getParam() {
|
||||
return {
|
||||
request: {
|
||||
planId: this.planId,
|
||||
orders: this.condition.orders
|
||||
|
@ -79,21 +91,6 @@ name: "TestPlanMinder",
|
|||
result: this.result,
|
||||
isDisable: true
|
||||
}
|
||||
loadSelectNodes(param, getPlanCasesForMinder, this.setParamCallback);
|
||||
});
|
||||
listenBeforeExecCommand((even) => {
|
||||
if (even.commandName === 'expandtolevel') {
|
||||
let level = Number.parseInt(even.commandArgs);
|
||||
let param = {
|
||||
request: {planId: this.planId},
|
||||
result: this.result,
|
||||
isDisable: true
|
||||
}
|
||||
handleExpandToLevel(level, even.minder.getRoot(), param, getPlanCasesForMinder, this.setParamCallback);
|
||||
}
|
||||
});
|
||||
|
||||
tagBatch([...this.tags, this.$t('test_track.plan.plan_status_prepare')]);
|
||||
},
|
||||
setParamCallback(data, item) {
|
||||
if (item.status === 'Pass') {
|
||||
|
|
|
@ -74,7 +74,19 @@ name: "TestReviewMinder",
|
|||
methods: {
|
||||
handleAfterMount() {
|
||||
listenNodeSelected(() => {
|
||||
let param = {
|
||||
loadSelectNodes(this.getParam(), getReviewCasesForMinder, this.setParamCallback);
|
||||
});
|
||||
listenBeforeExecCommand((even) => {
|
||||
if (even.commandName === 'expandtolevel') {
|
||||
let level = Number.parseInt(even.commandArgs);
|
||||
handleExpandToLevel(level, even.minder.getRoot(), this.getParam(), getReviewCasesForMinder, this.setParamCallback);
|
||||
}
|
||||
});
|
||||
|
||||
tagBatch([...this.tags, this.$t('test_track.plan.plan_status_prepare')]);
|
||||
},
|
||||
getParam() {
|
||||
return {
|
||||
request: {
|
||||
reviewId: this.reviewId,
|
||||
orders: this.condition.orders
|
||||
|
@ -82,23 +94,6 @@ name: "TestReviewMinder",
|
|||
result: this.result,
|
||||
isDisable: true
|
||||
}
|
||||
loadSelectNodes(param, getReviewCasesForMinder, this.setParamCallback);
|
||||
});
|
||||
listenBeforeExecCommand((even) => {
|
||||
if (even.commandName === 'expandtolevel') {
|
||||
let level = Number.parseInt(even.commandArgs);
|
||||
let param = {
|
||||
request: {
|
||||
reviewId: this.reviewId,
|
||||
},
|
||||
result: this.result,
|
||||
isDisable: true
|
||||
}
|
||||
handleExpandToLevel(level, even.minder.getRoot(), param, getReviewCasesForMinder, this.setParamCallback);
|
||||
}
|
||||
});
|
||||
|
||||
tagBatch([...this.tags, this.$t('test_track.plan.plan_status_prepare')]);
|
||||
},
|
||||
setParamCallback(data, item) {
|
||||
if (item.reviewStatus === 'Pass') {
|
||||
|
|
Loading…
Reference in New Issue