fix(测试跟踪): 修复选中关联单个模块用例实际上关联整个项目的用例缺陷
This commit is contained in:
parent
51e67a0b3c
commit
c44b72e5fa
|
@ -9,7 +9,18 @@ import java.util.List;
|
|||
@Getter
|
||||
@Setter
|
||||
public class PlanCaseRelevanceRequest {
|
||||
/**
|
||||
* 测试计划ID
|
||||
*/
|
||||
private String planId;
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 当选择关联全部用例时把加载条件送到后台,从后台查询
|
||||
*/
|
||||
private QueryTestCaseRequest request;
|
||||
|
||||
/**
|
||||
* 具体要关联的用例
|
||||
*/
|
||||
private List<String> testCaseIds = new ArrayList<>();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.metersphere.track.request.testreview;
|
||||
|
||||
import io.metersphere.track.request.testcase.QueryTestCaseRequest;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
@ -9,7 +10,18 @@ import java.util.List;
|
|||
@Getter
|
||||
@Setter
|
||||
public class ReviewRelevanceRequest {
|
||||
/**
|
||||
* 评审ID
|
||||
*/
|
||||
private String reviewId;
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 当选择关联全部用例时把加载条件送到后台,从后台查询
|
||||
*/
|
||||
|
||||
private QueryTestCaseRequest request;
|
||||
/**
|
||||
* 具体选择要关联的用例
|
||||
*/
|
||||
private List<String> testCaseIds = new ArrayList<>();
|
||||
}
|
||||
|
|
|
@ -326,12 +326,9 @@ public class TestCaseReviewService {
|
|||
if (testCaseIds.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// 如果是关联全部指令则从新查询未关联的案例
|
||||
// 如果是关联全部指令则根据条件查询未关联的案例
|
||||
if (testCaseIds.get(0).equals("all")) {
|
||||
QueryTestCaseRequest req = new QueryTestCaseRequest();
|
||||
req.setReviewId(request.getReviewId());
|
||||
req.setProjectId(request.getProjectId());
|
||||
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInReview(req);
|
||||
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInReview(request.getRequest());
|
||||
if (!testCases.isEmpty()) {
|
||||
testCaseIds = testCases.stream().map(testCase -> testCase.getId()).collect(Collectors.toList());
|
||||
}
|
||||
|
|
|
@ -211,12 +211,9 @@ public class TestPlanService {
|
|||
return;
|
||||
}
|
||||
|
||||
// 如果是关联全部指令则从新查询未关联的案例
|
||||
// 如果是关联全部指令则根据条件查询未关联的案例
|
||||
if (testCaseIds.get(0).equals("all")) {
|
||||
QueryTestCaseRequest req = new QueryTestCaseRequest();
|
||||
req.setPlanId(request.getPlanId());
|
||||
req.setProjectId(request.getProjectId());
|
||||
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInPlan(req);
|
||||
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInPlan(request.getRequest());
|
||||
if (!testCases.isEmpty()) {
|
||||
testCaseIds = testCases.stream().map(testCase -> testCase.getId()).collect(Collectors.toList());
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
let param = {};
|
||||
param.planId = this.planId;
|
||||
param.testCaseIds = [...this.selectIds];
|
||||
param.projectId = this.projectId;
|
||||
param.request = this.condition;
|
||||
// 选择全选则全部加入到评审,无论是否加载完全部
|
||||
if (this.testCases.length === param.testCaseIds.length) {
|
||||
param.testCaseIds = ['all'];
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
let param = {};
|
||||
param.reviewId = this.reviewId;
|
||||
param.testCaseIds = [...this.selectIds];
|
||||
param.projectId = this.projectId;
|
||||
param.request = this.condition;
|
||||
// 选择全选则全部加入到评审,无论是否加载完全部
|
||||
if (this.testReviews.length === param.testCaseIds.length) {
|
||||
param.testCaseIds = ['all'];
|
||||
|
|
Loading…
Reference in New Issue