refactor(测试计划): 测试计划关联用例顺序

This commit is contained in:
WangXu10 2024-07-22 11:24:45 +08:00 committed by 刘瑞斌
parent dbba203102
commit 589130f4d5
3 changed files with 4 additions and 4 deletions

View File

@ -613,7 +613,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService {
} }
if (CollectionUtils.isNotEmpty(apiTestCaseList)) { if (CollectionUtils.isNotEmpty(apiTestCaseList)) {
List<ApiTestCase> list = apiTestCaseList.stream().sorted(Comparator.comparing(ApiTestCase::getPos).reversed()).toList(); List<ApiTestCase> list = apiTestCaseList.stream().sorted(Comparator.comparing(ApiTestCase::getPos)).toList();
buildTestPlanApiCaseDTO(apiCase.getCollectionId(), list, testPlan, user, testPlanApiCaseList); buildTestPlanApiCaseDTO(apiCase.getCollectionId(), list, testPlan, user, testPlanApiCaseList);
} }
@ -655,7 +655,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService {
} }
if (CollectionUtils.isNotEmpty(apiTestCaseList)) { if (CollectionUtils.isNotEmpty(apiTestCaseList)) {
List<ApiTestCase> list = apiTestCaseList.stream().sorted(Comparator.comparing(ApiTestCase::getPos).reversed()).toList(); List<ApiTestCase> list = apiTestCaseList.stream().sorted(Comparator.comparing(ApiTestCase::getPos)).toList();
buildTestPlanApiCaseDTO(apiCase.getCollectionId(), list, testPlan, user, testPlanApiCaseList); buildTestPlanApiCaseDTO(apiCase.getCollectionId(), list, testPlan, user, testPlanApiCaseList);
} }

View File

@ -224,7 +224,7 @@ public class TestPlanApiScenarioService extends TestPlanResourceService {
} }
if (CollectionUtils.isNotEmpty(scenarioList)) { if (CollectionUtils.isNotEmpty(scenarioList)) {
List<ApiScenario> list = scenarioList.stream().sorted(Comparator.comparing(ApiScenario::getPos).reversed()).toList(); List<ApiScenario> list = scenarioList.stream().sorted(Comparator.comparing(ApiScenario::getPos)).toList();
buildTestPlanApiScenarioDTO(apiScenario.getCollectionId(), list, testPlan, user, testPlanApiScenarioList); buildTestPlanApiScenarioDTO(apiScenario.getCollectionId(), list, testPlan, user, testPlanApiScenarioList);
} }

View File

@ -831,7 +831,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
} }
if (CollectionUtils.isNotEmpty(functionalCaseList)) { if (CollectionUtils.isNotEmpty(functionalCaseList)) {
List<FunctionalCase> list = functionalCaseList.stream().sorted(Comparator.comparing(FunctionalCase::getPos).reversed()).toList(); List<FunctionalCase> list = functionalCaseList.stream().sorted(Comparator.comparing(FunctionalCase::getPos)).toList();
buildTestPlanFunctionalCaseDTO(functional, list, testPlan, user, testPlanFunctionalCaseList); buildTestPlanFunctionalCaseDTO(functional, list, testPlan, user, testPlanFunctionalCaseList);
handleSyncCase(isRepeat, functionalCaseList, functional, testPlan, user); handleSyncCase(isRepeat, functionalCaseList, functional, testPlan, user);
} }