Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
83143a3b
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 大约 3 年
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
83143a3b
编写于
12月 08, 2020
作者:
Q
q4speed
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(接口自动化): 查看引用
上级
6ce41bdb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
108 addition
and
2 deletion
+108
-2
frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
...ss/components/api/automation/scenario/ApiScenarioList.vue
+4
-2
frontend/src/business/components/api/automation/scenario/ReferenceView.vue
...ness/components/api/automation/scenario/ReferenceView.vue
+62
-0
frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue
...components/api/automation/scenario/ScenarioExtendBtns.vue
+38
-0
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+4
-0
未找到文件。
frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
浏览文件 @
83143a3b
...
...
@@ -46,12 +46,13 @@
</el-table-column>
<el-table-column
prop=
"passingRate"
:label=
"$t('api_test.automation.passing_rate')"
show-overflow-tooltip
/>
<el-table-column
:label=
"$t('commons.operating')"
width=
"
18
0"
>
<el-table-column
:label=
"$t('commons.operating')"
width=
"
24
0"
>
<
template
v-slot:default=
"{row}"
>
<el-button
type=
"text"
@
click=
"edit(row)"
>
{{
$t
(
'
api_test.automation.edit
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"execute(row)"
>
{{
$t
(
'
api_test.automation.execute
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"copy(row)"
>
{{
$t
(
'
api_test.automation.copy
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"remove(row)"
>
{{
$t
(
'
api_test.automation.remove
'
)
}}
</el-button>
<ms-scenario-extend-buttons
:row=
"row"
/>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -76,10 +77,11 @@
import
MsTag
from
"
../../../common/components/MsTag
"
;
import
{
getUUID
}
from
"
@/common/js/utils
"
;
import
MsApiReportDetail
from
"
../report/ApiReportDetail
"
;
import
MsScenarioExtendButtons
from
"
@/business/components/api/automation/scenario/ScenarioExtendBtns
"
;
export
default
{
name
:
"
MsApiScenarioList
"
,
components
:
{
ShowMoreBtn
,
MsTablePagination
,
MsTableHeader
,
MsTag
,
MsApiReportDetail
},
components
:
{
MsScenarioExtendButtons
,
ShowMoreBtn
,
MsTablePagination
,
MsTableHeader
,
MsTag
,
MsApiReportDetail
},
props
:
{
currentProject
:
Object
,
currentModule
:
Object
,
...
...
frontend/src/business/components/api/automation/scenario/ReferenceView.vue
0 → 100644
浏览文件 @
83143a3b
<
template
>
<el-dialog
:close-on-click-modal=
"false"
:title=
"$t('api_test.automation.case_ref')"
:visible.sync=
"visible"
width=
"45%"
:destroy-on-close=
"true"
>
<span>
{{
$t
(
'
api_test.automation.scenario_ref
'
)
}}
:
</span>
<div
class=
"refs"
v-loading=
"scenarioLoading"
>
<div
v-for=
"(item, index) in scenarioRefs"
:key=
"index"
class=
"el-button--text"
>
{{
item
.
name
}}
</div>
</div>
<span>
{{
$t
(
'
api_test.automation.plan_ref
'
)
}}
:
</span>
<div
class=
"refs"
>
<div
v-for=
"(item, index) in planRefs"
:key=
"index"
class=
"el-button--text"
>
{{
item
.
name
}}
</div>
</div>
<template
v-slot:footer
>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"visible = false"
@
keydown.enter.native.prevent
>
{{
$t
(
'
commons.confirm
'
)
}}
</el-button>
</div>
</
template
>
</el-dialog>
</template>
<
script
>
export
default
{
name
:
"
MsReferenceView
"
,
components
:
{},
data
()
{
return
{
visible
:
false
,
scenarioLoading
:
false
,
scenarioRefs
:
[],
planRefs
:
[]
}
},
methods
:
{
getReferenceData
(
row
)
{
this
.
scenarioLoading
=
true
;
this
.
scenarioRefs
=
[];
this
.
$post
(
"
/api/automation/getReference/
"
,
row
,
response
=>
{
this
.
scenarioRefs
=
response
.
data
;
this
.
scenarioLoading
=
false
;
})
},
open
(
row
)
{
this
.
getReferenceData
(
row
);
this
.
visible
=
true
}
}
}
</
script
>
<
style
scoped
>
.refs
{
min-height
:
50px
;
max-height
:
200px
;
overflow-y
:
auto
;
font-size
:
12px
;
padding-bottom
:
10px
;
}
</
style
>
frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue
0 → 100644
浏览文件 @
83143a3b
<
template
>
<el-dropdown
@
command=
"handleCommand"
class=
"scenario-ext-btn"
>
<el-link
type=
"primary"
:underline=
"false"
>
<el-icon
class=
"el-icon-more"
></el-icon>
</el-link>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"ref"
>
{{
$t
(
'
api_test.automation.view_ref
'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
<ms-reference-view
ref=
"viewRef"
/>
</el-dropdown>
</
template
>
<
script
>
import
MsReferenceView
from
"
@/business/components/api/automation/scenario/ReferenceView
"
;
export
default
{
name
:
"
MsScenarioExtendButtons
"
,
components
:
{
MsReferenceView
},
props
:
{
row
:
Object
},
methods
:
{
handleCommand
(
cmd
)
{
switch
(
cmd
)
{
case
"
ref
"
:
this
.
$refs
.
viewRef
.
open
(
this
.
row
);
break
;
}
},
}
}
</
script
>
<
style
scoped
>
.scenario-ext-btn
{
margin-left
:
10px
;
}
</
style
>
frontend/src/i18n/zh-CN.js
浏览文件 @
83143a3b
...
...
@@ -562,6 +562,10 @@ export default {
execute
:
"
执行
"
,
copy
:
"
复制
"
,
remove
:
"
删除
"
,
view_ref
:
"
查看引用
"
,
case_ref
:
"
用例引用
"
,
scenario_ref
:
"
场景引用
"
,
plan_ref
:
"
测试计划引用
"
,
batch_add_plan
:
"
批量添加到测试计划
"
,
batch_execute
:
"
批量执行
"
,
scenario
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录