Commit cba75be1 authored by 晓彤's avatar 晓彤

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

parent a2984999
...@@ -100,3 +100,11 @@ export function getCaseByInterface(queryInfo) { ...@@ -100,3 +100,11 @@ export function getCaseByInterface(queryInfo) {
params: 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 { ...@@ -354,9 +354,6 @@ export default {
validate: '', validate: '',
sceneId: '', sceneId: '',
preAction: '' preAction: ''
// 前置条件
// preAction: []
}, },
sceneTestcaseList: [], sceneTestcaseList: [],
sceneCaseInfo: { sceneCaseInfo: {
...@@ -506,10 +503,12 @@ export default { ...@@ -506,10 +503,12 @@ export default {
parameters: this.sceneCaseForm.caseDetialList[0].parameters, parameters: this.sceneCaseForm.caseDetialList[0].parameters,
extract: this.sceneCaseForm.caseDetialList[0].extract, extract: this.sceneCaseForm.caseDetialList[0].extract,
validate: this.sceneCaseForm.caseDetialList[0].validate, validate: this.sceneCaseForm.caseDetialList[0].validate,
// 添加前置条件
preAction: this.sceneCaseForm.caseDetialList[0].preAction,
interfaceId: this.sceneCaseForm.caseDetialList[0].interfaceId, interfaceId: this.sceneCaseForm.caseDetialList[0].interfaceId,
sceneId: this.sceneCaseInfo.sceneId, sceneId: this.sceneCaseInfo.sceneId,
sequence: this.sceneTestcaseList.length + 1, sequence: this.sceneTestcaseList.length + 1
preAction: this.preActionList
}) })
console.log('save----', this.sceneTestcaseList) console.log('save----', this.sceneTestcaseList)
this.DialogVisible = false this.DialogVisible = false
...@@ -527,7 +526,7 @@ export default { ...@@ -527,7 +526,7 @@ export default {
// 编辑场景用例 // 编辑场景用例
editeSceneFrom(row) { editeSceneFrom(row) {
// console.log('6666', row) console.log('6666', row)
this.editDialogVisible = true this.editDialogVisible = true
this.sceneCaseForm.sequence = row.sequence this.sceneCaseForm.sequence = row.sequence
this.sceneCaseForm.interfaceId = row.interfaceId this.sceneCaseForm.interfaceId = row.interfaceId
...@@ -565,9 +564,7 @@ export default { ...@@ -565,9 +564,7 @@ export default {
this.assertionList = JSON.parse(row.validate) this.assertionList = JSON.parse(row.validate)
} }
// 前置条件 // 前置条件
// if (row.preAction.length !== 0) { this.preActionList = []
// this.preActionList = JSON.parse(row.preAction)
// }
if (JSON.parse(row.preAction) !== null) { if (JSON.parse(row.preAction) !== null) {
this.preActionList = JSON.parse(row.preAction) this.preActionList = JSON.parse(row.preAction)
} }
......
...@@ -81,8 +81,7 @@ ...@@ -81,8 +81,7 @@
<el-row> <el-row>
<el-col :span="2" class="colStyle">断 言</el-col> <el-col :span="2" class="colStyle">断 言</el-col>
<el-col :span="22"> <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'}" <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'}">
:cell-style="{'text-align':'center',background:'#E3EDEB',color:'#606266'}">
<el-table-column prop="check" label="检查值" width="250px"></el-table-column> <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="comparator" label="比较符" width="250px"></el-table-column>
<el-table-column prop="expect" label="预期结果"></el-table-column> <el-table-column prop="expect" label="预期结果"></el-table-column>
...@@ -133,7 +132,7 @@ export default { ...@@ -133,7 +132,7 @@ export default {
}, },
created() { created() {
this.$bus.$off('reportDetail').$on('reportDetail', (row) => { this.$bus.$off('reportDetail').$on('reportDetail', (row) => {
console.log('参数信息', row) // console.log('参数信息', row)
this.queryReportDetail.namespace = row.namespace this.queryReportDetail.namespace = row.namespace
this.queryReportDetail.batch = row.batch this.queryReportDetail.batch = row.batch
this.sceneName = row.sceneName this.sceneName = row.sceneName
...@@ -196,9 +195,13 @@ export default { ...@@ -196,9 +195,13 @@ export default {
this.totalPass = resp.data.data.pass this.totalPass = resp.data.data.pass
this.totalFail = resp.data.data.fail this.totalFail = resp.data.data.fail
this.reportDetailList.forEach((item) => { this.reportDetailList.forEach((item) => {
item['headers'] = JSON.parse(item['headers']) // item['headers'] = JSON.parse(item['headers'])
item['parameters'] = JSON.parse(item['parameters']) // item['parameters'] = JSON.parse(item['parameters'])
item['response'] = JSON.parse(item['response']) // item['response'] = JSON.parse(item['response'])
item['headers'] = item['headers']
item['parameters'] = item['parameters']
item['response'] = item['response']
item['elapsedTime'] = item['elapsedTime'] / 1000 item['elapsedTime'] = item['elapsedTime'] / 1000
if (item['validate'] !== '[]') { if (item['validate'] !== '[]') {
console.log('666', item['validate'].length) 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