fix(接口测试): 修复文档断言长度失败的缺陷

--bug=1029411 --user=王孝刚
【接口测试】github#26338,【接口定义】文档结果校验,当校验array长度等于具体值时,出现断言失败,但实际这个数组长度确实是7
https://www.tapd.cn/55049933/s/1410876
This commit is contained in:
wxg0103 2023-08-31 17:23:18 +08:00 committed by fit2-zhao
parent 7000e965e0
commit 60d6a5d904
2 changed files with 1 additions and 2 deletions

View File

@ -11,7 +11,6 @@
type="number"
@change="change"
@input="input"
:min="1"
:placeholder="$t('api_test.request.assertions.response_in_time')"
onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))" />
</el-col>

View File

@ -35,7 +35,7 @@ public class DocumentUtils {
isTrue = StringUtils.contains(resValue, expectedValue);
break;
case "length_eq":
isTrue = getLength(resValue, decimalFormatter) == numberOf(item.getValue());
isTrue = getLength(subj, decimalFormatter) == numberOf(item.getValue());
break;
case "length_not_eq":
isTrue = getLength(subj, decimalFormatter) != numberOf(item.getValue());