fix(接口测试): 修复未执行的用例没有状态的缺陷

This commit is contained in:
wxg0103 2024-04-22 13:38:53 +08:00 committed by Craftsman
parent 635f011c3a
commit b29d261c58
3 changed files with 7 additions and 10 deletions

View File

@ -1,5 +1,6 @@
package io.metersphere.api.dto.definition;
import io.metersphere.sdk.constants.ApiReportStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ -21,7 +22,7 @@ public class ApiReportStepDTO {
private String stepType;
@Schema(description = "结果状态")
private String status;
private String status = ApiReportStatus.PENDING.name();
@Schema(description = "误报编号/误报状态独有")
private String fakeCode;

View File

@ -140,7 +140,7 @@ public class ApiReportService {
private ApiReport checkResource(String id) {
ApiReportExample example = new ApiReportExample();
example.createCriteria().andIdEqualTo(id).andDeletedEqualTo(false);
example.createCriteria().andIdEqualTo(id);
List<ApiReport> apiReport = apiReportMapper.selectByExample(example);
if (CollectionUtils.isEmpty(apiReport)) {
throw new MSException(Translator.get("api_case_report_not_exist"));

View File

@ -94,14 +94,10 @@
value: `${key}-PENDING`,
label: t(`report.detail.pendingCount`),
},
...(key === ScenarioStepType.API_SCENARIO
? []
: [
{
value: `${key}-scriptIdentifier`,
label: t(`report.detail.api.scriptError`),
},
]),
];
const cascaderOptions = ref<CascaderOption[]>([
{