Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-platform-ui
Commits
9a87ab0f
Commit
9a87ab0f
authored
Dec 23, 2021
by
王晓铜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改添加用例bug和页面样式修改
parent
49775d49
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
62 deletions
+108
-62
index.js
src/router/index.js
+2
-0
AddCase.vue
src/views/auto/AddCase.vue
+40
-20
AddInterface.vue
src/views/auto/AddInterface.vue
+13
-13
EditScene.vue
src/views/auto/EditScene.vue
+53
-29
No files found.
src/router/index.js
View file @
9a87ab0f
...
...
@@ -61,6 +61,8 @@ import BindAddress from '../views/yxm/BindAddress'
import
TestDescription
from
'
../views/qa/TestDescription
'
// 新添加提测说明详情页面(2021-11-10)
import
DetailTestDescription
from
'
../views/qa/DetailTestDescription
'
// 新添加提测说明
// import AddTestDescription from '../views/qa/AddTestDescription'
const
originalPush
=
Router
.
prototype
.
push
Router
.
prototype
.
push
=
function
push
(
location
)
{
...
...
src/views/auto/AddCase.vue
View file @
9a87ab0f
<
template
>
<div>
<el-form
ref=
"caseFormRef"
:rules=
"rules"
:model=
"caseForm"
label-width=
"90px"
>
<el-form-item
label=
"模块名称:"
prop=
"moduleId"
>
<el-select
v-model=
"caseForm.moduleId"
placeholder=
"请选择模块"
@
change=
"selectChangeModel"
clearable
>
...
...
@@ -36,14 +37,16 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</el-col>
<el-col
:span=
"8"
>
<el-input
v-model
.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
<el-input
v-model
=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
style=
"margin-left:20px"
></el-input>
</el-col>
<el-col
:span=
"2"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"advanceDelss(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"advanceDelss(index)"
icon=
"el-icon-delete"
style=
"height:30px;margin-left:40px"
>
删除
</el-button>
</el-col>
</el-row>
</el-form-item>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddHeaderListRow()"
style=
"margin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddHeaderListRow()"
style=
"margin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
</el-collapse-item>
<!-- 请求参数 -->
<el-collapse-item
name=
"2"
title=
"请求参数"
>
...
...
@@ -64,14 +67,16 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</el-col>
<el-col
:span=
"8"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
style=
"margin-left:20px"
></el-input>
</el-col>
<el-col
:span=
"2"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"requestParamsDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"requestParamsDel(index)"
icon=
"el-icon-delete"
style=
"height:30px;margin-left:40px"
>
删除
</el-button>
</el-col>
</el-row>
</el-form-item>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddRequestParamsListRow()"
style=
"margin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddRequestParamsListRow()"
style=
"margin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
</el-collapse-item>
<!-- 响应解析列表 -->
<el-collapse-item
name=
"3"
title=
"响应提取"
>
...
...
@@ -92,19 +97,21 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入变量名称"
></el-input>
</el-col>
<el-col
:span=
"8"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入表达式"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入表达式"
type=
"textarea"
autosize
style=
"margin-left:20px"
></el-input>
</el-col>
<el-col
:span=
"2"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"responeDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"responeDel(index)"
icon=
"el-icon-delete"
style=
"height:30px;margin-left:40px"
>
删除
</el-button>
</el-col>
</el-row>
</el-form-item>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddResponseListRow()"
style=
"mragin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddResponseListRow()"
style=
"mragin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
</el-collapse-item>
<!-- 断言 -->
<el-collapse-item
name=
"4"
title=
"结果断言"
>
<el-table
:data=
"assertionList"
border
style=
"width:
10
0%;margin-top: 15px;"
>
<el-table-column
label=
"Json表达式"
width=
"350"
align=
"center"
>
<el-table
:data=
"assertionList"
border
style=
"width:
8
0%;margin-top: 15px;"
>
<el-table-column
label=
"Json表达式"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.check"
>
</el-input>
...
...
@@ -113,23 +120,26 @@
<el-table-column
label=
"比较符"
width=
"250"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.comparator"
placeholder=
"请选择"
>
<el-option
v-for=
"item in selectAssertionList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in selectAssertionList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"预期结果"
width=
"
35
0"
align=
"center"
>
<el-table-column
label=
"预期结果"
width=
"
40
0"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.expect"
>
</el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"AssertionDelete(scope.$index)"
style=
"height:40px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"AssertionDelete(scope.$index)"
style=
"height:30px"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddAssertionListRow()"
style=
"mragin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"AddAssertionListRow()"
style=
"mragin-top:10px"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
</el-collapse-item>
</el-collapse>
<div
style=
"margin-left:800px;margin-top:20px"
>
...
...
@@ -229,10 +239,10 @@ export default {
created
()
{
this
.
getModelList
()
this
.
$bus
.
$on
(
'
casemsg
'
,
(
row
)
=>
{
// console.log('接收到的信息', row)
if
(
row
!==
null
)
{
if
(
row
===
'
新增
'
)
{
this
.
isShow
=
false
this
.
caseForm
.
id
=
''
this
.
caseForm
.
name
=
''
this
.
caseForm
.
moduleId
=
''
this
.
caseForm
.
interfaceId
=
''
...
...
@@ -241,6 +251,11 @@ export default {
this
.
responseList
=
[]
this
.
assertionList
=
[]
}
else
{
// 重新初始化接口列表使页面能展示接口名称(2021-12-23)
this
.
interfaceInfo
.
moduleId
=
row
.
moduleId
interfaceDetailList
(
this
.
interfaceInfo
).
then
((
resp
)
=>
{
this
.
interfaceList
=
resp
.
data
.
data
.
list
})
// 编辑接收到的信息
this
.
isShow
=
true
this
.
caseForm
.
id
=
row
.
id
...
...
@@ -441,9 +456,14 @@ export default {
word-wrap: break-word;
}
}
/deep/.el-textarea__inner {
height: 40px !important;
margin-left: 10px;
// 改变多行输入显示样式
// /deep/.el-textarea__inner {
// height: 40px !important;
// margin-left: 10px;
// }
/deep/.el-input__inner {
height: 33px !important;
// margin-left: 10px;
}
.el-input {
...
...
src/views/auto/AddInterface.vue
View file @
9a87ab0f
<
template
>
<div>
<el-form
ref=
"interfaceFormRef"
:rules=
"rules"
:model=
"interfaceForm"
>
<el-form
ref=
"interfaceFormRef"
:rules=
"rules"
:model=
"interfaceForm"
style=
"margin-left:20px"
>
<el-collapse
v-model=
"activeNames"
>
<el-collapse-item
name=
"1"
title=
"基本信息"
>
<el-row>
...
...
@@ -47,8 +47,8 @@
<!-- Headers添加 -->
<el-collapse-item
title=
"请求头"
name=
"2"
>
<!-- Header参数添加 -->
<el-table
:data=
"headersList"
border
style=
"width:
100
%;margin-top:15px;"
>
<el-table-column
label=
"参数名称"
width=
"
20
0"
>
<el-table
:data=
"headersList"
border
style=
"width:
95
%;margin-top:15px;"
>
<el-table-column
label=
"参数名称"
width=
"
35
0"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.paramsName"
>
</el-input>
...
...
@@ -65,12 +65,12 @@
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
:active-value=
"true"
:inactive-value=
"false"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
width=
"250"
>
<el-table-column
label=
"备注"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.remarks"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"headerDelete(scope.$index)"
>
删除
</el-button>
</
template
>
...
...
@@ -80,8 +80,8 @@
</el-collapse-item>
<!-- 参数添加 -->
<el-collapse-item
title=
"请求参数"
name=
"3"
>
<el-table
:data=
"paramList"
border
style=
"width:
100
%;margin-top: 15px;"
>
<el-table-column
label=
"参数名称"
width=
"
20
0"
>
<el-table
:data=
"paramList"
border
style=
"width:
95
%;margin-top: 15px;"
>
<el-table-column
label=
"参数名称"
width=
"
35
0"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.paramsName"
>
</el-input>
...
...
@@ -98,12 +98,12 @@
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
:active-value=
"true"
:inactive-value=
"false"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
width=
"250"
>
<el-table-column
label=
"备注"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.remarks"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"paramsDelete(scope.$index)"
>
删除
</el-button>
</
template
>
...
...
@@ -113,8 +113,8 @@
</el-collapse-item>
<!-- 响应参数添加 -->
<el-collapse-item
title=
"响应参数"
name=
"4"
>
<el-table
:data=
"responseList"
border
style=
"width:
100
%;margin-top: 15px;"
>
<el-table-column
label=
"参数名称"
width=
"
20
0"
>
<el-table
:data=
"responseList"
border
style=
"width:
95
%;margin-top: 15px;"
>
<el-table-column
label=
"参数名称"
width=
"
35
0"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.paramsName"
>
</el-input>
...
...
@@ -131,12 +131,12 @@
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
:active-value=
"true"
:inactive-value=
"false"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
width=
"250"
>
<el-table-column
label=
"备注"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.remarks"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"responseDelete(scope.$index)"
>
删除
</el-button>
</
template
>
...
...
src/views/auto/EditScene.vue
View file @
9a87ab0f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment