fix(接口测试): 修复断言不为空的没有生成断言的缺陷

--bug=1037621 --user=王孝刚 【接口测试】接口定义-调试,断言状态码,条件选择非空,不填写期望值,执行后不显示断言信息
https://www.tapd.cn/55049933/s/1479656
This commit is contained in:
wxg0103 2024-03-25 11:02:33 +08:00 committed by Craftsman
parent 6d5a46d367
commit e7e8d5a320
2 changed files with 1 additions and 4 deletions

View File

@ -20,7 +20,7 @@ public class ResponseCodeAssertionConverter extends AssertionConverter<MsRespons
}
public boolean isValid(MsResponseCodeAssertion msAssertion) {
return StringUtils.isNotBlank(msAssertion.getExpectedValue()) && StringUtils.isNotBlank(msAssertion.getCondition());
return StringUtils.isNotBlank(msAssertion.getCondition());
}
private ResponseAssertion parse2ResponseAssertion(MsResponseCodeAssertion msAssertion, boolean isIgnoreStatus) {

View File

@ -2621,9 +2621,6 @@ public class ApiScenarioControllerTests extends BaseTest {
apiScenarioSystemRequest.setScenarioRequest(scenarioSystemRequest);
apiScenarioSystemRequest.setRefType(ApiScenarioStepRefType.COPY.name());
this.requestPostWithOkAndReturn("/get/system-request", apiScenarioSystemRequest);
mockMvc.perform(getRequestBuilder(STEP_GET, "system-scenario-id1"))
.andExpect(status().isOk());
}
@Test