Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
8ccd6bef
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,发现更多精彩内容 >>
提交
8ccd6bef
编写于
3月 22, 2021
作者:
W
wenyann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:自定义表头显示问题
上级
f0ad5278
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
104 addition
and
136 deletion
+104
-136
frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
...ss/components/api/automation/scenario/ApiScenarioList.vue
+3
-2
frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
...ents/api/definition/components/list/ApiCaseSimpleList.vue
+17
-15
frontend/src/business/components/api/definition/components/list/ApiList.vue
...ess/components/api/definition/components/list/ApiList.vue
+3
-2
frontend/src/business/components/common/head/HeaderCustom.vue
...tend/src/business/components/common/head/HeaderCustom.vue
+13
-5
frontend/src/business/components/track/case/components/TestCaseEdit.vue
...usiness/components/track/case/components/TestCaseEdit.vue
+1
-0
frontend/src/business/components/track/case/components/TestCaseList.vue
...usiness/components/track/case/components/TestCaseList.vue
+2
-1
frontend/src/business/components/track/plan/components/TestPlanList.vue
...usiness/components/track/plan/components/TestPlanList.vue
+4
-3
frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue
...nts/track/plan/view/comonents/api/TestPlanApiCaseList.vue
+4
-3
frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue
...track/plan/view/comonents/api/TestPlanApiScenarioList.vue
+4
-2
frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue
...plan/view/comonents/functional/FunctionalTestCaseList.vue
+3
-2
frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue
...s/track/plan/view/comonents/load/TestPlanLoadCaseList.vue
+8
-13
frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue
...s/track/review/view/components/TestReviewTestCaseEdit.vue
+42
-88
未找到文件。
frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
浏览文件 @
8ccd6bef
...
...
@@ -244,7 +244,7 @@
return
{
type
:
API_SCENARIO_LIST
,
headerItems
:
Api_Scenario_List
,
tableLabel
:
Api_Scenario_List
,
tableLabel
:
[]
,
loading
:
false
,
screenHeight
:
document
.
documentElement
.
clientHeight
-
280
,
//屏幕高度,
condition
:
{
...
...
@@ -361,6 +361,7 @@
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
API_SCENARIO_LIST
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
selectByParam
()
{
...
...
@@ -369,7 +370,6 @@
},
search
(
projectId
)
{
this
.
selectRows
=
new
Set
();
getLabel
(
this
,
API_SCENARIO_LIST
);
this
.
condition
.
moduleIds
=
this
.
selectNodeIds
;
if
(
this
.
trashEnable
)
{
this
.
condition
.
filters
=
{
status
:
[
"
Trash
"
]};
...
...
@@ -421,6 +421,7 @@
this
.
unSelection
=
data
.
listObject
.
map
(
s
=>
s
.
id
);
});
}
getLabel
(
this
,
API_SCENARIO_LIST
);
},
handleCommand
(
cmd
)
{
let
table
=
this
.
$refs
.
scenarioTable
;
...
...
frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
浏览文件 @
8ccd6bef
...
...
@@ -60,7 +60,7 @@
</el-table-column>
<el-table-column
v-if=
"item.id == 'custom
'"
v-if=
"item.id == 'path
'"
sortable=
"custom"
prop=
"path"
min-width=
"180px"
...
...
@@ -83,8 +83,8 @@
:key=
"index"
/>
<el-table-column
v-if=
"item.id=='custom
'"
sortable=
"custom
"
v-if=
"item.id=='updateTime
'"
sortable=
"updateTime
"
min-width=
"160"
:label=
"$t('api_test.definition.api_last_time')"
prop=
"updateTime"
...
...
@@ -186,7 +186,7 @@ export default {
return
{
type
:
API_CASE_LIST
,
headerItems
:
Api_Case_List
,
tableLabel
:
Api_Case_List
,
tableLabel
:
[]
,
condition
:
{
components
:
API_CASE_CONFIGS
},
...
...
@@ -286,10 +286,11 @@ export default {
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
API_CASE_LIST
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
initTable
()
{
getLabel
(
this
,
API_CASE_LIST
);
this
.
selectRows
=
new
Set
();
this
.
condition
.
status
=
""
;
this
.
condition
.
moduleIds
=
this
.
selectNodeIds
;
...
...
@@ -332,6 +333,7 @@ export default {
})
});
}
getLabel
(
this
,
API_CASE_LIST
);
},
open
()
{
this
.
$refs
.
searchBar
.
open
();
...
...
frontend/src/business/components/api/definition/components/list/ApiList.vue
浏览文件 @
8ccd6bef
...
...
@@ -272,7 +272,7 @@ export default {
return
{
type
:
API_LIST
,
headerItems
:
Api_List
,
tableLabel
:
Api_List
,
tableLabel
:
[]
,
condition
:
{
components
:
API_DEFINITION_CONFIGS
},
...
...
@@ -392,13 +392,13 @@ export default {
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
API_LIST
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
handleBatchMove
()
{
this
.
$refs
.
testCaseBatchMove
.
open
(
this
.
moduleTree
,
[],
this
.
moduleOptions
);
},
initTable
()
{
getLabel
(
this
,
API_LIST
);
this
.
selectRows
=
new
Set
();
initCondition
(
this
.
condition
);
this
.
selectDataCounts
=
0
;
...
...
@@ -444,6 +444,7 @@ export default {
})
});
}
getLabel
(
this
,
API_LIST
);
},
genProtocalFilter
(
protocalType
)
{
if
(
protocalType
===
"
HTTP
"
)
{
...
...
frontend/src/business/components/common/head/HeaderCustom.vue
浏览文件 @
8ccd6bef
...
...
@@ -46,12 +46,20 @@ export default {
return
type
!==
'
inner
'
;
},
open
(
items
)
{
this
.
defaultCheckedKeys
=
[]
this
.
dialogTableVisible
=
true
this
.
fieldSelected
=
items
if
(
items
.
size
<=
0
)
{
this
.
optionalField
=
this
.
optionalFields
}
else
{
items
.
forEach
(
i
=>
{
this
.
defaultCheckedKeys
.
push
(
i
.
id
)
}
)
/*this.optionalField = items*/
}
console
.
log
(
this
.
defaultCheckedKeys
)
},
saveHeader
()
{
let
param
=
{
...
...
frontend/src/business/components/track/case/components/TestCaseEdit.vue
浏览文件 @
8ccd6bef
...
...
@@ -705,6 +705,7 @@ export default {
}
param
.
testId
=
JSON
.
stringify
(
this
.
form
.
selected
)
param
.
tags
=
this
.
form
.
tags
;
param
.
type
=
'
functional
'
return
param
;
},
getOption
(
param
)
{
...
...
frontend/src/business/components/track/case/components/TestCaseList.vue
浏览文件 @
8ccd6bef
...
...
@@ -259,7 +259,7 @@ export default {
return
{
type
:
TEST_CASE_LIST
,
headerItems
:
Track_Test_Case
,
tableLabel
:
Track_Test_Case
,
tableLabel
:
[]
,
result
:
{},
deletePath
:
"
/test/case/delete
"
,
condition
:
{
...
...
@@ -381,6 +381,7 @@ export default {
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
TEST_CASE_LIST
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
getSelectDataRange
()
{
...
...
frontend/src/business/components/track/plan/components/TestPlanList.vue
浏览文件 @
8ccd6bef
...
...
@@ -248,7 +248,7 @@ export default {
return
{
type
:
TEST_PLAN_LIST
,
headerItems
:
Test_Plan_List
,
tableLabel
:
Test_Plan_List
,
tableLabel
:
[]
,
result
:
{},
enableDeleteTip
:
false
,
queryPath
:
"
/test/plan/list
"
,
...
...
@@ -290,7 +290,6 @@ export default {
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
initTableData
()
{
getLabel
(
this
,
TEST_PLAN_LIST
);
if
(
this
.
planId
)
{
this
.
condition
.
planId
=
this
.
planId
;
}
...
...
@@ -308,9 +307,11 @@ export default {
if
(
item
.
tags
&&
item
.
tags
.
length
>
0
)
{
item
.
tags
=
JSON
.
parse
(
item
.
tags
);
}
item
.
passRate
=
item
.
passRate
+
'
%
'
item
.
passRate
=
item
.
passRate
+
'
%
'
})
});
getLabel
(
this
,
TEST_PLAN_LIST
);
},
copyData
(
status
)
{
return
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataMap
.
get
(
status
)))
...
...
frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue
浏览文件 @
8ccd6bef
...
...
@@ -192,7 +192,7 @@ export default {
return
{
type
:
TEST_PLAN_API_CASE
,
headerItems
:
Test_Plan_Api_Case
,
tableLabel
:
Test_Plan_Api_Case
,
tableLabel
:
[]
,
condition
:
{},
selectCase
:
{},
result
:
{},
...
...
@@ -302,6 +302,8 @@ export default {
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
TEST_PLAN_API_CASE
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
getMaintainerOptions
()
{
...
...
@@ -317,7 +319,6 @@ export default {
this
.
$emit
(
'
isApiListEnableChange
'
,
data
);
},
initTable
()
{
getLabel
(
this
,
TEST_PLAN_API_CASE
);
this
.
selectRows
=
new
Set
();
this
.
condition
.
status
=
""
;
this
.
condition
.
moduleIds
=
this
.
selectNodeIds
;
...
...
@@ -356,7 +357,7 @@ export default {
})
});
}
getLabel
(
this
,
TEST_PLAN_API_CASE
);
},
handleSelect
(
selection
,
row
)
{
row
.
hashTree
=
[];
...
...
frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue
浏览文件 @
8ccd6bef
...
...
@@ -148,7 +148,7 @@ export default {
return
{
type
:
TEST_PLAN_SCENARIO_CASE
,
headerItems
:
Test_Plan_Scenario_Case
,
tableLabel
:
Test_Plan_Scenario_Case
,
tableLabel
:
[]
,
loading
:
false
,
condition
:
{},
currentScenario
:
{},
...
...
@@ -196,10 +196,11 @@ export default {
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
TEST_PLAN_SCENARIO_CASE
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
search
()
{
getLabel
(
this
,
TEST_PLAN_SCENARIO_CASE
);
this
.
selectRows
=
new
Set
();
this
.
loading
=
true
;
this
.
condition
.
moduleIds
=
this
.
selectNodeIds
;
...
...
@@ -241,6 +242,7 @@ export default {
this
.
loading
=
false
;
});
}
getLabel
(
this
,
TEST_PLAN_SCENARIO_CASE
);
},
reductionApi
(
row
)
{
...
...
frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue
浏览文件 @
8ccd6bef
...
...
@@ -312,7 +312,7 @@ export default {
return
{
type
:
TEST_PLAN_FUNCTION_TEST_CASE
,
headerItems
:
Test_Plan_Function_Test_Case
,
tableLabel
:
Test_Plan_Function_Test_Case
,
tableLabel
:
[]
,
result
:
{},
deletePath
:
"
/test/case/delete
"
,
condition
:
{
...
...
@@ -416,11 +416,11 @@ export default {
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
TEST_PLAN_FUNCTION_TEST_CASE
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
initTableData
()
{
getLabel
(
this
,
TEST_PLAN_FUNCTION_TEST_CASE
);
if
(
this
.
planId
)
{
// param.planId = this.planId;
this
.
condition
.
planId
=
this
.
planId
;
...
...
@@ -464,6 +464,7 @@ export default {
this
.
selectRows
.
clear
();
});
}
getLabel
(
this
,
TEST_PLAN_FUNCTION_TEST_CASE
);
},
showDetail
(
row
,
event
,
column
)
{
this
.
isReadOnly
=
true
;
...
...
frontend/src/business/components/track/plan/view/comonents/load/TestPlanLoadCaseList.vue
浏览文件 @
8ccd6bef
...
...
@@ -154,7 +154,7 @@ export default {
return
{
type
:
TEST_PLAN_LOAD_CASE
,
headerItems
:
Test_Plan_Load_Case
,
tableLabel
:
Test_Plan_Load_Case
,
tableLabel
:
[]
,
condition
:
{},
result
:
{},
tableData
:
[],
...
...
@@ -209,10 +209,10 @@ export default {
},
methods
:
{
customHeader
()
{
getLabel
(
this
,
TEST_PLAN_LOAD_CASE
);
this
.
$refs
.
headerCustom
.
open
(
this
.
tableLabel
)
},
initTable
()
{
getLabel
(
this
,
TEST_PLAN_LOAD_CASE
);
this
.
selectRows
=
new
Set
();
this
.
condition
.
testPlanId
=
this
.
planId
;
if
(
this
.
selectProjectId
&&
this
.
selectProjectId
!==
'
root
'
)
{
...
...
@@ -244,6 +244,8 @@ export default {
this
.
tableData
=
listObject
;
})
}
getLabel
(
this
,
TEST_PLAN_LOAD_CASE
);
},
refreshStatus
()
{
this
.
refreshScheduler
=
setInterval
(()
=>
{
...
...
@@ -328,21 +330,14 @@ export default {
})
},
updateStatus
(
loadCase
,
status
)
{
if
(
this
.
planId
)
{
this
.
$post
(
'
/test/plan/load/case/update
'
,
{
id
:
loadCase
.
id
,
status
:
status
},
()
=>
{
this
.
$post
(
'
/test/plan/edit/status/
'
+
loadCase
.
testPlanId
,
{},
()
=>
{
this
.
initTable
();
});
});
}
if
(
this
.
reviewId
)
{
this
.
$post
(
'
/test/review/load/case/update
'
,
{
id
:
loadCase
.
id
,
status
:
status
},
()
=>
{
this
.
initTable
();
});
}
},
handleDelete
(
loadCase
)
{
this
.
result
=
this
.
$get
(
'
/test/
review
/load/case/delete/
'
+
loadCase
.
id
,
()
=>
{
this
.
result
=
this
.
$get
(
'
/test/
plan
/load/case/delete/
'
+
loadCase
.
id
,
()
=>
{
this
.
$success
(
this
.
$t
(
'
test_track.cancel_relevance_success
'
));
this
.
$emit
(
'
refresh
'
);
this
.
initTable
();
...
...
frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue
浏览文件 @
8ccd6bef
...
...
@@ -63,30 +63,21 @@
<div
class=
"case_container"
>
<el-row>
<el-col
:span=
"
4
"
:offset=
"1"
>
<el-col
:span=
"
9
"
:offset=
"1"
>
<span
class=
"cast_label"
>
{{
$t
(
'
test_track.case.priority
'
)
}}
:
</span>
<span
class=
"cast_item"
>
{{
testCase
.
priority
}}
</span>
</el-col>
<el-col
:span=
"5"
>
<span
class=
"cast_label"
>
{{
$t
(
'
test_track.case.case_type
'
)
}}
:
</span>
<span
class=
"cast_item"
v-if=
"testCase.type === 'automation'"
>
场景用例
</span>
<span
class=
"cast_item"
v-if=
"testCase.type === 'performance'"
>
{{
$t
(
'
commons.performance
'
)
}}
</span>
<span
class=
"cast_item"
v-if=
"testCase.type === 'api'"
>
{{
$t
(
'
commons.api
'
)
}}
</span>
<span
class=
"cast_item"
v-if=
"testCase.type === 'testcase'"
>
接口用例
</span>
<el-col
:span=
"10"
:offset=
"1"
>
<span
class=
"cast_label"
>
{{
$t
(
'
test_track.case.module
'
)
}}
:
</span>
<span
class=
"cast_item"
>
{{
testCase
.
nodePath
}}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:offset=
"1"
>
<span
class=
"cast_label"
>
{{
$t
(
'
test_track.
case.modul
e
'
)
}}
:
</span>
<span
class=
"cast_item"
>
{{
testCase
.
nodePath
}}
</span>
<span
class=
"cast_label"
>
{{
$t
(
'
test_track.
plan_view.relevance_test_cas
e
'
)
}}
:
</span>
<span
class=
"cast_item"
>
{{
testCase
.
prerequisite
}}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:offset=
"1"
>
<span
class=
"cast_label"
>
{{
$t
(
'
test_track.case.prerequisite
'
)
}}
:
</span>
...
...
@@ -94,7 +85,7 @@
</el-col>
</el-row>
<el-row>
<
!--
<
el-row>
<el-col
class=
"test-detail"
:span=
"20"
:offset=
"1"
>
<el-tabs
v-model=
"activeTab"
type=
"border-card"
>
<el-tab-pane
name=
"detail"
:label=
"$t('test_track.plan_view.test_detail')"
>
...
...
@@ -112,9 +103,9 @@
</el-tab-pane>
</el-tabs>
</el-col>
</el-row
>
</el-row>
--
>
<el-row
v-if=
"testCase.type === 'function'"
>
<el-row>
<el-col
:span=
"20"
:offset=
"1"
>
<div>
<span
class=
"cast_label"
>
{{
$t
(
'
test_track.case.steps
'
)
}}
:
</span>
...
...
@@ -365,7 +356,7 @@ export default {
this
.
testCase
=
item
;
this
.
getRelatedTest
();
this
.
getComments
(
item
);
this
.
initTest
();
/* this.initTest();*/
this
.
getFileMetaData
(
data
);
})
...
...
@@ -389,45 +380,8 @@ export default {
listenGoBack
(
this
.
handleClose
);
this
.
initData
(
testCase
);
this
.
getComments
(
testCase
);
this
.
getApiTestCase
(
testCase
);
this
.
getCurrentScenario
(
testCase
)
},
getApiTestCase
(
testCase
)
{
let
param
=
{}
param
.
projectId
=
getCurrentProjectID
();
param
.
id
=
testCase
.
testId
;
this
.
result
=
this
.
$post
(
"
/api/testcase/list
"
,
param
,
response
=>
{
let
apiCaseList
=
[]
this
.
apiCaseList
=
response
.
data
;
this
.
apiCaseList
.
forEach
(
apiCase
=>
{
if
(
apiCase
.
tags
&&
apiCase
.
tags
.
length
>
0
)
{
apiCase
.
tags
=
JSON
.
parse
(
apiCase
.
tags
);
this
.
$set
(
apiCase
,
'
selected
'
,
false
);
}
if
(
Object
.
prototype
.
toString
.
call
(
apiCase
.
request
).
match
(
/
\[
object
(\w
+
)\]
/
)[
1
].
toLowerCase
()
!=
'
object
'
)
{
apiCase
.
request
=
JSON
.
parse
(
apiCase
.
request
);
}
if
(
!
apiCase
.
request
.
hashTree
)
{
apiCase
.
request
.
hashTree
=
[];
}
this
.
apiCase
=
apiCase
this
.
handleTestCase
(
apiCase
)
})
});
},
getCurrentScenario
(
testCase
)
{
this
.
result
=
this
.
$get
(
"
/api/automation/getApiScenario/
"
+
testCase
.
testId
,
response
=>
{
this
.
currentScenario
=
response
.
data
});
},
handleTestCase
(
testCase
)
{
this
.
$get
(
'
/api/definition/get/
'
+
testCase
.
apiDefinitionId
,
(
response
)
=>
{
this
.
api
=
response
.
data
;
});
},
initTest
()
{
/* initTest() {
this.$nextTick(() => {
if (this.testCase.testId && this.testCase.testId !== 'other') {
if (this.$refs.apiTestDetail && this.testCase.type === 'api') {
...
...
@@ -441,7 +395,7 @@ export default {
}
}
});
},
},*/
getComments
(
testCase
)
{
let
id
=
''
;
if
(
testCase
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录