From 837e1f38415ce51c07cd3dfe463fc8d42282ee4d Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 16 Jan 2023 15:25:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A8=E8=8D=90jsonpath=E6=96=AD=E8=A8=80?= =?UTF-8?q?=E7=B4=A2=E5=BC=95=E8=B6=85=E8=BF=8710=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=A2=84=E6=9C=9F=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021925 --user=王孝刚 [接口测试]GitHub#21303断言规则适用JSONPath推荐方式,当列表索引值超过10,期望值无法自动填写 https://www.tapd.cn/55049933/s/1327710 --- .../definition/components/assertion/ApiJsonpathSuggest.vue | 2 +- .../src/components/environment/assertion/ApiJsonpathSuggest.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api-test/frontend/src/business/definition/components/assertion/ApiJsonpathSuggest.vue b/api-test/frontend/src/business/definition/components/assertion/ApiJsonpathSuggest.vue index 8afedc920f..0a6e31b53d 100644 --- a/api-test/frontend/src/business/definition/components/assertion/ApiJsonpathSuggest.vue +++ b/api-test/frontend/src/business/definition/components/assertion/ApiJsonpathSuggest.vue @@ -139,7 +139,7 @@ export default { let param = params[index]; let childObj; - let reg = /\[\d\]$/; + let reg = /\[[0-9]+\]$/; let regIndex = param.search(reg); if (regIndex > -1) { let paramName = param.substring(0, regIndex); diff --git a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiJsonpathSuggest.vue b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiJsonpathSuggest.vue index 76fdc45091..651e7c04f7 100644 --- a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiJsonpathSuggest.vue +++ b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiJsonpathSuggest.vue @@ -135,7 +135,7 @@ export default { let param = params[index]; let childObj; - let reg = /\[\d\]$/; + let reg = /\[[0-9]+\]$/; let regIndex = param.search(reg); if (regIndex > -1) { let paramName = param.substring(0, regIndex);