fix(接口测试): 场景执行插件协议请求时,body 访问错误修复
This commit is contained in:
parent
f4aa52f120
commit
85f06fb2a5
|
@ -1257,9 +1257,9 @@
|
||||||
body: {
|
body: {
|
||||||
...request.body,
|
...request.body,
|
||||||
jsonBody: {
|
jsonBody: {
|
||||||
...request.body.jsonBody,
|
...request.body?.jsonBody,
|
||||||
jsonSchema: request.body.jsonBody.jsonSchemaTableData
|
jsonSchema: request.body?.jsonBody?.jsonSchemaTableData
|
||||||
? parseTableDataToJsonSchema(request.body.jsonBody.jsonSchemaTableData[0])
|
? parseTableDataToJsonSchema(request.body?.jsonBody?.jsonSchemaTableData?.[0])
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -137,8 +137,8 @@ export function getStepDetails(steps: ScenarioStepItem[], details: Record<string
|
||||||
body: {
|
body: {
|
||||||
...currentDetail.body,
|
...currentDetail.body,
|
||||||
jsonBody: {
|
jsonBody: {
|
||||||
...currentDetail.body.jsonBody,
|
...currentDetail.body?.jsonBody,
|
||||||
jsonSchema: currentDetail.body.jsonBody.jsonSchema,
|
jsonSchema: currentDetail.body?.jsonBody?.jsonSchema,
|
||||||
jsonSchemaTableData: [], // 原树形结构存在循环引用,这里要去掉以免 axios 序列化失败
|
jsonSchemaTableData: [], // 原树形结构存在循环引用,这里要去掉以免 axios 序列化失败
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue