Commit cba75be1 authored by 晓彤's avatar 晓彤

修改测试报告图标不展示问题

parent a2984999
......@@ -100,3 +100,11 @@ export function getCaseByInterface(queryInfo) {
params: queryInfo
})
}
// 根据URL获取headers和请求参数
export function getInterfaceUrl(queryInfo) {
return request({
url: '/auto/interface/curl',
method: 'get',
params: queryInfo
})
}
......@@ -354,9 +354,6 @@ export default {
validate: '',
sceneId: '',
preAction: ''
// 前置条件
// preAction: []
},
sceneTestcaseList: [],
sceneCaseInfo: {
......@@ -506,10 +503,12 @@ export default {
parameters: this.sceneCaseForm.caseDetialList[0].parameters,
extract: this.sceneCaseForm.caseDetialList[0].extract,
validate: this.sceneCaseForm.caseDetialList[0].validate,
// 添加前置条件
preAction: this.sceneCaseForm.caseDetialList[0].preAction,
interfaceId: this.sceneCaseForm.caseDetialList[0].interfaceId,
sceneId: this.sceneCaseInfo.sceneId,
sequence: this.sceneTestcaseList.length + 1,
preAction: this.preActionList
sequence: this.sceneTestcaseList.length + 1
})
console.log('save----', this.sceneTestcaseList)
this.DialogVisible = false
......@@ -527,7 +526,7 @@ export default {
// 编辑场景用例
editeSceneFrom(row) {
// console.log('6666', row)
console.log('6666', row)
this.editDialogVisible = true
this.sceneCaseForm.sequence = row.sequence
this.sceneCaseForm.interfaceId = row.interfaceId
......@@ -565,9 +564,7 @@ export default {
this.assertionList = JSON.parse(row.validate)
}
// 前置条件
// if (row.preAction.length !== 0) {
// this.preActionList = JSON.parse(row.preAction)
// }
this.preActionList = []
if (JSON.parse(row.preAction) !== null) {
this.preActionList = JSON.parse(row.preAction)
}
......
......@@ -81,8 +81,7 @@
<el-row>
<el-col :span="2" class="colStyle">断 言</el-col>
<el-col :span="22">
<el-table v-if="isShowTable" :data="validateList" border style="width: 60%" :header-cell-style="{background:'#E6F3F7',color:'#606266','text-align':'center'}"
:cell-style="{'text-align':'center',background:'#E3EDEB',color:'#606266'}">
<el-table v-if="isShowTable" :data="validateList" border style="width: 60%" :header-cell-style="{background:'#E6F3F7',color:'#606266','text-align':'center'}" :cell-style="{'text-align':'center',background:'#E3EDEB',color:'#606266'}">
<el-table-column prop="check" label="检查值" width="250px"></el-table-column>
<el-table-column prop="comparator" label="比较符" width="250px"></el-table-column>
<el-table-column prop="expect" label="预期结果"></el-table-column>
......@@ -133,7 +132,7 @@ export default {
},
created() {
this.$bus.$off('reportDetail').$on('reportDetail', (row) => {
console.log('参数信息', row)
// console.log('参数信息', row)
this.queryReportDetail.namespace = row.namespace
this.queryReportDetail.batch = row.batch
this.sceneName = row.sceneName
......@@ -196,9 +195,13 @@ export default {
this.totalPass = resp.data.data.pass
this.totalFail = resp.data.data.fail
this.reportDetailList.forEach((item) => {
item['headers'] = JSON.parse(item['headers'])
item['parameters'] = JSON.parse(item['parameters'])
item['response'] = JSON.parse(item['response'])
// item['headers'] = JSON.parse(item['headers'])
// item['parameters'] = JSON.parse(item['parameters'])
// item['response'] = JSON.parse(item['response'])
item['headers'] = item['headers']
item['parameters'] = item['parameters']
item['response'] = item['response']
item['elapsedTime'] = item['elapsedTime'] / 1000
if (item['validate'] !== '[]') {
console.log('666', item['validate'].length)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment