fix(UI 自动化): 根据条件关联用例到测试计划
--bug=1016273 --user=张大海 【测试跟踪】测试计划-UI测试用例-关联测试用例-弹框-输入关键字搜索用例-全选符合搜索结果的所有数据确定-实际关联的是项目下所有数据 https://www.tapd.cn/55049933/s/1233644
This commit is contained in:
parent
3ced82ad63
commit
8b197849c2
|
@ -54,6 +54,11 @@ public class TestPlanUiScenarioCaseController {
|
|||
return testPlanUiScenarioCaseService.relevanceList(request, goPage, pageSize);
|
||||
}
|
||||
|
||||
@PostMapping("/relevance/list/ids")
|
||||
public List<String> relevanceListIds(@RequestBody UiScenarioRequest request) {
|
||||
return testPlanUiScenarioCaseService.relevanceListIds(request);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanScenarioCaseService.class)
|
||||
public int deleteTestCase(@PathVariable String id) {
|
||||
|
|
|
@ -618,4 +618,12 @@ public class TestPlanUiScenarioCaseService {
|
|||
extTestPlanUiScenarioCaseMapper::getLastOrder,
|
||||
testPlanUiScenarioMapper::updateByPrimaryKeySelective);
|
||||
}
|
||||
|
||||
public List<String> relevanceListIds(UiScenarioRequest request) {
|
||||
request.setNotInTestPlan(true);
|
||||
if (testPlanService.isAllowedRepeatCase(request.getPlanId())) {
|
||||
request.setNotInTestPlan(false);
|
||||
}
|
||||
return uiAutomationServiceProxy.list(request).stream().map(UiScenarioDTO::getId).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,6 +132,13 @@ export default {
|
|||
this.$refs.baseRelevance.close();
|
||||
});
|
||||
},
|
||||
getAllId(param) {
|
||||
return new Promise((resolve) => {
|
||||
this.$post("/test/plan/uiScenario/case/relevance/list/ids", param, (data) => {
|
||||
resolve(data.data);
|
||||
})
|
||||
});
|
||||
},
|
||||
async saveCaseRelevance() {
|
||||
let selectIds = [];
|
||||
let url = '/ui/automation/relevance';
|
||||
|
@ -154,10 +161,8 @@ export default {
|
|||
//查找所有数据
|
||||
let params = this.$refs.apiScenarioList.condition;
|
||||
if (params.selectAll) {
|
||||
let result = await this.$post("/ui/automation/listAllIds", {
|
||||
projectId: params.projectId
|
||||
});
|
||||
param.selectIds = result.data.data;
|
||||
let result = await this.getAllId(params);
|
||||
param.selectIds = result;
|
||||
}
|
||||
|
||||
this.result = this.$post(url, param, () => {
|
||||
|
|
Loading…
Reference in New Issue