Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
龚小红
oto
Commits
e2e87f45
Commit
e2e87f45
authored
May 19, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加经营盘点的测试用例
parent
7986567c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
148 additions
and
52 deletions
+148
-52
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+62
-0
CheckTask.java
src/test/java/com/oto/cases/otoseller/CheckTask.java
+54
-27
Invite.java
src/test/java/com/oto/cases/otoseller/Invite.java
+2
-2
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+0
-1
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+28
-22
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+2
-0
No files found.
src/test/java/com/oto/cases/otoseller/Activity.java
View file @
e2e87f45
...
@@ -14,6 +14,7 @@ import java.util.ArrayList;
...
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
static
com
.
oto
.
cases
.
otoseller
.
CheckTask
.*;
import
static
com
.
oto
.
cases
.
otoseller
.
Invite
.*;
import
static
com
.
oto
.
cases
.
otoseller
.
Invite
.*;
import
static
com
.
oto
.
cases
.
otoseller
.
Manager
.
cust_id
;
import
static
com
.
oto
.
cases
.
otoseller
.
Manager
.
cust_id
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.*;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.*;
...
@@ -530,6 +531,67 @@ public class Activity implements Authorization {
...
@@ -530,6 +531,67 @@ public class Activity implements Authorization {
Assert
.
assertEquals
(
isSign
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"已分配客户的签到非【是】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
isSign
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"已分配客户的签到非【是】"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询团队更新经营客户情况"
,
priority
=
40
)
public
void
查询团队更新经营客户情况
(){
otoLeaderAuth
();
checChart
(
1
,
3
,
1
);
checChart
(
2
,
5
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
4
,
0
,
0
);
checChart
(
5
,
0
,
0
);
checChart
(
6
,
0
,
0
);
}
@Test
(
description
=
"上传kyc更新经营客户情况"
,
priority
=
41
)
public
void
上传
kyc
更新经营客户情况
(){
saveKyc
(
cust_id
+
2
,
true
);
saveKyc
(
cust_id
+
3
,
true
);
checChart
(
1
,
3
,
1
);
checChart
(
2
,
4
,
0
);
checChart
(
3
,
1
,
0
);
checChart
(
4
,
0
,
0
);
checChart
(
5
,
0
,
0
);
checChart
(
6
,
0
,
0
);
}
@Test
(
description
=
"上传风险报告更新经营客户情况"
,
priority
=
42
)
public
void
上传风险报告更新经营客户情况
(){
otoPlanAuth
();
savePlanFile
(
3
,
cust_id
+
2
);
savePlanFile
(
3
,
cust_id
+
3
);
checChart
(
1
,
3
,
1
);
checChart
(
2
,
4
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
4
,
1
,
0
);
checChart
(
5
,
0
,
0
);
checChart
(
6
,
0
,
0
);
}
@Test
(
description
=
"上传解决方案更新经营客户情况"
,
priority
=
43
)
public
void
上传解决方案更新经营客户情况
(){
savePlanFile
(
3
,
cust_id
+
2
);
savePlanFile
(
3
,
cust_id
+
3
);
checChart
(
1
,
3
,
1
);
checChart
(
2
,
4
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
4
,
0
,
0
);
checChart
(
5
,
1
,
0
);
checChart
(
6
,
0
,
0
);
}
@Test
(
description
=
"标记促单更新经营客户情况"
,
priority
=
43
)
public
void
标记促单更新经营客户情况
(){
otoLeaderAuth
();
promotionUpdate
(
cust_id
+
2
,
2
);
promotionUpdate
(
cust_id
+
3
,
2
);
checChart
(
1
,
3
,
1
);
checChart
(
2
,
4
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
4
,
0
,
0
);
checChart
(
5
,
0
,
0
);
checChart
(
6
,
1
,
0
);
}
public
void
sellerSubmitRecord
(
int
status
,
int
count
){
public
void
sellerSubmitRecord
(
int
status
,
int
count
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
...
src/test/java/com/oto/cases/otoseller/CheckTask.java
View file @
e2e87f45
...
@@ -59,7 +59,7 @@ public class CheckTask implements Authorization {
...
@@ -59,7 +59,7 @@ public class CheckTask implements Authorization {
sellerOeExpertList
(
"带看"
,
false
,
2
);
//查询销售-【仅查询当前部门及子部门】
sellerOeExpertList
(
"带看"
,
false
,
2
);
//查询销售-【仅查询当前部门及子部门】
sellerOeExpertList
(
"专家"
,
true
,
2
);
//查询专家-【仅查询当前部门及子部门】
sellerOeExpertList
(
"专家"
,
true
,
2
);
//查询专家-【仅查询当前部门及子部门】
sellerOeExpertList
(
"自动化"
,
false
,
2
);
//查询销售-【仅查询对应角色】
sellerOeExpertList
(
"自动化"
,
false
,
2
);
//查询销售-【仅查询对应角色】
sellerOeExpertList
(
"自动化"
,
true
,
2
);
//查询专家-【仅查询对应角色】
sellerOeExpertList
(
"自动化"
,
true
,
3
);
//查询专家-【仅查询对应角色】
}
}
@Test
(
description
=
"查看可筛选标签列表"
,
priority
=
4
)
@Test
(
description
=
"查看可筛选标签列表"
,
priority
=
4
)
...
@@ -72,25 +72,16 @@ public class CheckTask implements Authorization {
...
@@ -72,25 +72,16 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"标记和取消促单"
,
priority
=
5
)
@Test
(
description
=
"标记和取消促单"
,
priority
=
5
)
public
void
标记和取消促单
(){
public
void
标记和取消促单
(){
otoLeaderAuth
();
otoLeaderAuth
();
promotionUpdate
(
cust_id
,
1
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"promotionType"
,
1
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_promotionUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_promotionUpdate
,
"标记促单成功"
,
response
.
body
().
asString
()));
//查看客户的促单状态
//查看客户的促单状态
params
.
put
(
"type"
,
2
);
params
.
put
(
"type"
,
2
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
int
promotionType
=
response
.
jsonPath
().
getInt
(
"data.promotionType"
);
int
promotionType
=
response
.
jsonPath
().
getInt
(
"data.promotionType"
);
Assert
.
assertEquals
(
promotionType
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"客户的促单状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
promotionType
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"客户的促单状态错误"
,
response
.
body
().
asString
()));
promotionUpdate
(
cust_id
,
0
);
params
.
put
(
"promotionType"
,
0
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_promotionUpdate
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_promotionUpdate
,
"取消促单成功"
,
response
.
body
().
asString
()));
//查看客户的促单状态
//查看客户的促单状态
params
.
put
(
"type"
,
2
);
params
.
put
(
"type"
,
2
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
...
@@ -116,6 +107,11 @@ public class CheckTask implements Authorization {
...
@@ -116,6 +107,11 @@ public class CheckTask implements Authorization {
Assert
.
assertEquals
(
custStar
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"标记客户星标失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStar
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"标记客户星标失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询团队未盘点的未见面客户"
,
priority
=
7
)
public
void
查询团队未盘点的未见面客户
(){
checChart
(
1
,
6
,
0
);
}
@Test
(
description
=
"特定销售可见团队"
,
priority
=
9
)
@Test
(
description
=
"特定销售可见团队"
,
priority
=
9
)
public
void
特定销售可见团队
(){
public
void
特定销售可见团队
(){
otoManagerAuth
();
otoManagerAuth
();
...
@@ -585,14 +581,18 @@ public class CheckTask implements Authorization {
...
@@ -585,14 +581,18 @@ public class CheckTask implements Authorization {
getTree
(
4
,
null
,
0
,
0
,
null
,
null
);
getTree
(
4
,
null
,
0
,
0
,
null
,
null
);
}
}
@Test
(
description
=
"销售上传KYC"
,
priority
=
51
)
@Test
(
description
=
"上传KYC"
,
priority
=
51
)
public
void
销售上传
KYC
(){
public
void
上传
KYC
(){
saveKyc
(
true
);
saveKyc
(
cust_id
,
true
);
otoPMAuth
();
saveKyc
(
cust_id
,
true
);
}
}
@Test
(
description
=
"销售提审客户报告"
,
priority
=
52
)
@Test
(
description
=
"销售提审客户报告"
,
priority
=
52
)
public
void
销售提审客户报告
(){
public
void
销售提审客户报告
(){
otoExpertAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"hopePayTime"
,
today
+
86400000
*
2
);
params
.
put
(
"hopePayTime"
,
today
+
86400000
*
2
);
...
@@ -604,7 +604,7 @@ public class CheckTask implements Authorization {
...
@@ -604,7 +604,7 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"查看kyc上传历史列表"
,
priority
=
53
)
@Test
(
description
=
"查看kyc上传历史列表"
,
priority
=
53
)
public
void
查看
kyc
上传历史列表
(){
public
void
查看
kyc
上传历史列表
(){
//查看kys上传历史
//查看kys上传历史
getSchemeList
(
1
,
1
);
getSchemeList
(
1
,
2
);
}
}
@Test
(
description
=
"查看客户报告进度为总监审批中"
,
priority
=
54
)
@Test
(
description
=
"查看客户报告进度为总监审批中"
,
priority
=
54
)
...
@@ -677,7 +677,7 @@ public class CheckTask implements Authorization {
...
@@ -677,7 +677,7 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"解决方案上传风险评估报告"
,
priority
=
60
)
@Test
(
description
=
"解决方案上传风险评估报告"
,
priority
=
60
)
public
void
解决方案上传风险评估报告
(){
public
void
解决方案上传风险评估报告
(){
savePlanFile
(
3
);
savePlanFile
(
3
,
cust_id
);
sleep
(
1000
);
sleep
(
1000
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
getTree
(
9
,
2
,
0
,
1
,
99
,
3
);
getTree
(
9
,
2
,
0
,
1
,
99
,
3
);
...
@@ -685,7 +685,7 @@ public class CheckTask implements Authorization {
...
@@ -685,7 +685,7 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"解决方案上传客户方案"
,
priority
=
61
)
@Test
(
description
=
"解决方案上传客户方案"
,
priority
=
61
)
public
void
解决方案上传客户方案
(){
public
void
解决方案上传客户方案
(){
savePlanFile
(
2
);
savePlanFile
(
2
,
cust_id
);
sleep
(
1000
);
sleep
(
1000
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
getTree
(
9
,
2
,
0
,
1
,
99
,
2
);
getTree
(
9
,
2
,
0
,
1
,
99
,
2
);
...
@@ -693,9 +693,6 @@ public class CheckTask implements Authorization {
...
@@ -693,9 +693,6 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"查看kyc和方案上传历史列表"
,
priority
=
62
)
@Test
(
description
=
"查看kyc和方案上传历史列表"
,
priority
=
62
)
public
void
查看
kyc
和方案上传历史列表
(){
public
void
查看
kyc
和方案上传历史列表
(){
//查看kys上传历史
getSchemeList
(
1
,
1
);
//查看方案上传历史
//查看方案上传历史
getSchemeList
(
2
,
2
);
getSchemeList
(
2
,
2
);
...
@@ -709,7 +706,7 @@ public class CheckTask implements Authorization {
...
@@ -709,7 +706,7 @@ public class CheckTask implements Authorization {
params
.
put
(
"name"
,
"自动化"
);
params
.
put
(
"name"
,
"自动化"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_expertName
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_expertName
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_expertName
,
"活动不可签到
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_expertName
,
"查询当前跟进专家姓名结果错误
"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询团队跟进客户姓名"
,
priority
=
64
)
@Test
(
description
=
"查询团队跟进客户姓名"
,
priority
=
64
)
...
@@ -721,6 +718,16 @@ public class CheckTask implements Authorization {
...
@@ -721,6 +718,16 @@ public class CheckTask implements Authorization {
Assert
.
assertTrue
(
size
>
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_custName
,
"客户姓名为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_custName
,
"客户姓名为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询团队的经营客户情况"
,
priority
=
70
)
public
void
查询团队的经营客户情况
(){
checChart
(
1
,
6
,
1
);
checChart
(
2
,
0
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
4
,
0
,
0
);
checChart
(
5
,
0
,
0
);
checChart
(
6
,
0
,
0
);
}
//获取销售个人工作计划
//获取销售个人工作计划
public
static
void
getSellerPlan
(
int
amFinish
,
int
amTotal
,
int
pmFinish
,
int
pmTotal
,
int
pStatus
,
int
unFinishTypes
){
public
static
void
getSellerPlan
(
int
amFinish
,
int
amTotal
,
int
pmFinish
,
int
pmTotal
,
int
pStatus
,
int
unFinishTypes
){
...
@@ -755,9 +762,9 @@ public class CheckTask implements Authorization {
...
@@ -755,9 +762,9 @@ public class CheckTask implements Authorization {
Assert
.
assertEquals
(
size
,
count
,
network
.
message
(
params
,
BasicConfig
.
WORK_check_sellerList
,
"结果列表错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
count
,
network
.
message
(
params
,
BasicConfig
.
WORK_check_sellerList
,
"结果列表错误"
,
response
.
body
().
asString
()));
}
}
public
void
saveKyc
(
boolean
result
){
public
static
void
saveKyc
(
int
cutomer_ID
,
boolean
result
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cu
st_id
);
params
.
put
(
"custId"
,
cu
tomer_ID
);
params
.
put
(
"kycImages"
,
new
String
[]{
"//yun.dui88.com/kjy/image/20230113/523669708b5043f5bb4641252e125cb5.jpg"
,
"//yun.dui88.com/kjy/image/20230113/edd2e950a8aa4fb2a15ae7400b768fed.jpg"
});
params
.
put
(
"kycImages"
,
new
String
[]{
"//yun.dui88.com/kjy/image/20230113/523669708b5043f5bb4641252e125cb5.jpg"
,
"//yun.dui88.com/kjy/image/20230113/edd2e950a8aa4fb2a15ae7400b768fed.jpg"
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_scheme_saveKyc
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_scheme_saveKyc
);
if
(
result
)
{
if
(
result
)
{
...
@@ -769,9 +776,9 @@ public class CheckTask implements Authorization {
...
@@ -769,9 +776,9 @@ public class CheckTask implements Authorization {
}
}
}
}
public
void
savePlanFile
(
int
uploadType
){
public
static
void
savePlanFile
(
int
uploadType
,
int
cutomer_ID
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cu
st_id
);
params
.
put
(
"custId"
,
cu
tomer_ID
);
params
.
put
(
"uploadType"
,
uploadType
);
params
.
put
(
"uploadType"
,
uploadType
);
if
(
uploadType
==
2
){
if
(
uploadType
==
2
){
params
.
put
(
"planFiles"
,
new
String
[]{
"//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc"
,
"//yun.dui88.com/kjy/media/file/20230131/20230131111229/4.ppt"
}
);
params
.
put
(
"planFiles"
,
new
String
[]{
"//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc"
,
"//yun.dui88.com/kjy/media/file/20230131/20230131111229/4.ppt"
}
);
...
@@ -864,4 +871,24 @@ public class CheckTask implements Authorization {
...
@@ -864,4 +871,24 @@ public class CheckTask implements Authorization {
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
count
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_list
,
"列表数量非"
+
count
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
count
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_list
,
"列表数量非"
+
count
,
response
.
body
().
asString
()));
}
}
public
static
void
checChart
(
int
custType
,
int
allCustNum
,
int
checkNum
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"deptIds"
,
new
int
[]{});
params
.
put
(
"expertIds"
,
new
int
[]{});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_abandonCust
);
int
allNum
=
response
.
jsonPath
().
getInt
(
"data.fina{it.custType == "
+
custType
+
"}.allCustNum"
);
int
checkCusrNum
=
response
.
jsonPath
().
getInt
(
"data.fina{it.custType == "
+
custType
+
"}.checkNum"
);
Assert
.
assertEquals
(
allNum
,
allCustNum
,
network
.
message
(
params
,
BasicConfig
.
WORK_abandonCust
,
"客户类型为"
+
custType
+
"的总人数"
+
allCustNum
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
checkCusrNum
,
checkNum
,
network
.
message
(
params
,
BasicConfig
.
WORK_abandonCust
,
"客户类型为"
+
custType
+
"的已盘点人数"
+
allCustNum
,
response
.
body
().
asString
()));
}
public
static
void
promotionUpdate
(
int
cust_id
,
int
promotionType
)
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"promotionType"
,
promotionType
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_promotionUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_promotionUpdate
,
"操作促单标识失败"
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/oto/cases/otoseller/Invite.java
View file @
e2e87f45
...
@@ -252,7 +252,7 @@ public class Invite implements Authorization {
...
@@ -252,7 +252,7 @@ public class Invite implements Authorization {
params
.
put
(
"expertFlag"
,
true
);
params
.
put
(
"expertFlag"
,
true
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_calendar_workMenu
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_calendar_workMenu
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WORK_calendar_workMenu
,
"查看产品
列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
BasicConfig
.
WORK_calendar_workMenu
,
"查看专家
列表不为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"CRM查询场景带看人列表"
,
priority
=
22
)
@Test
(
description
=
"CRM查询场景带看人列表"
,
priority
=
22
)
...
@@ -262,7 +262,7 @@ public class Invite implements Authorization {
...
@@ -262,7 +262,7 @@ public class Invite implements Authorization {
params
.
put
(
"expertFlag"
,
false
);
params
.
put
(
"expertFlag"
,
false
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_calendar_workMenu
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_calendar_workMenu
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WORK_calendar_workMenu
,
"查看
产品
列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WORK_calendar_workMenu
,
"查看
带看
列表不为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"预分配客户"
,
priority
=
23
)
@Test
(
description
=
"预分配客户"
,
priority
=
23
)
...
...
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
e2e87f45
...
@@ -516,7 +516,6 @@ public class Manager implements Authorization {
...
@@ -516,7 +516,6 @@ public class Manager implements Authorization {
}
}
@Test
(
description
=
"公域引流_创建标签"
,
priority
=
58
)
@Test
(
description
=
"公域引流_创建标签"
,
priority
=
58
)
public
void
公域引流
_
创建标签
(){
public
void
公域引流
_
创建标签
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
e2e87f45
...
@@ -526,20 +526,12 @@ public class Work implements Authorization {
...
@@ -526,20 +526,12 @@ public class Work implements Authorization {
@Test
(
description
=
"创建转介绍客户"
,
priority
=
38
)
@Test
(
description
=
"创建转介绍客户"
,
priority
=
38
)
public
void
创建转介绍客户
(){
public
void
创建转介绍客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"addType"
,
1
);
createCustomerFromDetail
(
1
,
cust_id
,
"自动化测试用户"
,
"15136361306"
,
"自动化测试客户6"
,
true
);
params
.
put
(
"introducerId"
,
cust_id
);
params
.
put
(
"introducerName"
,
"自动化测试用户"
);
params
.
put
(
"custPhoneNum"
,
"15136361306"
);
params
.
put
(
"custName"
,
"自动化测试客户6"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_introduce_save
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_introduce_save
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
50
);
params
.
put
(
"pageSize"
,
50
);
params
.
put
(
"custName"
,
"自动化测试客户6"
);
params
.
put
(
"custName"
,
"自动化测试客户6"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_inviterCustList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_inviterCustList
);
int
customerId
=
response
.
jsonPath
().
getInt
(
"data.list[0].custId"
);
int
customerId
=
response
.
jsonPath
().
getInt
(
"data.list[0].custId"
);
params
.
clear
();
params
.
clear
();
...
@@ -818,13 +810,13 @@ public class Work implements Authorization {
...
@@ -818,13 +810,13 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
WORK_MNG_updatePermission
,
"开启权限失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
WORK_MNG_updatePermission
,
"开启权限失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"跟进中
不可重新激活
"
,
priority
=
59
)
@Test
(
description
=
"跟进中
可重新激活更新来源
"
,
priority
=
59
)
public
void
跟进中
不可重新激活
(){
public
void
跟进中
可重新激活更新来源
(){
//重新填写表单
//重新填写表单
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
PubForm
(
"15136361301"
,
"自动化未激活用户"
);
createCustomerFromDetail
(
1
,
cust_id
-
0
,
"自动化测试用户0"
,
"15136361301"
,
"自动化未激活用户"
,
false
);
//查看客户未被重新激活
并姓名和产品组更新
//查看客户未被重新激活
,客户来源更新,姓名和产品组不变
params
.
clear
();
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"pageSize"
,
10
);
...
@@ -833,11 +825,11 @@ public class Work implements Authorization {
...
@@ -833,11 +825,11 @@ public class Work implements Authorization {
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.totalCount"
);
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"未查找到该客户"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
totalCount
==
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"未查找到该客户"
,
response
.
body
().
asString
()));
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()
"
);
String
custFromSourceDesc
=
response
.
jsonPath
().
getString
(
"data.list[0].custFromSourceDesc
"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
Assert
.
assertEquals
(
custName
,
"自动化测试用户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名
与填单时错误
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custName
,
"自动化测试用户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名
更新
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
c
ompanySize
,
3
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的产品组错误
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
c
ustFromSourceDesc
,
"销售自建-转介绍客户-转介绍客户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户来源未更新
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的
产品组
错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的
资源池
错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"销售间客户动态取消隔离"
,
priority
=
60
)
@Test
(
description
=
"销售间客户动态取消隔离"
,
priority
=
60
)
...
@@ -919,11 +911,11 @@ public class Work implements Authorization {
...
@@ -919,11 +911,11 @@ public class Work implements Authorization {
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.totalCount"
);
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"未查找到该客户"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
totalCount
==
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"未查找到该客户"
,
response
.
body
().
asString
()));
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()
"
);
String
custFromSourceDesc
=
response
.
jsonPath
().
getString
(
"data.list[0].custFromSourceDesc
"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
Assert
.
assertEquals
(
custName
,
"自动化
激活用户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名与填单时错误
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custName
,
"自动化
测试用户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名更新
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
c
ompanySize
,
3
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的产品组错误
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
c
ustFromSourceDesc
,
"投放客户-自建落地页-表单"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户来源未更新
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStatus
,
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的
产品组
错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStatus
,
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的
资源池
错误"
,
response
.
body
().
asString
()));
//分配给邀约
//分配给邀约
ssoLogin
();
ssoLogin
();
...
@@ -1071,4 +1063,18 @@ public class Work implements Authorization {
...
@@ -1071,4 +1063,18 @@ public class Work implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_abandonCust
,
"放弃客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_abandonCust
,
"放弃客户失败"
,
response
.
body
().
asString
()));
}
}
public
static
void
createCustomerFromDetail
(
int
addType
,
int
introducerId
,
String
introducerName
,
String
custPhoneNum
,
String
custName
,
boolean
result
){
//1-从客户详情创建转介绍客户
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"addType"
,
addType
);
params
.
put
(
"introducerId"
,
introducerId
);
params
.
put
(
"introducerName"
,
introducerName
);
params
.
put
(
"custPhoneNum"
,
custPhoneNum
);
params
.
put
(
"custName"
,
custName
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_introduce_save
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertEquals
(
data
,
result
,
network
.
message
(
params
,
BasicConfig
.
WORK_introduce_save
,
"创建转介绍客户结果非"
+
result
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/oto/config/BasicConfig.java
View file @
e2e87f45
...
@@ -234,6 +234,7 @@ public class BasicConfig {
...
@@ -234,6 +234,7 @@ public class BasicConfig {
public
static
final
String
WORK_assignSeller
=
WORK_HOST
+
"/kjy/oto/manager/customer/assignSeller"
;
public
static
final
String
WORK_assignSeller
=
WORK_HOST
+
"/kjy/oto/manager/customer/assignSeller"
;
public
static
final
String
WORK_liveDynamic
=
WORK_HOST
+
"/kjy/oto/manager/customer/liveDynamic"
;
public
static
final
String
WORK_liveDynamic
=
WORK_HOST
+
"/kjy/oto/manager/customer/liveDynamic"
;
public
static
final
String
WORK_updateInfo
=
WORK_HOST
+
"/kjy/oto/manager/customer/info/update"
;
public
static
final
String
WORK_updateInfo
=
WORK_HOST
+
"/kjy/oto/manager/customer/info/update"
;
public
static
final
String
WORK_notifyWarning
=
WORK_HOST
+
"/kjy/oto/manager/customer/notify/total"
;
//*************************客户报告审批*******************************
//*************************客户报告审批*******************************
public
static
final
String
WORK_OA_submit
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/submit"
;
public
static
final
String
WORK_OA_submit
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/submit"
;
...
@@ -271,6 +272,7 @@ public class BasicConfig {
...
@@ -271,6 +272,7 @@ public class BasicConfig {
public
static
final
String
WORK_scheme_qualified
=
WORK_HOST
+
"/kjy/oto/manager/customer/kyc/qualified/update"
;
public
static
final
String
WORK_scheme_qualified
=
WORK_HOST
+
"/kjy/oto/manager/customer/kyc/qualified/update"
;
public
static
final
String
WORK_scheme_savePlanFile
=
WORK_HOST
+
"/kjy/oto/manager/customer/planFile/save"
;
public
static
final
String
WORK_scheme_savePlanFile
=
WORK_HOST
+
"/kjy/oto/manager/customer/planFile/save"
;
public
static
final
String
WORK_scheme_saveKyc
=
WORK_HOST
+
"/kjy/oto/manager/customer/kyc/save"
;
public
static
final
String
WORK_scheme_saveKyc
=
WORK_HOST
+
"/kjy/oto/manager/customer/kyc/save"
;
public
static
final
String
WORK_check_custChart
=
WORK_HOST
+
"/kjy/oto/manager/customer/custCheck/custChart"
;
//*************************会话管理***************************
//*************************会话管理***************************
public
static
final
String
WORK_wxList
=
WORK_HOST
+
"/kjy/oto/manager/wx/conversation/list"
;
public
static
final
String
WORK_wxList
=
WORK_HOST
+
"/kjy/oto/manager/wx/conversation/list"
;
...
...
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