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
a28b35a5
Commit
a28b35a5
authored
Aug 24, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20220824-gxh' into 'master'
更新系数继承的测试用例 See merge request
!23
parents
8882b3eb
ec8504ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
31 deletions
+101
-31
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+6
-6
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+95
-25
No files found.
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
a28b35a5
...
@@ -75,7 +75,7 @@ public class Phone implements Authorization {
...
@@ -75,7 +75,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"姓名搜索客户"
,
priority
=
4
)
@Test
(
description
=
"姓名搜索客户"
,
priority
=
4
)
public
void
姓名搜索客户
(){
public
void
姓名搜索客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化
测试
用户"
);
params
.
put
(
"custName"
,
"自动化
激活
用户"
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
...
@@ -136,8 +136,8 @@ public class Phone implements Authorization {
...
@@ -136,8 +136,8 @@ public class Phone implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户列表为空"
,
response
.
body
().
asString
()));
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.find{it.custName == '自动化
测试
用户'}.custFlow"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.find{it.custName == '自动化
激活
用户'}.custFlow"
);
boolean
interviewStatus
=
response
.
jsonPath
().
getBoolean
(
"data.myCustomerVos.find{it.custName == '自动化
测试
用户'}.interviewStatus"
);
boolean
interviewStatus
=
response
.
jsonPath
().
getBoolean
(
"data.myCustomerVos.find{it.custName == '自动化
激活
用户'}.interviewStatus"
);
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户阶段错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户阶段错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
interviewStatus
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户面访状态错误:非面访中"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
interviewStatus
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户面访状态错误:非面访中"
,
response
.
body
().
asString
()));
}
}
...
@@ -324,7 +324,7 @@ public class Phone implements Authorization {
...
@@ -324,7 +324,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看我的面访状态更新为审批中"
,
priority
=
23
)
@Test
(
description
=
"查看我的面访状态更新为审批中"
,
priority
=
23
)
public
void
查看我的面访状态更新为审批中
(){
public
void
查看我的面访状态更新为审批中
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化
测试
用户"
);
params
.
put
(
"custName"
,
"自动化
激活
用户"
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
...
@@ -386,7 +386,7 @@ public class Phone implements Authorization {
...
@@ -386,7 +386,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看我的面访状态更新为已失效"
,
priority
=
27
)
@Test
(
description
=
"查看我的面访状态更新为已失效"
,
priority
=
27
)
public
void
查看我的面访状态更新为已失效
(){
public
void
查看我的面访状态更新为已失效
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化
测试
用户"
);
params
.
put
(
"custName"
,
"自动化
激活
用户"
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
interviewStatus
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.find{it.id == '"
+
interviewIds
.
get
(
0
)
+
"'}.interviewStatus"
);
int
interviewStatus
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.find{it.id == '"
+
interviewIds
.
get
(
0
)
+
"'}.interviewStatus"
);
...
@@ -484,7 +484,7 @@ public class Phone implements Authorization {
...
@@ -484,7 +484,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看我的面访状态更新为已完成"
,
priority
=
33
)
@Test
(
description
=
"查看我的面访状态更新为已完成"
,
priority
=
33
)
public
void
查看我的面访状态更新为已完成
(){
public
void
查看我的面访状态更新为已完成
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化
测试
用户"
);
params
.
put
(
"custName"
,
"自动化
激活
用户"
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
interviewStatus
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.find{it.id == '"
+
interviewIds
.
get
(
0
)
+
"'}.interviewStatus"
);
int
interviewStatus
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.find{it.id == '"
+
interviewIds
.
get
(
0
)
+
"'}.interviewStatus"
);
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
a28b35a5
...
@@ -125,7 +125,6 @@ public class Work implements Authorization {
...
@@ -125,7 +125,6 @@ public class Work implements Authorization {
@Test
(
description
=
"公域引流_分配客户"
,
priority
=
6
)
@Test
(
description
=
"公域引流_分配客户"
,
priority
=
6
)
public
void
公域引流
_
分配客户
(){
public
void
公域引流
_
分配客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
String
str
=
String
.
valueOf
(
System
.
currentTimeMillis
());
params
.
put
(
"customerId"
,
custId
);
params
.
put
(
"customerId"
,
custId
);
params
.
put
(
"sellerId"
,
3
);
params
.
put
(
"sellerId"
,
3
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
);
...
@@ -136,6 +135,7 @@ public class Work implements Authorization {
...
@@ -136,6 +135,7 @@ public class Work implements Authorization {
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
,
"销售相同产品组分配客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
,
"销售相同产品组分配客户失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"工作台_销售信息"
,
priority
=
7
)
@Test
(
description
=
"工作台_销售信息"
,
priority
=
7
)
...
@@ -805,8 +805,10 @@ public class Work implements Authorization {
...
@@ -805,8 +805,10 @@ public class Work implements Authorization {
//查询销售总系数
//查询销售总系数
response
=
network
.
getResponse
(
BasicConfig
.
WORK_coefficient_detail
);
response
=
network
.
getResponse
(
BasicConfig
.
WORK_coefficient_detail
);
BigDecimal
bg
=
new
BigDecimal
(
coefficient
.
get
(
"totalCoefficient"
)
+
coefficient
.
get
(
"claimCustCoefficient"
));
Double
sum
=
bg
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
Double
totalCoefficient
=
response
.
jsonPath
().
getDouble
(
"data.totalCoefficient"
);
Double
totalCoefficient
=
response
.
jsonPath
().
getDouble
(
"data.totalCoefficient"
);
Assert
.
assertEquals
(
totalCoefficient
,
coefficient
.
get
(
"totalCoefficient"
)
,
network
.
message
(
BasicConfig
.
WORK_coefficient_detail
,
"放弃客户销售总系数变化"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
totalCoefficient
,
sum
,
network
.
message
(
BasicConfig
.
WORK_coefficient_detail
,
"放弃客户销售总系数变化"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"认领回收池客户总数更新"
,
priority
=
69
)
@Test
(
description
=
"认领回收池客户总数更新"
,
priority
=
69
)
...
@@ -882,15 +884,37 @@ public class Work implements Authorization {
...
@@ -882,15 +884,37 @@ public class Work implements Authorization {
Response
logRes
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_operation
);
Response
logRes
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_operation
);
int
logSize
=
logRes
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
logSize
=
logRes
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
logSize
>
0
,
network
.
message
(
BasicConfig
.
WORK_operation
,
"客户动态隔离失败"
,
logRes
.
body
().
asString
()));
Assert
.
assertTrue
(
logSize
>
0
,
network
.
message
(
BasicConfig
.
WORK_operation
,
"客户动态隔离失败"
,
logRes
.
body
().
asString
()));
}
//还原
@Test
(
description
=
"跟进中不可重新激活"
,
priority
=
76
)
public
void
跟进中不可重新激活
(){
//重新填写表单
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"formId"
,
"Kj22MTAzOQ"
);
params
.
put
(
"phoneNum"
,
phone
);
params
.
put
(
"urlLink"
,
"https://kjj-static.duibatest.com.cn/cpic-home/2022030105?formId=Kj22MTAzOQ&channel=tx&agent=xm"
);
params
.
put
(
"username"
,
"自动化激活用户"
);
params
.
put
(
"uuid"
,
"622d83e4-ca21-4ccd-94cb-182c0f2a6b60"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
FORM_submit
);
//查看客户被重新激活并姓名和产品组更新
params
.
clear
();
params
.
clear
();
params
.
put
(
"customerId"
,
custId
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"sellerId"
,
SELLER_ID
);
params
.
put
(
"pageSize"
,
10
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
);
params
.
put
(
"phoneNum"
,
phone
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"未查找到该客户"
,
response
.
body
().
asString
()));
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
Assert
.
assertEquals
(
custName
,
"自动化测试用户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名与填单时错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
companySize
,
3
,
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
=
7
6
)
@Test
(
description
=
"关闭总监的新客户认领权限和回收客户认领权限"
,
priority
=
7
8
)
public
void
关闭总监的新客户认领权限和回收客户认领权限
(){
public
void
关闭总监的新客户认领权限和回收客户认领权限
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
LEADER_ID
);
params
.
put
(
"id"
,
LEADER_ID
);
...
@@ -904,7 +928,7 @@ public class Work implements Authorization {
...
@@ -904,7 +928,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
MANAGER_oto_updatePermission
,
"关闭总监的新客户认领权限和回收客户认领权限失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
MANAGER_oto_updatePermission
,
"关闭总监的新客户认领权限和回收客户认领权限失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"无新客户认领权限不可查看新客户列表"
,
priority
=
7
7
)
@Test
(
description
=
"无新客户认领权限不可查看新客户列表"
,
priority
=
7
9
)
public
void
无新客户认领权限不可查看新客户列表
(){
public
void
无新客户认领权限不可查看新客户列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -914,7 +938,7 @@ public class Work implements Authorization {
...
@@ -914,7 +938,7 @@ public class Work implements Authorization {
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_freshList
,
"无新客户认领权限可查看新客户列表"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_freshList
,
"无新客户认领权限可查看新客户列表"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"无查看微信权限不可查看客户号码"
,
priority
=
78
)
@Test
(
description
=
"无查看微信权限不可查看客户号码"
,
priority
=
80
)
public
void
无查看微信权限不可查看客户号码
(){
public
void
无查看微信权限不可查看客户号码
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
...
@@ -923,7 +947,7 @@ public class Work implements Authorization {
...
@@ -923,7 +947,7 @@ public class Work implements Authorization {
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_phone
,
"无查看微信权限可查看客户号码"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_phone
,
"无查看微信权限可查看客户号码"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"无回收客户认领权限不可查看回收客户列表"
,
priority
=
79
)
@Test
(
description
=
"无回收客户认领权限不可查看回收客户列表"
,
priority
=
81
)
public
void
无回收客户认领权限不可查看回收客户列表
(){
public
void
无回收客户认领权限不可查看回收客户列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -933,7 +957,7 @@ public class Work implements Authorization {
...
@@ -933,7 +957,7 @@ public class Work implements Authorization {
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_logout
,
"无回收客户认领权限可查看回收客户列表"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
BasicConfig
.
WORK_logout
,
"无回收客户认领权限可查看回收客户列表"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"开启总监的新客户认领权限和回收客户认领权限"
,
priority
=
8
0
)
@Test
(
description
=
"开启总监的新客户认领权限和回收客户认领权限"
,
priority
=
8
2
)
public
void
开启总监的新客户认领权限和回收客户认领权限
(){
public
void
开启总监的新客户认领权限和回收客户认领权限
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
LEADER_ID
);
params
.
put
(
"id"
,
LEADER_ID
);
...
@@ -948,7 +972,7 @@ public class Work implements Authorization {
...
@@ -948,7 +972,7 @@ public class Work implements Authorization {
}
}
@Test
(
description
=
"新建日程"
,
priority
=
8
1
)
@Test
(
description
=
"新建日程"
,
priority
=
8
3
)
public
void
新建日程
(){
public
void
新建日程
(){
//获取日程提醒数量
//获取日程提醒数量
Response
listRes
=
network
.
getResponse
(
BasicConfig
.
WORK_notifyList
);
Response
listRes
=
network
.
getResponse
(
BasicConfig
.
WORK_notifyList
);
...
@@ -969,7 +993,7 @@ public class Work implements Authorization {
...
@@ -969,7 +993,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
size
<
size2
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"日程通知未展示新建日程"
,
listRes
.
body
().
asString
()));
Assert
.
assertTrue
(
size
<
size2
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"日程通知未展示新建日程"
,
listRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"取消日程"
,
priority
=
8
2
)
@Test
(
description
=
"取消日程"
,
priority
=
8
4
)
public
void
取消日程
(){
public
void
取消日程
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
...
@@ -978,7 +1002,7 @@ public class Work implements Authorization {
...
@@ -978,7 +1002,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
WORK_cancelSchedule
,
"取消日程失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
WORK_cancelSchedule
,
"取消日程失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"普通销售不可查看审批管理"
,
priority
=
8
3
)
@Test
(
description
=
"普通销售不可查看审批管理"
,
priority
=
8
5
)
public
void
普通销售不可查看审批管理
(){
public
void
普通销售不可查看审批管理
(){
otosellerAuth
();
otosellerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -989,7 +1013,7 @@ public class Work implements Authorization {
...
@@ -989,7 +1013,7 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
BasicConfig
.
WORK_interviewAuditList
,
"查看审批列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
BasicConfig
.
WORK_interviewAuditList
,
"查看审批列表不为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取任务管理列表"
,
priority
=
8
4
)
@Test
(
description
=
"获取任务管理列表"
,
priority
=
8
6
)
public
void
获取任务管理列表
(){
public
void
获取任务管理列表
(){
otoManagerAuth
();
otoManagerAuth
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_taskConfList
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_taskConfList
);
...
@@ -997,7 +1021,7 @@ public class Work implements Authorization {
...
@@ -997,7 +1021,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
size
==
4
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"获取任务配置数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
==
4
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"获取任务配置数量错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改任务配置"
,
priority
=
8
5
)
@Test
(
description
=
"修改任务配置"
,
priority
=
8
7
)
public
void
修改任务配置
(){
public
void
修改任务配置
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
String
list
[]
=
{
"01"
,
"02"
,
"03"
,
"04"
};
String
list
[]
=
{
"01"
,
"02"
,
"03"
,
"04"
};
...
@@ -1030,7 +1054,7 @@ public class Work implements Authorization {
...
@@ -1030,7 +1054,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
acqData
,
network
.
message
(
params
,
BasicConfig
.
WORK_modifyTaskConf
,
"修改任务失败"
,
acqRes
.
body
().
asString
()));
Assert
.
assertTrue
(
acqData
,
network
.
message
(
params
,
BasicConfig
.
WORK_modifyTaskConf
,
"修改任务失败"
,
acqRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"客户总览_销售查看任务"
,
priority
=
8
6
)
@Test
(
description
=
"客户总览_销售查看任务"
,
priority
=
8
8
)
public
void
销售查看任务
(){
public
void
销售查看任务
(){
otosellerAuth
();
otosellerAuth
();
sleep
(
2000
);
sleep
(
2000
);
...
@@ -1040,7 +1064,7 @@ public class Work implements Authorization {
...
@@ -1040,7 +1064,7 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
finishCustNum
,
0
,
network
.
message
(
BasicConfig
.
WORK_statisticHeader
,
"销售任务统计错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
finishCustNum
,
0
,
network
.
message
(
BasicConfig
.
WORK_statisticHeader
,
"销售任务统计错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看联系新客户任务明细"
,
priority
=
8
7
)
@Test
(
description
=
"查看联系新客户任务明细"
,
priority
=
8
9
)
public
void
查看联系新客户任务明细
(){
public
void
查看联系新客户任务明细
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"taskConfId"
,
4
);
//任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
params
.
put
(
"taskConfId"
,
4
);
//任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
...
@@ -1053,7 +1077,7 @@ public class Work implements Authorization {
...
@@ -1053,7 +1077,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
listSize
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"待完成客户数统计错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
listSize
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"待完成客户数统计错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的预约订单列表"
,
priority
=
88
)
@Test
(
description
=
"查看我的预约订单列表"
,
priority
=
90
)
public
void
查看我的预约订单列表
(){
public
void
查看我的预约订单列表
(){
agent2Tku
();
agent2Tku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -1067,7 +1091,7 @@ public class Work implements Authorization {
...
@@ -1067,7 +1091,7 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"新增见面场景"
,
priority
=
89
)
@Test
(
description
=
"新增见面场景"
,
priority
=
91
)
public
void
新增见面场景
(){
public
void
新增见面场景
(){
otoManagerAuth
();
otoManagerAuth
();
int
companyIds
[]
=
{
1
,
5
};
int
companyIds
[]
=
{
1
,
5
};
...
@@ -1084,7 +1108,7 @@ public class Work implements Authorization {
...
@@ -1084,7 +1108,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"新增见面场景失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"新增见面场景失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看见面场景列表"
,
priority
=
9
0
)
@Test
(
description
=
"查看见面场景列表"
,
priority
=
9
2
)
public
void
查看见面场景列表
(){
public
void
查看见面场景列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -1100,7 +1124,7 @@ public class Work implements Authorization {
...
@@ -1100,7 +1124,7 @@ public class Work implements Authorization {
sceneId
=
response
.
jsonPath
().
getLong
(
"data.list[0].id"
);
sceneId
=
response
.
jsonPath
().
getLong
(
"data.list[0].id"
);
}
}
@Test
(
description
=
"修改见面场景"
,
priority
=
9
1
)
@Test
(
description
=
"修改见面场景"
,
priority
=
9
3
)
public
void
修改见面场景
(){
public
void
修改见面场景
(){
int
companyIds
[]
={
5
};
int
companyIds
[]
={
5
};
int
custFlows
[]
=
{
1
,
2
,
3
,
4
,
5
};
int
custFlows
[]
=
{
1
,
2
,
3
,
4
,
5
};
...
@@ -1117,7 +1141,7 @@ public class Work implements Authorization {
...
@@ -1117,7 +1141,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"修改自动化场景失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"修改自动化场景失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"关闭见面场景状态"
,
priority
=
9
2
)
@Test
(
description
=
"关闭见面场景状态"
,
priority
=
9
4
)
public
void
关闭见面场景状态
(){
public
void
关闭见面场景状态
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
sceneId
);
params
.
put
(
"id"
,
sceneId
);
...
@@ -1127,7 +1151,51 @@ public class Work implements Authorization {
...
@@ -1127,7 +1151,51 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_updateStatus
,
"关闭见面场景失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_updateStatus
,
"关闭见面场景失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改客户的产品组"
,
priority
=
93
)
@Test
(
description
=
"放弃客户后重新激活进入预备池"
,
priority
=
95
)
public
void
放弃客户后重新激活进入预备池
(){
//放弃客户_没钱
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"abandonReasonType"
,
2
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_abandonCust
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_abandonCust
,
"放弃客户失败"
,
response
.
body
().
asString
()));
//重新填写表单
params
.
clear
();
params
.
put
(
"formId"
,
"Kj22MTAzOQ"
);
params
.
put
(
"phoneNum"
,
phone
);
params
.
put
(
"urlLink"
,
"https://kjj-static.duibatest.com.cn/cpic-home/2022030105?formId=Kj22MTAzOQ&channel=tx&agent=xm"
);
params
.
put
(
"username"
,
"自动化激活用户"
);
params
.
put
(
"uuid"
,
"622d83e4-ca21-4ccd-94cb-182c0f2a6b60"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
FORM_submit
);
//查看客户被重新激活并姓名和产品组更新
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"phoneNum"
,
phone
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"未查找到该客户"
,
response
.
body
().
asString
()));
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
Assert
.
assertEquals
(
custName
,
"自动化激活用户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名与填单时错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
companySize
,
4
,
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
();
sleep
(
3000
);
params
.
clear
();
params
.
put
(
"customerId"
,
custId
);
params
.
put
(
"sellerId"
,
SELLER_ID
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
);
}
@Test
(
description
=
"修改客户的产品组"
,
priority
=
96
)
public
void
修改客户产品组
(){
public
void
修改客户产品组
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
...
@@ -1137,7 +1205,7 @@ public class Work implements Authorization {
...
@@ -1137,7 +1205,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_customer_update
,
"修改客户的产品组失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_customer_update
,
"修改客户的产品组失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询所有产品列表"
,
priority
=
9
4
)
@Test
(
description
=
"查询所有产品列表"
,
priority
=
9
7
)
public
void
查询所有产品列表
(){
public
void
查询所有产品列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_product_listAll
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_product_listAll
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
...
@@ -1145,6 +1213,8 @@ public class Work implements Authorization {
...
@@ -1145,6 +1213,8 @@ public class Work implements Authorization {
}
}
//修改客户的约面情况
//修改客户的约面情况
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
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