fix(接口测试): 修复断言xpath不生效的缺陷

--bug=1037509 --user=王孝刚 【接口测试】接口定义-断言-响应体断言-XPath-XML-设置了未生效
https://www.tapd.cn/55049933/s/1480887
--bug=1037497 --user=王孝刚
【接口测试】接口定义-断言-响应体断言-XPath-HTML-设置了未生效
https://www.tapd.cn/55049933/s/1480890
This commit is contained in:
wxg0103 2024-03-26 11:30:38 +08:00 committed by 刘瑞斌
parent 068ae8b3cc
commit a4726a03ef
2 changed files with 7 additions and 2 deletions

View File

@ -21,6 +21,6 @@ public class MsXPathAssertionItem extends MsBodyAssertionItem {
private String expectedValue;
public boolean isValid() {
return StringUtils.isNotBlank(expression) && StringUtils.isNotBlank(expectedValue);
return StringUtils.isNotBlank(expression);
}
}

View File

@ -93,7 +93,12 @@
<!-- xPath开始 -->
<div v-if="activeTab === ResponseBodyAssertionType.XPATH" class="mt-[16px]">
<div class="text-[var(--color-text-1)]">{{ t('ms.assertion.responseContentType') }}</div>
<a-radio-group v-model="activeResponseFormat" class="mb-[16px] mt-[16px]" type="button" size="small">
<a-radio-group
v-model="condition.xpathAssertion.responseFormat"
class="mb-[16px] mt-[16px]"
type="button"
size="small"
>
<a-radio key="XML" value="XML">XML</a-radio>
<a-radio key="HTML" value="HTML">HTML</a-radio>
</a-radio-group>