fix(测试跟踪): 测试计划功能用例不展示自定义字段
--bug=1021234 --user=陈建星 【测试跟踪】测试计划-执行功能用例-多值输入框类型的字段不显示值 https://www.tapd.cn/55049933/s/1319557
This commit is contained in:
parent
695e343968
commit
0bb14f062e
|
@ -303,9 +303,14 @@ public class TestPlanTestCaseService {
|
||||||
List<TestCaseTestDTO> testCaseTestDTOS = extTestPlanTestCaseMapper.listTestCaseTest(testPlanCaseDTO.getCaseId());
|
List<TestCaseTestDTO> testCaseTestDTOS = extTestPlanTestCaseMapper.listTestCaseTest(testPlanCaseDTO.getCaseId());
|
||||||
testCaseTestDTOS.forEach(this::setTestName);
|
testCaseTestDTOS.forEach(this::setTestName);
|
||||||
testPlanCaseDTO.setList(testCaseTestDTOS);
|
testPlanCaseDTO.setList(testCaseTestDTOS);
|
||||||
|
buildCustomField(testPlanCaseDTO);
|
||||||
return testPlanCaseDTO;
|
return testPlanCaseDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void buildCustomField(TestPlanCaseDTO data) {
|
||||||
|
data.setFields(testCaseService.getCustomFieldByCaseId(data.getCaseId()));
|
||||||
|
}
|
||||||
|
|
||||||
private void setTestName(TestCaseTestDTO dto) {
|
private void setTestName(TestCaseTestDTO dto) {
|
||||||
String type = dto.getTestType();
|
String type = dto.getTestType();
|
||||||
String id = dto.getTestId();
|
String id = dto.getTestId();
|
||||||
|
|
|
@ -770,8 +770,12 @@ public class TestCaseService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildCustomField(TestCaseDTO data) {
|
private void buildCustomField(TestCaseDTO data) {
|
||||||
|
data.setFields(getCustomFieldByCaseId(data.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CustomFieldDao> getCustomFieldByCaseId(String caseId) {
|
||||||
CustomFieldTestCaseExample example = new CustomFieldTestCaseExample();
|
CustomFieldTestCaseExample example = new CustomFieldTestCaseExample();
|
||||||
example.createCriteria().andResourceIdEqualTo(data.getId());
|
example.createCriteria().andResourceIdEqualTo(caseId);
|
||||||
List<CustomFieldTestCase> customFieldTestCases = customFieldTestCaseMapper.selectByExampleWithBLOBs(example);
|
List<CustomFieldTestCase> customFieldTestCases = customFieldTestCaseMapper.selectByExampleWithBLOBs(example);
|
||||||
List<CustomFieldDao> fields = new ArrayList<>();
|
List<CustomFieldDao> fields = new ArrayList<>();
|
||||||
customFieldTestCases.forEach(i -> {
|
customFieldTestCases.forEach(i -> {
|
||||||
|
@ -781,7 +785,7 @@ public class TestCaseService {
|
||||||
customFieldDao.setTextValue(i.getTextValue());
|
customFieldDao.setTextValue(i.getTextValue());
|
||||||
fields.add(customFieldDao);
|
fields.add(customFieldDao);
|
||||||
});
|
});
|
||||||
data.setFields(fields);
|
return fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildProjectInfoWithoutProject(List<TestCaseDTO> resList) {
|
private void buildProjectInfoWithoutProject(List<TestCaseDTO> resList) {
|
||||||
|
|
Loading…
Reference in New Issue