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
dc2e0ddf
Commit
dc2e0ddf
authored
Feb 03, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/seller_plan' into 'master'
增加半天计划优化的测试用例 See merge request
!65
parents
b862a0fc
7c0122a0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
92 additions
and
49 deletions
+92
-49
Plan.java
src/test/java/com/oto/bean/Plan.java
+3
-1
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+2
-2
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+84
-46
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+3
-0
No files found.
src/test/java/com/oto/bean/Plan.java
View file @
dc2e0ddf
...
@@ -6,13 +6,15 @@ import lombok.Data;
...
@@ -6,13 +6,15 @@ import lombok.Data;
public
class
Plan
{
public
class
Plan
{
public
String
planActionType
;
public
String
planActionType
;
public
String
actionTime
;
public
String
actionTime
;
public
String
timeRegion
;
public
int
actionSeller
;
public
int
actionSeller
;
public
Integer
interviewSceneConfId
;
public
Integer
interviewSceneConfId
;
public
Plan
(
String
planActionType
,
String
actionTime
,
int
actionSeller
,
Integer
interviewSceneConfId
)
{
public
Plan
(
String
planActionType
,
String
actionTime
,
String
timeRegion
,
int
actionSeller
,
Integer
interviewSceneConfId
)
{
this
.
planActionType
=
planActionType
;
this
.
planActionType
=
planActionType
;
this
.
actionTime
=
actionTime
;
this
.
actionTime
=
actionTime
;
this
.
actionSeller
=
actionSeller
;
this
.
actionSeller
=
actionSeller
;
this
.
interviewSceneConfId
=
interviewSceneConfId
;
this
.
interviewSceneConfId
=
interviewSceneConfId
;
this
.
timeRegion
=
timeRegion
;
}
}
}
}
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
dc2e0ddf
...
@@ -689,11 +689,11 @@ public class Phone implements Authorization {
...
@@ -689,11 +689,11 @@ public class Phone implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"ids"
,
planIds
);
params
.
put
(
"ids"
,
planIds
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanDetail
);
int
phoneStatus
=
response
.
jsonPath
().
getInt
(
"data.
meets
[0].planStatus"
);
int
phoneStatus
=
response
.
jsonPath
().
getInt
(
"data.
am
[0].planStatus"
);
Assert
.
assertEquals
(
phoneStatus
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"见面计划状态非已完成"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
phoneStatus
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"见面计划状态非已完成"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
clear
();
getSellerPlan
(
1
,
1
,
1
,
1
,
2
,
0
);
getSellerPlan
(
2
,
2
,
0
,
1
,
1
,
0
);
}
}
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
dc2e0ddf
...
@@ -1774,8 +1774,8 @@ public class Work implements Authorization {
...
@@ -1774,8 +1774,8 @@ public class Work implements Authorization {
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
calendar
.
add
(
calendar
.
DATE
,
2
);
calendar
.
add
(
calendar
.
DATE
,
2
);
ArrayList
<
Plan
>
plans
=
new
ArrayList
<>();
ArrayList
<
Plan
>
plans
=
new
ArrayList
<>();
plans
.
add
(
new
Plan
(
"phone"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
6
,
null
));
plans
.
add
(
new
Plan
(
"phone"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
"pm"
,
6
,
null
));
//创建后日计划
plans
.
add
(
new
Plan
(
"meet"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
6
,
(
int
)
sceneId
));
plans
.
add
(
new
Plan
(
"meet"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
"am"
,
6
,
(
int
)
sceneId
));
params
.
put
(
"plans"
,
plans
);
params
.
put
(
"plans"
,
plans
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveCheckRecord
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveCheckRecord
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -1786,8 +1786,8 @@ public class Work implements Authorization {
...
@@ -1786,8 +1786,8 @@ public class Work implements Authorization {
params
.
put
(
"checkConclusion"
,
"客户盘点后的结论2"
);
params
.
put
(
"checkConclusion"
,
"客户盘点后的结论2"
);
params
.
put
(
"strategyId"
,
strategyId
);
params
.
put
(
"strategyId"
,
strategyId
);
calendar
.
add
(
calendar
.
DATE
,-
1
);
calendar
.
add
(
calendar
.
DATE
,-
1
);
plans
.
add
(
new
Plan
(
"phone"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
6
,
null
));
plans
.
add
(
new
Plan
(
"phone"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
"pm"
,
6
,
null
));
//创建明日计划
plans
.
add
(
new
Plan
(
"meet"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
6
,
(
int
)
sceneId
));
plans
.
add
(
new
Plan
(
"meet"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()),
"am"
,
6
,
(
int
)
sceneId
));
params
.
put
(
"plans"
,
plans
);
params
.
put
(
"plans"
,
plans
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveCheckRecord
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveCheckRecord
);
...
@@ -1836,28 +1836,48 @@ public class Work implements Authorization {
...
@@ -1836,28 +1836,48 @@ public class Work implements Authorization {
}
}
@Test
(
description
=
"销售
查看个人工作
计划"
,
priority
=
139
)
@Test
(
description
=
"销售
添加自建
计划"
,
priority
=
139
)
public
void
销售
查看个人工作
计划
(){
public
void
销售
添加自建
计划
(){
otoTakerAuth
();
otoTakerAuth
();
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
new
Date
());
calendar
.
setTime
(
new
Date
());
calendar
.
add
(
calendar
.
DATE
,
1
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"actionTime"
,
simpleDateFormat
.
format
(
calendar
.
getTime
()));
//创建明日计划
params
.
put
(
"planActionType"
,
"phone"
);
params
.
put
(
"timeRegion"
,
"am"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveSelfPlan
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_saveSelfPlan
,
"创建自建计划失败"
,
response
.
body
().
asString
()));
calendar
.
add
(
calendar
.
DATE
,-
1
);
tomorrowWeek
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
)
;
//计算明日处于周几
tomorrowWeek
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
)
;
//计算明日处于周几
calendar
.
add
(
Calendar
.
DATE
,
-
tomorrowWeek
+
2
);
calendar
.
add
(
Calendar
.
DATE
,
-
tomorrowWeek
+
2
);
beginTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
beginTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
tomorrowWeek
=
tomorrowWeek
-
1
;
tomorrowWeek
=
tomorrowWeek
-
1
;
getSellerPlan
(
0
,
1
,
0
,
1
,
1
,
0
);
}
}
@Test
(
description
=
"总监查看团队工作计划"
,
priority
=
140
)
@Test
(
description
=
"销售查看个人工作计划"
,
priority
=
140
)
public
void
销售查看个人工作计划
(){
sleep
(
1000
);
getSellerPlan
(
0
,
2
,
0
,
1
,
1
,
0
);
}
@Test
(
description
=
"总监查看团队工作计划"
,
priority
=
141
)
public
void
总监查看团队工作计划
(){
public
void
总监查看团队工作计划
(){
otoLeaderAuth
();
otoLeaderAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"beginTime"
,
beginTime
);
params
.
put
(
"beginTime"
,
beginTime
);
Response
response
=
network
.
ge
tResponse
(
params
,
BasicConfig
.
WORK_getDirectorPlanCalendarList
);
Response
response
=
network
.
pos
tResponse
(
params
,
BasicConfig
.
WORK_getDirectorPlanCalendarList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
flag
=
0
;
int
flag
=
0
;
for
(
int
i
=
0
;
i
<
size
;
i
++){
for
(
int
i
=
0
;
i
<
size
;
i
++){
...
@@ -1865,8 +1885,8 @@ public class Work implements Authorization {
...
@@ -1865,8 +1885,8 @@ public class Work implements Authorization {
flag
=
1
;
flag
=
1
;
int
plans
=
response
.
jsonPath
().
getInt
(
"data["
+
i
+
"].vos["
+
tomorrowWeek
+
"].ids.size()"
);
int
plans
=
response
.
jsonPath
().
getInt
(
"data["
+
i
+
"].vos["
+
tomorrowWeek
+
"].ids.size()"
);
int
hasAllCheck
=
response
.
jsonPath
().
getInt
(
"data["
+
i
+
"].vos["
+
tomorrowWeek
+
"].hasAllCheck"
);
int
hasAllCheck
=
response
.
jsonPath
().
getInt
(
"data["
+
i
+
"].vos["
+
tomorrowWeek
+
"].hasAllCheck"
);
Assert
.
assertEquals
(
plans
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getDirectorPlanCalendarList
,
"销售当天的计划数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
plans
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_getDirectorPlanCalendarList
,
"销售当天的计划数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
hasAllCheck
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getDirectorPlanCalendarList
,
"销售当天的盘点标记非[已盘完】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
hasAllCheck
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_getDirectorPlanCalendarList
,
"销售当天的盘点标记非[已盘完】"
,
response
.
body
().
asString
()));
}
}
}
}
if
(
flag
==
0
){
if
(
flag
==
0
){
...
@@ -1874,26 +1894,26 @@ public class Work implements Authorization {
...
@@ -1874,26 +1894,26 @@ public class Work implements Authorization {
}
}
}
}
@Test
(
description
=
"查看计划详情"
,
priority
=
14
1
)
@Test
(
description
=
"查看计划详情"
,
priority
=
14
2
)
public
void
查看计划详情
(){
public
void
查看计划详情
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"ids"
,
planIds
);
params
.
put
(
"ids"
,
planIds
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanDetail
);
int
meetSize
=
response
.
jsonPath
().
getInt
(
"data.meets
.size()"
);
int
amSize
=
response
.
jsonPath
().
getInt
(
"data.am
.size()"
);
int
p
honeSize
=
response
.
jsonPath
().
getInt
(
"data.phones
.size()"
);
int
p
mSize
=
response
.
jsonPath
().
getInt
(
"data.pm
.size()"
);
int
meetStatus
=
response
.
jsonPath
().
getInt
(
"data.
meets
[0].planStatus"
);
int
meetStatus
=
response
.
jsonPath
().
getInt
(
"data.
am
[0].planStatus"
);
int
phoneStatus
=
response
.
jsonPath
().
getInt
(
"data.p
hones
[0].planStatus"
);
int
phoneStatus
=
response
.
jsonPath
().
getInt
(
"data.p
m
[0].planStatus"
);
int
hasCheck_1
=
response
.
jsonPath
().
getInt
(
"data.
meets
[0].hasCheck"
);
int
hasCheck_1
=
response
.
jsonPath
().
getInt
(
"data.
am
[0].hasCheck"
);
int
hasCheck_2
=
response
.
jsonPath
().
getInt
(
"data.p
hones
[0].hasCheck"
);
int
hasCheck_2
=
response
.
jsonPath
().
getInt
(
"data.p
m
[0].hasCheck"
);
Assert
.
assertEquals
(
meetSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"见面
列表总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
amSize
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"上午
列表总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
p
honeSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"电话
列表总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
p
mSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"下午
列表总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
meetStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"
见面
计划状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
meetStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"
上午完成
计划状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
phoneStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"
电话
计划状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
phoneStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"
下午完成
计划状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
hasCheck_1
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"见面计划盘点状态错误非【已盘】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
hasCheck_1
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"见面计划盘点状态错误非【已盘】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
hasCheck_2
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"电话计划盘点状态错误非【已盘】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
hasCheck_2
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"电话计划盘点状态错误非【已盘】"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"主动拨通客户电话计划完成"
,
priority
=
14
2
)
@Test
(
description
=
"主动拨通客户电话计划完成"
,
priority
=
14
3
)
public
void
主动拨通客户电话计划完成
(){
public
void
主动拨通客户电话计划完成
(){
callling
(
"17823123001"
,
"15136361301"
,
10
,
"dealing"
);
callling
(
"17823123001"
,
"15136361301"
,
10
,
"dealing"
);
...
@@ -1902,14 +1922,14 @@ public class Work implements Authorization {
...
@@ -1902,14 +1922,14 @@ public class Work implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"ids"
,
planIds
);
params
.
put
(
"ids"
,
planIds
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanDetail
);
int
phoneStatus
=
response
.
jsonPath
().
getInt
(
"data.
phones[0
].planStatus"
);
int
phoneStatus
=
response
.
jsonPath
().
getInt
(
"data.
am[1
].planStatus"
);
Assert
.
assertEquals
(
phoneStatus
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"电话计划状态非已完成"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
phoneStatus
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"电话计划状态非已完成"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
clear
();
getSellerPlan
(
0
,
1
,
1
,
1
,
1
,
0
);
getSellerPlan
(
1
,
2
,
0
,
1
,
1
,
0
);
}
}
@Test
(
description
=
"查看历史计划"
,
priority
=
14
3
)
@Test
(
description
=
"查看历史计划"
,
priority
=
14
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
);
...
@@ -1917,14 +1937,14 @@ public class Work implements Authorization {
...
@@ -1917,14 +1937,14 @@ public class Work implements Authorization {
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
String
planStatusDesc1
=
response
.
jsonPath
().
getString
(
"data.list[
0
].planStatusDesc"
);
String
planStatusDesc1
=
response
.
jsonPath
().
getString
(
"data.list[
2
].planStatusDesc"
);
String
planStatusDes
2
=
response
.
jsonPath
().
getString
(
"data.list[1
].planStatusDesc"
);
String
planStatusDes
c2
=
response
.
jsonPath
().
getString
(
"data.list[0
].planStatusDesc"
);
Assert
.
assertEquals
(
planStatusDesc1
,
"进行中"
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanList
,
"已完成计划数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
planStatusDesc1
,
"进行中"
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanList
,
"已完成计划数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
planStatusDes2
,
"已完成"
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanList
,
"已完成计划数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
planStatusDes
c
2
,
"已完成"
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanList
,
"已完成计划数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanList
,
"总计划数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanList
,
"总计划数量错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取场景类型"
,
priority
=
14
4
)
@Test
(
description
=
"获取场景类型"
,
priority
=
14
5
)
public
void
获取场景类型
(){
public
void
获取场景类型
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"sceneType"
,
"1,2"
);
params
.
put
(
"sceneType"
,
"1,2"
);
...
@@ -1933,7 +1953,7 @@ public class Work implements Authorization {
...
@@ -1933,7 +1953,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_getSceneTypes
,
"场景结果为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_getSceneTypes
,
"场景结果为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"公域引流_删除标签"
,
priority
=
14
5
)
@Test
(
description
=
"公域引流_删除标签"
,
priority
=
14
6
)
public
void
公域引流
_
删除标签
(){
public
void
公域引流
_
删除标签
(){
otoInviterAuth
();
otoInviterAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -1950,7 +1970,7 @@ public class Work implements Authorization {
...
@@ -1950,7 +1970,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
id
!=
tagId
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_tagList
,
"标签删除后依旧显示"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
id
!=
tagId
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_tagList
,
"标签删除后依旧显示"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"上传KYC"
,
priority
=
14
6
)
@Test
(
description
=
"上传KYC"
,
priority
=
14
7
)
public
void
上传
KYC
(){
public
void
上传
KYC
(){
otoManagerAuth
();
otoManagerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -1961,7 +1981,7 @@ public class Work implements Authorization {
...
@@ -1961,7 +1981,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_kycUpload
,
"上传KYC失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_kycUpload
,
"上传KYC失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"上传客户方案"
,
priority
=
14
7
)
@Test
(
description
=
"上传客户方案"
,
priority
=
14
8
)
public
void
上传客户方案
(){
public
void
上传客户方案
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
...
@@ -1980,7 +2000,7 @@ public class Work implements Authorization {
...
@@ -1980,7 +2000,7 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
planFiles
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"上传客户方案为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
planFiles
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"上传客户方案为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"移动策略"
,
priority
=
14
8
)
@Test
(
description
=
"移动策略"
,
priority
=
14
9
)
public
void
移动策略
(){
public
void
移动策略
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
strategyId
);
params
.
put
(
"id"
,
strategyId
);
...
@@ -2001,6 +2021,24 @@ public class Work implements Authorization {
...
@@ -2001,6 +2021,24 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"上传KYC失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"上传KYC失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看销售的在库客户"
,
priority
=
160
)
public
void
查看销售的在库客户
(){
otoTakerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化激活用户"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_obtainCustBySellerId
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_obtainCustBySellerId
,
"查看销售在在库客户为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"特定销售可见团队"
,
priority
=
161
)
public
void
特定销售可见团队
(){
otoManagerAuth
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_apolloSeller
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
BasicConfig
.
WORK_apolloSeller
,
"查看销售在在库客户为空"
,
response
.
body
().
asString
()));
}
//修改客户的约面情况
//修改客户的约面情况
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
...
@@ -2162,21 +2200,21 @@ public class Work implements Authorization {
...
@@ -2162,21 +2200,21 @@ public class Work implements Authorization {
Response
response
=
network
.
getResponse
(
CALL_URL
);
Response
response
=
network
.
getResponse
(
CALL_URL
);
}
}
//获取
电话回填客户约面信息
//获取
销售个人工作计划
public
static
void
getSellerPlan
(
int
meetFinish
,
int
meetTotal
,
int
phoneFinish
,
int
phone
Total
,
int
pStatus
,
int
unFinishTypes
){
public
static
void
getSellerPlan
(
int
amFinish
,
int
amTotal
,
int
pmFinish
,
int
pm
Total
,
int
pStatus
,
int
unFinishTypes
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"beginTime"
,
beginTime
);
params
.
put
(
"beginTime"
,
beginTime
);
Response
response
=
network
.
ge
tResponse
(
params
,
BasicConfig
.
WORK_getSellerPlanCalendarList
);
Response
response
=
network
.
pos
tResponse
(
params
,
BasicConfig
.
WORK_getSellerPlanCalendarList
);
int
meetFinishNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].meet
FinishNum"
);
int
amFinishNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].am
FinishNum"
);
int
meetTotalNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].meet
TotalNum"
);
int
amTotalNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].am
TotalNum"
);
int
p
honeFinishNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].phone
FinishNum"
);
int
p
mFinishNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].pm
FinishNum"
);
int
p
honeTotalNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].phone
TotalNum"
);
int
p
mTotalNum
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].pm
TotalNum"
);
int
planStatus
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].planStatus"
);
int
planStatus
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].planStatus"
);
int
unFinishPlanActionTypes
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].unFinishPlanActionTypes.size()"
);
int
unFinishPlanActionTypes
=
response
.
jsonPath
().
getInt
(
"data["
+
tomorrowWeek
+
"].unFinishPlanActionTypes.size()"
);
Assert
.
assertEquals
(
meetFinishNum
,
meetFinish
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"见面
完成数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
amFinishNum
,
amFinish
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"上午
完成数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
meetTotalNum
,
meetTotal
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"见面
总数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
amTotalNum
,
amTotal
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"上午
总数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
p
honeFinishNum
,
phoneFinish
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"电话
完成数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
p
mFinishNum
,
pmFinish
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"下午
完成数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
p
honeTotalNum
,
phoneTotal
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"电话
总数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
p
mTotalNum
,
pmTotal
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"下午
总数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
planStatus
,
pStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"今日总计划状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
planStatus
,
pStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"今日总计划状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
unFinishPlanActionTypes
,
unFinishTypes
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"今日计划未完成动作类型数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
unFinishPlanActionTypes
,
unFinishTypes
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateFollowUp
,
"今日计划未完成动作类型数量错误"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/oto/config/BasicConfig.java
View file @
dc2e0ddf
...
@@ -241,6 +241,9 @@ public class BasicConfig {
...
@@ -241,6 +241,9 @@ public class BasicConfig {
public
static
final
String
WORK_planFileUpload
=
WORK_HOST
+
"/kjy/oto/manager/customer/planFile/update"
;
public
static
final
String
WORK_planFileUpload
=
WORK_HOST
+
"/kjy/oto/manager/customer/planFile/update"
;
public
static
final
String
WORK_kycUpload
=
WORK_HOST
+
"/kjy/oto/manager/customer/kyc/update"
;
public
static
final
String
WORK_kycUpload
=
WORK_HOST
+
"/kjy/oto/manager/customer/kyc/update"
;
public
static
final
String
WORK_strategyMove
=
WORK_HOST
+
"/kjy/oto/check/strategy/sort/move"
;
public
static
final
String
WORK_strategyMove
=
WORK_HOST
+
"/kjy/oto/check/strategy/sort/move"
;
public
static
final
String
WORK_obtainCustBySellerId
=
WORK_HOST
+
"/kjy/oto/manager/customer/obtainCustBySellerId"
;
public
static
final
String
WORK_saveSelfPlan
=
WORK_HOST
+
"/kjy/oto/manager/customer/planList/save"
;
public
static
final
String
WORK_apolloSeller
=
WORK_HOST
+
"/kjy/oto/manager/customer/apollo/seller"
;
//*************************客集集营销平台******************************
//*************************客集集营销平台******************************
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
...
...
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