fix(接口测试): 引用的接口用例body参数回显不对

--bug=1041173 --user=陈建星 【接口测试】场景-引用API-请求体为form-data/binary-类型为file-上传的文件修改后保存场景退出-再打开场景,文件还是旧文件 https://www.tapd.cn/55049933/s/1532571
This commit is contained in:
AgAngle 2024-06-20 11:04:58 +08:00 committed by jianxing
parent 5500254a15
commit 10a7d2a382
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ public class ApiStepParser extends StepParser {
if (refBody == null || valueBody == null) { if (refBody == null || valueBody == null) {
return; return;
} }
refBody.setBodyType(valueBody.getBodyType());
if (StringUtils.equals(refBody.getBodyType(), Body.BodyType.FORM_DATA.name()) && if (StringUtils.equals(refBody.getBodyType(), Body.BodyType.FORM_DATA.name()) &&
valueBody.getFormDataBody() != null && refBody.getFormDataBody() != null) { valueBody.getFormDataBody() != null && refBody.getFormDataBody() != null) {
replaceKvParam(valueBody.getFormDataBody().getFormValues(), valueBody.getFormDataBody().getFormValues()); replaceKvParam(valueBody.getFormDataBody().getFormValues(), valueBody.getFormDataBody().getFormValues());