fix(接口测试): 修复接口场景引用case禁用之后导入case状态为禁用的问题

--bug=1022855 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001022855
This commit is contained in:
guoyuqi 2023-02-13 16:51:45 +08:00 committed by fit2-zhao
parent b59aa33c25
commit 0303254f80
1 changed files with 2 additions and 0 deletions

View File

@ -250,6 +250,7 @@ public class ApiScenarioImportUtil {
JSONObject objectNew = JSONUtil.parseObject(object.toString());
objectNew.remove("refType");
objectNew.remove("referenced");
objectNew.put("enable", true);
test.setRequest(objectNew.toString());
HttpResponse httpResponse = new HttpResponse();
KeyValue keyValue = new KeyValue();
@ -305,6 +306,7 @@ public class ApiScenarioImportUtil {
JSONObject objectNew = JSONUtil.parseObject(object.toString());
objectNew.remove("refType");
objectNew.remove("referenced");
objectNew.put("enable", true);
apiTestCase.setRequest(objectNew.toString());
apiTestCase.setOrder(apiDefinitionImportUtilService.getImportNextCaseOrder(projectId));
if (apiTestCase.getName().length() > 255) {