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
cecfd0ce
Commit
cecfd0ce
authored
Nov 10, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加邀约任务的接口用例
parent
fc104167
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+8
-11
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+10
-5
No files found.
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
cecfd0ce
...
@@ -288,6 +288,7 @@ public class Phone implements Authorization {
...
@@ -288,6 +288,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看我的面访状态更新为审批中"
,
priority
=
23
)
@Test
(
description
=
"查看我的面访状态更新为审批中"
,
priority
=
23
)
public
void
查看我的面访状态更新为审批中
(){
public
void
查看我的面访状态更新为审批中
(){
sleep
(
1000
);
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"
);
...
@@ -304,11 +305,9 @@ public class Phone implements Authorization {
...
@@ -304,11 +305,9 @@ public class Phone implements Authorization {
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_invire
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_invire
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_invire
,
"上传面访记录>=1"
,
response
.
body
().
asString
()));
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_invire
,
"上传面访记录>=1"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail_v2
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail_v2
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.otoCustInfo4Manage.commitPlanFlag"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.otoCustInfo4Manage.commitPlanFlag"
);
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail_v2
,
"是否提交计划书非否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail_v2
,
"是否提交计划书非否"
,
response
.
body
().
asString
()));
//查看约面日历
//查看约面日历
otoManagerAuth
();
otoManagerAuth
();
...
@@ -358,7 +357,7 @@ public class Phone implements Authorization {
...
@@ -358,7 +357,7 @@ public class Phone implements Authorization {
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail_v2
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail_v2
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.otoCustInfo4Manage.commitPlanFlag"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.otoCustInfo4Manage.commitPlanFlag"
);
Assert
.
assertEquals
(
commitPlanFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail_v2
,
"是否提交计划书
非
否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail_v2
,
"是否提交计划书
为
否"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的面访状态更新为已失效"
,
priority
=
26
)
@Test
(
description
=
"查看我的面访状态更新为已失效"
,
priority
=
26
)
...
@@ -426,9 +425,7 @@ public class Phone implements Authorization {
...
@@ -426,9 +425,7 @@ public class Phone implements Authorization {
params
.
put
(
"followWeight"
,
2
);
params
.
put
(
"followWeight"
,
2
);
params
.
put
(
"expertId"
,
IdMakeUtil
.
encodingId
(
43L
));
params
.
put
(
"expertId"
,
IdMakeUtil
.
encodingId
(
43L
));
params
.
put
(
"giveProspectusFlag"
,
1
);
params
.
put
(
"giveProspectusFlag"
,
1
);
params
.
put
(
"commitPlanFlag"
,
1
);
params
.
put
(
"commitPlanFlag"
,
0
);
params
.
put
(
"prospectusAmount"
,
"计划书金额15W"
);
params
.
put
(
"prospectusDesc"
,
"计划书确认情况客户表示认同"
);
params
.
put
(
"isNormal"
,
false
);
params
.
put
(
"isNormal"
,
false
);
params
.
put
(
"unusualTypes"
,
unusualTypes
);
params
.
put
(
"unusualTypes"
,
unusualTypes
);
params
.
put
(
"unusualExplain"
,
"手机号不一致的情况说明"
);
params
.
put
(
"unusualExplain"
,
"手机号不一致的情况说明"
);
...
@@ -462,7 +459,7 @@ public class Phone implements Authorization {
...
@@ -462,7 +459,7 @@ public class Phone implements Authorization {
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail_v2
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail_v2
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.otoCustInfo4Manage.commitPlanFlag"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.otoCustInfo4Manage.commitPlanFlag"
);
Assert
.
assertEquals
(
commitPlanFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail_v2
,
"是否提交计划书非是"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail_v2
,
"是否提交计划书非是"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询专家列表"
,
priority
=
32
)
@Test
(
description
=
"查询专家列表"
,
priority
=
32
)
...
@@ -509,7 +506,7 @@ public class Phone implements Authorization {
...
@@ -509,7 +506,7 @@ public class Phone implements Authorization {
int
giveProspectusFlag
=
response
.
jsonPath
().
getInt
(
"data.giveProspectusFlag"
);
int
giveProspectusFlag
=
response
.
jsonPath
().
getInt
(
"data.giveProspectusFlag"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.expertName"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.expertName"
);
Assert
.
assertEquals
(
giveProspectusFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否可送计划书不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
giveProspectusFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否可送计划书不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试专家"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试专家"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
}
}
...
@@ -640,7 +637,7 @@ public class Phone implements Authorization {
...
@@ -640,7 +637,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看面访详情"
,
priority
=
53
)
@Test
(
description
=
"查看面访详情"
,
priority
=
53
)
public
void
查看面访详情
(){
public
void
查看面访详情
(){
interviewdetail
(
interviewIds
.
get
(
0
),
3
,
2
,
"手机号不一致且非面对面扫码的情况说明"
,
1
,
1
,
"勿动-自动化测试专家"
);
interviewdetail
(
interviewIds
.
get
(
0
),
3
,
2
,
"手机号不一致且非面对面扫码的情况说明"
,
1
,
1
,
"勿动-自动化测试专家"
);
interviewdetail
(
interviewIds
.
get
(
1
),
2
,
1
,
"手机号不一致的情况说明"
,
1
,
1
,
"勿动-自动化测试总监"
);
interviewdetail
(
interviewIds
.
get
(
1
),
2
,
1
,
"手机号不一致的情况说明"
,
1
,
0
,
"勿动-自动化测试总监"
);
interviewdetail
(
interviewIds
.
get
(
2
),
1
,
0
,
""
,
0
,
0
,
null
);
interviewdetail
(
interviewIds
.
get
(
2
),
1
,
0
,
""
,
0
,
0
,
null
);
}
}
...
@@ -661,7 +658,7 @@ public class Phone implements Authorization {
...
@@ -661,7 +658,7 @@ public class Phone implements Authorization {
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_historyRecord
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_historyRecord
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_historyRecord
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_historyRecord
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"专家能查看关联自己的面访"
,
priority
=
57
)
@Test
(
description
=
"专家能查看关联自己的面访"
,
priority
=
57
)
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
cecfd0ce
...
@@ -263,7 +263,7 @@ public class Work implements Authorization {
...
@@ -263,7 +263,7 @@ public class Work implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_showFeedback
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_showFeedback
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data
.hasUndoneFeedback
"
);
Assert
.
assertFalse
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_showFeedback
,
"电话表单回填状态错误:为需要回填"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_showFeedback
,
"电话表单回填状态错误:为需要回填"
,
response
.
body
().
asString
()));
}
}
...
@@ -1308,6 +1308,7 @@ public class Work implements Authorization {
...
@@ -1308,6 +1308,7 @@ public class Work implements Authorization {
@Test
(
description
=
"查看盘点客户列表"
,
priority
=
96
)
@Test
(
description
=
"查看盘点客户列表"
,
priority
=
96
)
public
void
查看盘点客户列表
(){
public
void
查看盘点客户列表
(){
sleep
(
1000
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化"
);
params
.
put
(
"custName"
,
"自动化"
);
params
.
put
(
"todayCheck"
,
1
);
params
.
put
(
"todayCheck"
,
1
);
...
@@ -1486,6 +1487,8 @@ public class Work implements Authorization {
...
@@ -1486,6 +1487,8 @@ public class Work implements Authorization {
callling
(
"15136361301"
,
0
,
"notDeal"
);
callling
(
"15136361301"
,
0
,
"notDeal"
);
callling
(
"15136361302"
,
0
,
"notDeal"
);
callling
(
"15136361302"
,
0
,
"notDeal"
);
callling
(
"15136361303"
,
30
,
"dealing"
);
callling
(
"15136361303"
,
30
,
"dealing"
);
sleep
(
1000
);
//销售完成面访,跟进时间更新,联系新客户任务完成
//销售完成面访,跟进时间更新,联系新客户任务完成
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"taskConfId"
,
7
);
//任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
params
.
put
(
"taskConfId"
,
7
);
//任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
...
@@ -1498,20 +1501,22 @@ public class Work implements Authorization {
...
@@ -1498,20 +1501,22 @@ public class Work implements Authorization {
@Test
(
description
=
"校验通话后显示回填弹窗"
,
priority
=
106
)
@Test
(
description
=
"校验通话后显示回填弹窗"
,
priority
=
106
)
public
void
校验通话后显示回填弹窗
(){
public
void
校验通话后显示回填弹窗
(){
sleep
(
1000
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_showFeedback
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_showFeedback
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data
.hasUndoneFeedback
"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_showFeedback
,
"电话表单回填状态错误:为不需要回填"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_showFeedback
,
"电话表单回填状态错误:为不需要回填"
,
response
.
body
().
asString
()));
sleep
(
1000
);
params
.
put
(
"custId"
,
custId
+
2
);
params
.
put
(
"custId"
,
custId
+
2
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_showFeedback
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_showFeedback
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
data
=
response
.
jsonPath
().
getBoolean
(
"data
.hasUndoneFeedback
"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_showFeedback
,
"电话表单回填状态错误:为不需要回填"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_showFeedback
,
"电话表单回填状态错误:为不需要回填"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"校验邀约的通话信息"
,
priority
=
107
)
@Test
(
description
=
"校验邀约的通话
统计
信息"
,
priority
=
107
)
public
void
校验邀约的通话信息
(){
public
void
校验邀约的通话
统计
信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"type"
,
1
);
params
.
put
(
"type"
,
1
);
...
...
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