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
a2471f8b
Commit
a2471f8b
authored
Apr 17, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加测试自用文件,与自动化文件分隔
parent
62e4ea25
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
703 additions
and
394 deletions
+703
-394
SignCustomer.java
src/test/java/com/oto/bean/SignCustomer.java
+15
-0
Authorization.java
src/test/java/com/oto/cases/admin/Authorization.java
+19
-4
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+385
-0
CheckTask.java
src/test/java/com/oto/cases/otoseller/CheckTask.java
+162
-100
Depts.java
src/test/java/com/oto/cases/otoseller/Depts.java
+12
-12
FormSubmit.java
src/test/java/com/oto/cases/otoseller/FormSubmit.java
+12
-1
Invite.java
src/test/java/com/oto/cases/otoseller/Invite.java
+19
-19
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+9
-236
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+4
-4
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+19
-16
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+41
-2
workTestNG.xml
src/test/workTestNG.xml
+6
-0
No files found.
src/test/java/com/oto/bean/SignCustomer.java
0 → 100644
View file @
a2471f8b
package
com
.
oto
.
bean
;
public
class
SignCustomer
{
public
String
custId
;
public
String
timeInterval
;
public
int
configId
;
public
int
custPhase
;
public
SignCustomer
(
String
custId
,
String
timeInterval
,
int
configId
,
int
custPhase
)
{
this
.
custId
=
custId
;
this
.
timeInterval
=
timeInterval
;
this
.
configId
=
configId
;
this
.
custPhase
=
custPhase
;
}
}
src/test/java/com/oto/cases/admin/Authorization.java
View file @
a2471f8b
...
@@ -58,7 +58,12 @@ public interface Authorization {
...
@@ -58,7 +58,12 @@ public interface Authorization {
network
.
agentCookies
.
put
(
"otoToken"
,
"eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3cVdcpuYrJL6cAszqvnhjut1r1J2h5fBPPiVwGygx"
);
network
.
agentCookies
.
put
(
"otoToken"
,
"eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3cVdcpuYrJL6cAszqvnhjut1r1J2h5fBPPiVwGygx"
);
}
}
//oto销售工作台-PM
//oto销售工作台-解决方案
default
void
otoPlanAuth
()
{
network
.
agentCookies
.
put
(
"otoToken"
,
"eTd1Af5HRGuUtkXq6ZtdzRwvNaxSg2py4fAHgG5BZHUqMYASBeFsh1upbrjbRMz7t2MJWkt"
);
}
//oto销售工作台-测试用户
default
void
otoTestAuth
()
{
default
void
otoTestAuth
()
{
network
.
agentCookies
.
put
(
"otoToken"
,
"SGU5VHBG6UrQ3eDgD5fMNJrTGe62AyXGxMf4CVZAwGxg8E8D4hrGJP52sv8v36MaYoA"
);
network
.
agentCookies
.
put
(
"otoToken"
,
"SGU5VHBG6UrQ3eDgD5fMNJrTGe62AyXGxMf4CVZAwGxg8E8D4hrGJP52sv8v36MaYoA"
);
}
}
...
@@ -67,16 +72,26 @@ public interface Authorization {
...
@@ -67,16 +72,26 @@ public interface Authorization {
network
.
agentCookies
.
put
(
JJBManagerCookieKey
,
JJBManagerCookieValue
);
network
.
agentCookies
.
put
(
JJBManagerCookieKey
,
JJBManagerCookieValue
);
}
}
//oto销售工作台
手机
端-邀约
//oto销售工作台
企微
端-邀约
default
void
otoInviterTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_INVITER_TKU
);
}
default
void
otoInviterTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_INVITER_TKU
);
}
//oto销售工作台
手机
端-带看销售
//oto销售工作台
企微
端-带看销售
default
void
otoTakerTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_TAKER_TKU
);
}
default
void
otoTakerTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_TAKER_TKU
);
}
//oto销售工作台
手机
端-专家
//oto销售工作台
企微
端-专家
default
void
otoEpertTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_EXPERT_TKU
);
}
default
void
otoEpertTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_EXPERT_TKU
);
}
//oto销售工作台个微端-客户
default
void
WXCustomerTku
()
{
network
.
agentCookies
.
put
(
"ototku"
,
WX_CUSTOMER_TKU
);
}
//oto销售工作台个微端-专家
default
void
WXExpertTTku
()
{
network
.
agentCookies
.
put
(
"ototku"
,
WX_EXPERT_TKU
);
}
//oto销售工作台个微端-总监
default
void
WXLeaderTku
()
{
network
.
agentCookies
.
put
(
"ototku"
,
WX_LEADER_TKU
);
}
/**
/**
* 集客助手相关授权
* 集客助手相关授权
*/
*/
...
...
src/test/java/com/oto/cases/otoseller/Activity.java
0 → 100644
View file @
a2471f8b
package
com
.
oto
.
cases
.
otoseller
;
import
com.oto.bean.SignCustomer
;
import
com.oto.cases.admin.Authorization
;
import
com.oto.config.BasicConfig
;
import
com.oto.utils.IdMakeUtil
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeTest
;
import
org.testng.annotations.Test
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
static
com
.
oto
.
cases
.
otoseller
.
Invite
.*;
import
static
com
.
oto
.
cases
.
otoseller
.
Manager
.
cust_id
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.*;
import
static
com
.
oto
.
config
.
BasicConfig
.*;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
public
class
Activity
implements
Authorization
{
public
int
acitityId
;
public
String
activity_day
;
@BeforeTest
public
void
setUp
(){
Date
date
=
new
Date
();
SimpleDateFormat
sdt
=
new
SimpleDateFormat
(
"yyyy-MM-dd "
);
activity_day
=
sdt
.
format
(
date
);
Sunday
();
}
@Test
(
description
=
"新建营销活动"
,
priority
=
1
)
public
void
新建营销活动
(){
otoPMAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"isNeedInvite"
,
1
);
ArrayList
depts
=
new
ArrayList
();
HashMap
<
String
,
Object
>
deptItem1
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
deptItem2
=
new
HashMap
<>();
deptItem1
.
put
(
"deptId"
,
47
);
deptItem1
.
put
(
"groupNum"
,
2
);
deptItem2
.
put
(
"deptId"
,
30
);
deptItem2
.
put
(
"groupNum"
,
1
);
depts
.
add
(
deptItem1
);
depts
.
add
(
deptItem2
);
params
.
put
(
"paramList"
,
depts
);
params
.
put
(
"isNeedInvite"
,
1
);
params
.
put
(
"maTime"
,
activity_day
+
"11:30"
);
params
.
put
(
"sceneConfId"
,
17
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_saveActivity
,
"新建营销活动失败"
,
response
.
body
().
asString
()));
otoManagerAuth
();
params
.
put
(
"sceneConfId"
,
440
);
params
.
put
(
"totalCost"
,
99999999.99
);
params
.
put
(
"maTime"
,
activity_day
+
"12:00"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_saveActivity
,
"新建营销活动失败"
,
response
.
body
().
asString
()));
params
.
put
(
"isNeedInvite"
,
0
);
params
.
put
(
"maTime"
,
activity_day
+
"11:20"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
}
@Test
(
description
=
"查看营销活动"
,
priority
=
2
)
public
void
查看营销活动
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"beginTime"
,
activity_day
+
"00:00:00"
);
params
.
put
(
"endTime"
,
activity_day
+
"23:59:59"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_listActivity
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.voList.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动数量错误"
,
response
.
body
().
asString
()));
acitityId
=
response
.
jsonPath
().
getInt
(
"data[0].voList[2].id"
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].sceneName"
);
Assert
.
assertEquals
(
sceneName
,
"勿动_自动化邀约场景"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
String
timeInterval1
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].timeInterval"
);
Assert
.
assertEquals
(
timeInterval1
,
"am"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
String
timeInterval2
=
response
.
jsonPath
().
getString
(
"data[0].voList[2].timeInterval"
);
Assert
.
assertEquals
(
timeInterval2
,
"pm"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"修改营销活动"
,
priority
=
3
)
public
void
修改营销活动
(){
otoPMAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ArrayList
depts
=
new
ArrayList
();
HashMap
<
String
,
Object
>
deptItem1
=
new
HashMap
<>();
deptItem1
.
put
(
"deptId"
,
47
);
deptItem1
.
put
(
"groupNum"
,
1
);
depts
.
add
(
deptItem1
);
params
.
put
(
"paramList"
,
depts
);
params
.
put
(
"id"
,
acitityId
-
1
);
params
.
put
(
"id"
,
acitityId
);
params
.
put
(
"isNeedInvite"
,
1
);
params
.
put
(
"sceneConfId"
,
440
);
params
.
put
(
"totalCost"
,
0
);
params
.
put
(
"maTime"
,
activity_day
+
"20:00"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_modifyActivity
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_modifyActivity
,
"修改营销活动失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询营销活动详情"
,
priority
=
4
)
public
void
查询营销活动详情
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
acitityId
-
1
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detailActivity
);
int
paramList
=
response
.
jsonPath
().
getInt
(
"data.paramList.size()"
);
Assert
.
assertEquals
(
paramList
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detailActivity
,
"营销活动详情错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"删除营销活动"
,
priority
=
5
)
public
void
删除营销活动
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
acitityId
+
1
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_cancelActivity
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_cancelActivity
,
"修改营销活动部门组数错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"邀约记录为今天实时分配"
,
priority
=
6
)
public
void
邀约记录为今天实时分配
(){
otoInviterAuth
();
abandonCust
(
cust_id
-
1
);
//自动化客户0
sleep
(
2000
);
assignSeller
(
cust_id
-
1
,
INVITE_ID
,
true
,
1
,
"crm"
);
sleep
(
2000
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
-
1
);
abandonCust
(
cust_id
+
1
);
//自动化客户2
sleep
(
2000
);
assignSeller
(
cust_id
+
1
,
INVITE_ID
,
true
,
1
,
"crm"
);
sleep
(
2000
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
+
1
);
sleep
(
2000
);
updateInvite
(
0
,
now
+
3600000
,
cust_id
+
1
);
abandonCust
(
cust_id
+
2
);
//自动化客户3
sleep
(
2000
);
assignSeller
(
cust_id
+
2
,
INVITE_ID
,
true
,
1
,
"crm"
);
sleep
(
2000
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
+
2
);
otoAssistAuth
();
getCalendarlist
(
today
,
0
,
"自动化测试用户2"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
2
,
"自动化测试用户0"
,
"勿动-自动化测试邀约"
);
}
@Test
(
description
=
"分配邀约卡片"
,
priority
=
7
)
public
void
分配邀约卡片
(){
//预分配客户0
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
otoInviterAuth
();
params
.
put
(
"recordId"
,
recordItem
.
recordId
);
params
.
put
(
"takeLookId"
,
SELLER_ID
);
params
.
put
(
"expertId"
,
EXPERT_ID
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_calendar_preAssign
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_preAssign
,
"预分配失败"
,
response
.
body
().
asString
()));
//重新邀约客户2
updateInvite
(
1
,
now
+
3600000
,
cust_id
+
1
);
getCalendarlist
(
today
,
2
,
"自动化测试用户2"
,
"勿动-自动化测试邀约"
);
params
.
put
(
"recordId"
,
recordItem
.
recordId
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_calendar_preAssign
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_preAssign
,
"预分配失败"
,
response
.
body
().
asString
()));
updateInvite
(
0
,
now
+
3600000
,
cust_id
+
1
);
//再次已鸽
//立即分配客户3
getCalendarlist
(
today
,
2
,
"自动化测试用户3"
,
"勿动-自动化测试邀约"
);
params
.
put
(
"recordId"
,
recordItem
.
recordId
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
,
"立即分配失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询活动签到配置"
,
priority
=
8
)
public
void
查询活动签到配置
(){
WXCustomerTku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
+
1
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WX_signDetail
);
int
signStatus
=
response
.
jsonPath
().
getInt
(
"data.signStatus"
);
boolean
sign
=
response
.
jsonPath
().
getBoolean
(
"data.sign"
);
Assert
.
assertEquals
(
signStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_signDetail
,
"活动不可签到"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
sign
,
network
.
message
(
params
,
BasicConfig
.
WX_signDetail
,
"用户已签到"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"活动签到"
,
priority
=
9
)
public
void
活动签到
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"firstSubmit"
,
true
);
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
+
1
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_signSubmit
);
boolean
needExtra
=
response
.
jsonPath
().
getBoolean
(
"data.needExtra"
);
Assert
.
assertFalse
(
needExtra
,
network
.
message
(
params
,
BasicConfig
.
WX_signSubmit
,
"用户签到失败,在库手机号需要二次填写"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"专家查看提报列表"
,
priority
=
10
)
public
void
专家查看提报列表
(){
WXExpertTTku
();
sellerSubmitRecord
(
0
,
1
);
}
@Test
(
description
=
"专家查看今日签到活动情况"
,
priority
=
11
)
public
void
专家查看今日签到活动情况
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_submitRecordDetail
);
int
confSize
=
response
.
jsonPath
().
getInt
(
"data.list.size"
);
Assert
.
assertEquals
(
confSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到场景数错误"
,
response
.
body
().
asString
()));
int
size
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.size"
);
int
configId
=
response
.
jsonPath
().
getInt
(
"data.list[0].configId"
);
Assert
.
assertEquals
(
configId
,
440
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动的见面场景错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动量数错误"
,
response
.
body
().
asString
()));
int
signStatus0
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"
);
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
Assert
.
assertEquals
(
signStatus0
,-
1
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已分配的签到状态非【需确认】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus1
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已鸽的签到状态非【未到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus2
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【已签到】"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"专家查看今日非签到活动场景"
,
priority
=
12
)
public
void
专家查看今日非签到活动场景
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
otherDetailForSeller
);
int
confSize
=
response
.
jsonPath
().
getInt
(
"data.vos.size"
);
Assert
.
assertEquals
(
confSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
otherDetailForSeller
,
"签到场景数错误"
,
response
.
body
().
asString
()));
int
configId
=
response
.
jsonPath
().
getInt
(
"data.vos[0].configId"
);
Assert
.
assertEquals
(
configId
,
17
,
network
.
message
(
params
,
BasicConfig
.
otherDetailForSeller
,
"签到活动的见面场景错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"专家确认客户到场"
,
priority
=
13
)
public
void
专家确认客户到场
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
params
.
put
(
"custId"
,
IdMakeUtil
.
encodingId
((
long
)
cust_id
-
1
));
params
.
put
(
"configId"
,
440
);
params
.
put
(
"status"
,
1
);
params
.
put
(
"timeInterval"
,
"am"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_checkSign
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_checkSign
,
"确认客户到场失败"
,
response
.
body
().
asString
()));
sellerSubmitRecord
(
0
,
2
);
}
@Test
(
description
=
"专家查看提报可选择的其他见面场景"
,
priority
=
14
)
public
void
专家查看提报可选择的其他见面场景
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_interviewConfigList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_interviewConfigList
,
"其他见面场景数错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"专家查看见面目的列表"
,
priority
=
15
)
public
void
专家查看见面目的列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
WX_custPhase
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size"
);
Assert
.
assertEquals
(
size
,
5
,
network
.
message
(
BasicConfig
.
WX_custPhase
,
"见面目的数错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"专家搜索跟进中客户"
,
priority
=
16
)
public
void
专家搜索跟进中客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试用户3"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WX_searchCust
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_searchCust
,
"搜索跟进中客户数量为0"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"添加非签到活动和其他见面客户并提报"
,
priority
=
17
)
public
void
添加非签到活动和其他见面客户并提报
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ArrayList
list
=
new
ArrayList
();
list
.
add
(
new
SignCustomer
(
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
3
),
"am"
,
226
,
0
));
list
.
add
(
new
SignCustomer
(
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
4
),
"am"
,
17
,
2
));
params
.
put
(
"date"
,
today
);
params
.
put
(
"params"
,
list
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_submitRecord
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecord
,
"提报活动量失败"
,
response
.
body
().
asString
()));
sellerSubmitRecord
(
1
,
2
);
}
@Test
(
description
=
"总监查看部门列表"
,
priority
=
18
)
public
void
总监查看部门列表
(){
WXLeaderTku
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
WX_deptList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WX_custPhase
,
"见面目的数错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"总监查看今日提报概况"
,
priority
=
19
)
public
void
总监查看今日提报概况
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_leaderHeader
);
int
faceCustCount
=
response
.
jsonPath
().
getInt
(
"data.faceCustCount"
);
int
submitCount
=
response
.
jsonPath
().
getInt
(
"data.submitCount"
);
int
unSubmitCount
=
response
.
jsonPath
().
getInt
(
"data.unSubmitCount"
);
Assert
.
assertEquals
(
faceCustCount
,
4
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderHeader
,
"见面客户数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
submitCount
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderHeader
,
"已提交的销售专家数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
unSubmitCount
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderHeader
,
"未提交的销售专家数错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"总监查看销售专家提报列表"
,
priority
=
20
)
public
void
总监查看销售专家提报列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_leaderList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售专家数数错误"
,
response
.
body
().
asString
()));
int
submitStatus1
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.sellerName == '勿动-自动化测试专家'}.submitStatus"
);
int
submitStatus2
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.sellerName == '勿动-自动化测试带看'}.submitStatus"
);
int
configStatistics1
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.sellerName == '勿动-自动化测试专家'}.configStatistics.size()"
);
int
configStatistics2
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.sellerName == '勿动-自动化测试带看'}.configStatistics.size()"
);
int
custCount
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.sellerName == '勿动-自动化测试带看'}.configStatistics[0].custCount"
);
Assert
.
assertEquals
(
submitStatus1
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"专家非【已提报】状态"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
submitStatus2
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售非【未提报】状态"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configStatistics1
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"专家的见面总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configStatistics2
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售的见面总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custCount
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售的签到数不为0"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"总监查看专家今日签到活动情况"
,
priority
=
21
)
public
void
总监查看专家今日签到活动情况
()
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
params
.
put
(
"sellerId"
,
IdMakeUtil
.
encodingId
(
284L
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_submitRecordDetail
);
int
confSize
=
response
.
jsonPath
().
getInt
(
"data.list.size"
);
Assert
.
assertEquals
(
confSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到场景数错误"
,
response
.
body
().
asString
()));
int
size
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.size"
);
int
configId
=
response
.
jsonPath
().
getInt
(
"data.list[0].configId"
);
Assert
.
assertEquals
(
configId
,
440
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动的见面场景错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动量数错误"
,
response
.
body
().
asString
()));
int
signStatus0
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"
);
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
Assert
.
assertEquals
(
signStatus0
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已到场的签到状态非【已到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus1
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已鸽的签到状态非【未到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus2
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【已签到】"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"总监查看专家今日非签到活动场景"
,
priority
=
22
)
public
void
总监查看专家今日非签到活动场景
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
params
.
put
(
"sellerId"
,
IdMakeUtil
.
encodingId
(
284L
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_otherDetailForLeader
);
int
vosSize
=
response
.
jsonPath
().
getInt
(
"data.vos.size()"
);
Assert
.
assertEquals
(
vosSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_otherDetailForLeader
,
"非签到活动的场景数错误"
,
response
.
body
().
asString
()));
vosSize
=
response
.
jsonPath
().
getInt
(
"data.vos[0].otherVos.size()"
);
Assert
.
assertEquals
(
vosSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_otherDetailForLeader
,
"非签到活动的客户数错误"
,
response
.
body
().
asString
()));
vosSize
=
response
.
jsonPath
().
getInt
(
"data.otherVos.size()"
);
Assert
.
assertEquals
(
vosSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_otherDetailForLeader
,
"其他见面场景的客户数错误"
,
response
.
body
().
asString
()));
}
public
void
sellerSubmitRecord
(
int
status
,
int
count
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pagesize"
,
20
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_sellerSubmitRecordList
);
int
submitStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].submitStatus"
);
int
custCount
=
response
.
jsonPath
().
getInt
(
"data.list[0].configStatistics.find{it.configId == 440}.custCount"
);
Assert
.
assertEquals
(
submitStatus
,
status
,
network
.
message
(
params
,
BasicConfig
.
WX_sellerSubmitRecordList
,
"专家提报状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custCount
,
count
,
network
.
message
(
params
,
BasicConfig
.
WX_sellerSubmitRecordList
,
"已签到数量非1"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/oto/cases/otoseller/CheckTask.java
View file @
a2471f8b
...
@@ -3,6 +3,7 @@ package com.oto.cases.otoseller;
...
@@ -3,6 +3,7 @@ package com.oto.cases.otoseller;
import
com.oto.bean.Plan
;
import
com.oto.bean.Plan
;
import
com.oto.cases.admin.Authorization
;
import
com.oto.cases.admin.Authorization
;
import
com.oto.config.BasicConfig
;
import
com.oto.config.BasicConfig
;
import
com.oto.utils.IdMakeUtil
;
import
com.oto.utils.NetworkUtils
;
import
com.oto.utils.NetworkUtils
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.Assert
;
...
@@ -13,6 +14,7 @@ import java.text.SimpleDateFormat;
...
@@ -13,6 +14,7 @@ import java.text.SimpleDateFormat;
import
java.util.*
;
import
java.util.*
;
import
static
com
.
oto
.
cases
.
otoseller
.
Invite
.
sceneId
;
import
static
com
.
oto
.
cases
.
otoseller
.
Invite
.
sceneId
;
import
static
com
.
oto
.
cases
.
otoseller
.
Invite
.
today
;
import
static
com
.
oto
.
cases
.
otoseller
.
Manager
.
cust_id
;
import
static
com
.
oto
.
cases
.
otoseller
.
Manager
.
cust_id
;
import
static
com
.
oto
.
cases
.
otoseller
.
Manager
.
searchRole
;
import
static
com
.
oto
.
cases
.
otoseller
.
Manager
.
searchRole
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
callling
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
callling
;
...
@@ -27,6 +29,7 @@ public class CheckTask implements Authorization {
...
@@ -27,6 +29,7 @@ public class CheckTask implements Authorization {
public
static
String
beginTime
;
//周一日期
public
static
String
beginTime
;
//周一日期
public
static
int
tomorrowWeek
;
//明日周几
public
static
int
tomorrowWeek
;
//明日周几
public
int
strategyId
;
//盘点策略ID
public
int
strategyId
;
//盘点策略ID
public
static
int
OAId
;
//报告审批ID
@BeforeTest
@BeforeTest
public
void
setUp
(){
public
void
setUp
(){
...
@@ -578,104 +581,141 @@ public class CheckTask implements Authorization {
...
@@ -578,104 +581,141 @@ public class CheckTask implements Authorization {
@Test
(
description
=
"查看新客户的方案进展模块"
,
priority
=
50
)
@Test
(
description
=
"查看新客户的方案进展模块"
,
priority
=
50
)
public
void
查看新客户的方案进展模块
(){
public
void
查看新客户的方案进展模块
(){
getSchemeNum
(
0
,
0
,
0
,
null
);
otoExpertAuth
();
getTree
(
4
,
null
,
0
,
0
,
null
);
}
}
@Test
(
description
=
"上传KYC"
,
priority
=
51
)
@Test
(
description
=
"销售上传KYC"
,
priority
=
51
)
public
void
上传
KYC
(){
public
void
销售上传
KYC
(){
//仅管理员/PM/内勤可上传kyc
otoManagerAuth
();
saveKyc
(
true
);
otoPMAuth
();
saveKyc
(
true
);
otoAssistAuth
();
saveKyc
(
true
);
saveKyc
(
true
);
}
@Test
(
description
=
"销售提审客户报告"
,
priority
=
52
)
public
void
销售提审客户报告
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"hopePayTime"
,
today
+
86400000
*
2
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_OA_submit
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_submit
,
"销售提审客户报告失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看kyc上传历史列表"
,
priority
=
53
)
public
void
查看
kyc
上传历史列表
(){
//查看kys上传历史
getSchemeList
(
1
,
1
);
}
@Test
(
description
=
"查看客户报告进度为总监审批中"
,
priority
=
54
)
public
void
查看客户报告进度为总监审批中
(){
getTree
(
2
,
1
,
0
,
0
,
2
);
}
@Test
(
description
=
"登录人查看待审批数量"
,
priority
=
55
)
public
void
登录人查看待审批数量
(){
otoAreaAuth
();
//区域总待审批为0
getAuditNum
(
0
);
otoLeaderAuth
();
otoLeaderAuth
();
saveKyc
(
true
);
getAuditNum
(
1
);
}
//其他角色不可上传kyc
@Test
(
description
=
"查看报告审批列表"
,
priority
=
56
)
otoInviterAuth
();
public
void
查看报告审批列表
(){
saveKyc
(
false
);
otoTakerAuth
();
saveKyc
(
false
);
otoExpertAuth
();
otoExpertAuth
();
saveKyc
(
false
);
getAuditList
(
1
,
2
,
0
,
0
,
0
);
otoAreaAuth
();
saveKyc
(
false
);
sleep
(
1000
);
otoLeaderAuth
(
);
get
SchemeNum
(
4
,
0
,
0
,
null
);
get
AuditList
(
1
,
2
,
1
,
0
,
0
);
}
}
@Test
(
description
=
"上传客户方案"
,
priority
=
52
)
@Test
(
description
=
"总监审批驳回"
,
priority
=
57
)
public
void
上传客户方案
(){
public
void
总监审批驳回
(){
//仅管理员/PM可上传方案
otoLeaderAuth
();
otoManagerAuth
();
audit
(
0
);
savePlanFile
(
true
);
getAuditList
(
3
,
2
,
0
,
0
,
0
);
otoPMAuth
();
getTree
(
2
,
3
,
0
,
0
,
2
);
savePlanFile
(
true
);
//其他角色不可上传方案
otoAssistAuth
();
savePlanFile
(
false
);
otoInviterAuth
();
savePlanFile
(
false
);
otoTakerAuth
();
savePlanFile
(
false
);
otoExpertAuth
();
otoExpertAuth
();
savePlanFile
(
false
);
getAuditList
(
3
,
2
,
0
,
1
,
0
);
otoLeaderAuth
();
}
savePlanFile
(
false
);
otoAreaAuth
();
@Test
(
description
=
"专家重新提审"
,
priority
=
58
)
savePlanFile
(
false
);
public
void
专家重新提审
(){
otoExpertAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"hopePayTime"
,
today
+
86400000
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_OA_submit
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_submit
,
"销售提审客户报告失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"总监区域总解决方案通过审批"
,
priority
=
59
)
public
void
总监区域总解决方案通过审批
(){
otoLeaderAuth
();
//总监审批前
getAuditList
(
1
,
2
,
1
,
0
,
0
);
getTree
(
2
,
1
,
0
,
0
,
2
);
audit
(
1
);
//总监通过审批后
getAuditList
(
1
,
7
,
0
,
0
,
0
);
getTree
(
2
,
2
,
0
,
0
,
7
);
sleep
(
1000
);
otoAreaAuth
();
//区域总审批前
getAuditList
(
1
,
7
,
1
,
0
,
0
);
getTree
(
7
,
1
,
0
,
0
,
7
);
audit
(
1
);
//区域总通过审批后
getAuditList
(
1
,
9
,
0
,
0
,
0
);
getTree
(
7
,
2
,
0
,
0
,
9
);
sleep
(
1000
);
sleep
(
1000
);
getSchemeNum
(
4
,
2
,
0
,
null
);
otoPlanAuth
();
//解决方案审批前
getAuditList
(
1
,
9
,
1
,
0
,
0
);
getTree
(
9
,
1
,
0
,
0
,
9
);
audit
(
1
);
//解决方案通过审批后
getAuditList
(
2
,
99
,
0
,
0
,
1
);
getTree
(
9
,
2
,
0
,
0
,
99
);
}
@Test
(
description
=
"解决方案上传客户方案"
,
priority
=
60
)
public
void
解决方案上传客户方案
(){
savePlanFile
(
true
);
sleep
(
1000
);
getAuditList
(
4
,
99
,
0
,
0
,
1
);
}
}
@Test
(
description
=
"查看kyc和方案上传历史列表"
,
priority
=
53
)
@Test
(
description
=
"查看kyc和方案上传历史列表"
,
priority
=
61
)
public
void
查看
kyc
和方案上传历史列表
(){
public
void
查看
kyc
和方案上传历史列表
(){
//查看kys上传历史
//查看kys上传历史
getSchemeList
(
1
,
4
,
null
);
getSchemeList
(
1
,
1
);
//查看方案上传历史
//查看方案上传历史
getSchemeList
(
2
,
2
,
null
);
getSchemeList
(
2
,
1
);
//查看方案讲解历史
//查看方案讲解历史
getSchemeList
(
3
,
0
,
null
);
getSchemeList
(
3
,
0
);
}
}
@Test
(
description
=
"标记KYC合格状态"
,
priority
=
54
)
@Test
(
description
=
"查询当前跟进专家姓名"
,
priority
=
62
)
public
void
标记
KYC
合格状态
(){
public
void
查询当前跟进专家姓名
(){
//仅管理员/PM可标记kyc
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
otoManagerAuth
();
params
.
put
(
"name"
,
"自动化"
);
qualifiedKyc
(
1
,
true
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_expertName
);
sleep
(
1000
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
getSchemeNum
(
4
,
2
,
0
,
true
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_expertName
,
"活动不可签到"
,
response
.
body
().
asString
()));
getSchemeList
(
1
,
4
,
1
);
}
otoPMAuth
();
qualifiedKyc
(
0
,
true
);
sleep
(
1000
);
getSchemeNum
(
4
,
2
,
0
,
false
);
getSchemeList
(
1
,
4
,
0
);
//其他角色不可标记kyc
otoAssistAuth
();
qualifiedKyc
(
1
,
false
);
otoInviterAuth
();
qualifiedKyc
(
1
,
false
);
otoTakerAuth
();
qualifiedKyc
(
1
,
false
);
otoExpertAuth
();
qualifiedKyc
(
1
,
false
);
otoLeaderAuth
();
qualifiedKyc
(
1
,
false
);
otoAreaAuth
();
qualifiedKyc
(
1
,
false
);
@Test
(
description
=
"查询团队跟进客户姓名"
,
priority
=
63
)
public
void
查询团队跟进客户姓名
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
"自动化"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_custName
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_custName
,
"客户姓名为空"
,
response
.
body
().
asString
()));
}
}
//获取销售个人工作计划
//获取销售个人工作计划
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
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -751,26 +791,61 @@ public class CheckTask implements Authorization {
...
@@ -751,26 +791,61 @@ public class CheckTask implements Authorization {
}
}
}
}
public
static
void
get
SchemeNum
(
int
kycNum
,
int
schemeNum
,
int
commitPlanNum
,
Object
hasQualifiedKyc
){
public
static
void
get
Tree
(
int
roleType
,
Object
auditStatus
,
int
planExplainStatus
,
int
planUploadStatus
,
Object
curRoleType
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_scheme_getNum
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_tree
);
int
kyc
=
response
.
jsonPath
().
getInt
(
"data.kycNum"
);
Object
curRole
=
response
.
jsonPath
().
getObject
(
"data.curRoleType"
,
Integer
.
class
);
int
scheme
=
response
.
jsonPath
().
getInt
(
"data.schemeNum"
);
Object
aStatus
=
response
.
jsonPath
().
getObject
(
"data.list.find{it.roleType == "
+
roleType
+
"}.auditStatus"
,
Integer
.
class
);
int
commitPlan
=
response
.
jsonPath
().
getInt
(
"data.commitPlanNum"
);
int
uploadStatus
=
response
.
jsonPath
().
getInt
(
"data.planUploadStatus"
);
Assert
.
assertEquals
(
kyc
,
kycNum
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_getNum
,
"上传KYC次数非"
+
kycNum
,
response
.
body
().
asString
()));
int
explainStatus
=
response
.
jsonPath
().
getInt
(
"data.planExplainStatus"
);
Assert
.
assertEquals
(
scheme
,
schemeNum
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_getNum
,
"上传方案次数非"
+
schemeNum
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
curRole
,
curRoleType
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"当前审批环节非"
+
curRoleType
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlan
,
commitPlanNum
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_getNum
,
"讲解方案次数非"
+
commitPlanNum
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
aStatus
,
auditStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"角色为"
+
roleType
+
"的审批状态非"
+
auditStatus
,
response
.
body
().
asString
()));
if
(
hasQualifiedKyc
==
null
)
{
Assert
.
assertEquals
(
uploadStatus
,
planExplainStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"上传方案次数非"
+
planExplainStatus
,
response
.
body
().
asString
()));
Object
QualifiedKyc
=
response
.
jsonPath
().
getJsonObject
(
"data.hasQualifiedKyc"
);
Assert
.
assertEquals
(
explainStatus
,
planUploadStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_tree
,
"讲解方案次数非"
+
planUploadStatus
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
QualifiedKyc
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_getNum
,
"KYC合格状态非"
+
hasQualifiedKyc
,
response
.
body
().
asString
()));
}
}
else
{
boolean
QualifiedKyc
=
response
.
jsonPath
().
getBoolean
(
"data.hasQualifiedKyc"
);
public
static
void
audit
(
int
audit
){
Assert
.
assertEquals
(
QualifiedKyc
,
hasQualifiedKyc
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_getNum
,
"KYC合格状态非"
+
hasQualifiedKyc
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
OAId
);
params
.
put
(
"auditFlag"
,
audit
);
if
(
audit
==
0
){
params
.
put
(
"auditRecord"
,
"审批自动化驳回"
);
}
}
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_OA_audit
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_audit
,
"审批通过或驳回失败"
,
response
.
body
().
asString
()));
}
}
public
static
void
getSchemeList
(
int
type
,
int
count
,
Integer
kycStatus
){
public
static
void
getAuditNum
(
int
num
){
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_OA_getAuditNum
);
int
waitToAuditNum
=
response
.
jsonPath
().
getInt
(
"data.waitToAuditNum"
);
if
(
num
==
0
)
Assert
.
assertEquals
(
waitToAuditNum
,
num
,
network
.
message
(
BasicConfig
.
WORK_OA_getAuditNum
,
"客户报告待审批非0"
,
response
.
body
().
asString
()));
else
Assert
.
assertTrue
(
waitToAuditNum
>
0
,
network
.
message
(
BasicConfig
.
WORK_OA_getAuditNum
,
"客户报告待审批非小于1"
,
response
.
body
().
asString
()));
}
public
static
void
getAuditList
(
int
auditStatus
,
int
nextRoleType
,
int
passFailButton
,
int
submitReportButton
,
int
uploadPlanButton
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
50
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_OA_list
);
int
status
=
response
.
jsonPath
().
getInt
(
"data.list[0].auditStatus"
);
int
nextRole
=
response
.
jsonPath
().
getInt
(
"data.list[0].nextRoleType"
);
int
passFail
=
response
.
jsonPath
().
getInt
(
"data.list[0].passFailButton"
);
int
submitReport
=
response
.
jsonPath
().
getInt
(
"data.list[0].submitReportButton"
);
int
uploadPlan
=
response
.
jsonPath
().
getInt
(
"data.list[0].uploadPlanButton"
);
Assert
.
assertEquals
(
status
,
auditStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_list
,
"客户报告审批状态非"
+
auditStatus
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
nextRole
,
nextRoleType
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_list
,
"审批的下一个角色状态非"
+
nextRoleType
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
passFail
,
passFailButton
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_list
,
"审批按钮状态非"
+
passFailButton
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
submitReport
,
submitReportButton
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_list
,
"重新提审按钮状态非"
+
submitReportButton
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
uploadPlan
,
uploadPlanButton
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_list
,
"方案上传按钮状态非"
+
uploadPlanButton
,
response
.
body
().
asString
()));
OAId
=
response
.
jsonPath
().
getInt
(
"data.list[0].id"
);
}
public
static
void
getSchemeList
(
int
type
,
int
count
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"type"
,
type
);
params
.
put
(
"type"
,
type
);
...
@@ -779,18 +854,5 @@ public class CheckTask implements Authorization {
...
@@ -779,18 +854,5 @@ public class CheckTask implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_scheme_list
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_scheme_list
);
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
()));
if
(
type
==
1
){
//1-kyc上传历史,2-方案上传历史,3-方案讲解历史
kycId
=
response
.
jsonPath
().
getInt
(
"data.list[0].id"
);
//1表示合格,0表示不合格,null表示未评价
if
(
kycStatus
==
null
){
Object
isQualified
=
response
.
jsonPath
().
getJsonObject
(
"data.list[0].isQualified"
);
Assert
.
assertNull
(
isQualified
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_list
,
"最新上传的kyc合格状态非"
+
count
,
response
.
body
().
asString
()));
}
else
{
Integer
isQualified
=
response
.
jsonPath
().
getInt
(
"data.list[0].isQualified"
);
Assert
.
assertEquals
(
isQualified
,
kycStatus
,
network
.
message
(
params
,
BasicConfig
.
WORK_scheme_list
,
"最新上传的kyc合格状态非"
+
count
,
response
.
body
().
asString
()));
}
}
}
}
}
}
src/test/java/com/oto/cases/otoseller/Depts.java
View file @
a2471f8b
...
@@ -25,8 +25,8 @@ public class Depts implements Authorization {
...
@@ -25,8 +25,8 @@ public class Depts implements Authorization {
public
void
setUp
(){
public
void
setUp
(){
otoManagerAuth
();
otoManagerAuth
();
custids
=
new
ArrayList
<
Integer
>();
custids
=
new
ArrayList
<
Integer
>();
custids
.
add
(
cust_id
+
2
);
custids
.
add
(
cust_id
+
3
);
custids
.
add
(
cust_id
+
3
);
custids
.
add
(
cust_id
+
4
);
}
}
@Test
(
description
=
"新建部门"
,
priority
=
1
)
@Test
(
description
=
"新建部门"
,
priority
=
1
)
...
@@ -214,7 +214,7 @@ public class Depts implements Authorization {
...
@@ -214,7 +214,7 @@ public class Depts implements Authorization {
@Test
(
description
=
"修改客户标签"
,
priority
=
17
)
@Test
(
description
=
"修改客户标签"
,
priority
=
17
)
public
void
修改客户标签
(){
public
void
修改客户标签
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"custId"
,
custids
.
get
(
1
));
params
.
put
(
"tagIds"
,
new
int
[]{
22
});
params
.
put
(
"tagIds"
,
new
int
[]{
22
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_updateTag
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_updateTag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -225,7 +225,7 @@ public class Depts implements Authorization {
...
@@ -225,7 +225,7 @@ public class Depts implements Authorization {
@Test
(
description
=
"标记成单"
,
priority
=
18
)
@Test
(
description
=
"标记成单"
,
priority
=
18
)
public
void
标记成单
(){
public
void
标记成单
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"custId"
,
custids
.
get
(
1
));
params
.
put
(
"applicantName"
,
"测试投保人"
);
params
.
put
(
"applicantName"
,
"测试投保人"
);
params
.
put
(
"comeIntoFacetime"
,
"2023-03-23"
);
params
.
put
(
"comeIntoFacetime"
,
"2023-03-23"
);
params
.
put
(
"costOption"
,
3
);
params
.
put
(
"costOption"
,
3
);
...
@@ -274,7 +274,7 @@ public class Depts implements Authorization {
...
@@ -274,7 +274,7 @@ public class Depts implements Authorization {
@Test
(
description
=
"取消成单"
,
priority
=
20
)
@Test
(
description
=
"取消成单"
,
priority
=
20
)
public
void
取消成单
(){
public
void
取消成单
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"custId"
,
custids
.
get
(
1
));
params
.
put
(
"dealFlag"
,
0
);
params
.
put
(
"dealFlag"
,
0
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_cancelDealFlag
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_cancelDealFlag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -299,7 +299,7 @@ public class Depts implements Authorization {
...
@@ -299,7 +299,7 @@ public class Depts implements Authorization {
params
.
put
(
"otoSidList"
,
42
);
params
.
put
(
"otoSidList"
,
42
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_MNG_customerList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_MNG_customerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
6
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_customerList
,
"邀约人筛选结果错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_customerList
,
"邀约人筛选结果错误"
,
response
.
body
().
asString
()));
params
.
put
(
"otoSidList"
,
284
);
params
.
put
(
"otoSidList"
,
284
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_MNG_customerList
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_MNG_customerList
);
...
@@ -309,7 +309,7 @@ public class Depts implements Authorization {
...
@@ -309,7 +309,7 @@ public class Depts implements Authorization {
params
.
put
(
"otoSidList"
,
290
);
params
.
put
(
"otoSidList"
,
290
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_MNG_customerList
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_MNG_customerList
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_customerList
,
"带看人筛选结果错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_customerList
,
"带看人筛选结果错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询可导入的客户来源列表"
,
priority
=
21
)
@Test
(
description
=
"查询可导入的客户来源列表"
,
priority
=
21
)
...
@@ -373,7 +373,7 @@ public class Depts implements Authorization {
...
@@ -373,7 +373,7 @@ public class Depts implements Authorization {
int
assignNewCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
INVITE_ID
+
"}.assignNewCustPermission"
);
int
assignNewCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
INVITE_ID
+
"}.assignNewCustPermission"
);
int
assignRecycleCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
INVITE_ID
+
"}.assignRecycleCustPermission"
);
int
assignRecycleCustPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
INVITE_ID
+
"}.assignRecycleCustPermission"
);
int
callPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
INVITE_ID
+
"}.callPermission"
);
int
callPermission
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == "
+
INVITE_ID
+
"}.callPermission"
);
Assert
.
assertEquals
(
size
,
1
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"销数成员错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
1
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"销数成员错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
workStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"工作状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
workStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"工作状态错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignNewCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"认领新客户及强制分配权限错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignNewCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"认领新客户及强制分配权限错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignRecycleCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"认领回收客户权限错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
assignRecycleCustPermission
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_sellerList
,
"认领回收客户权限错误"
,
response
.
body
().
asString
()));
...
@@ -584,8 +584,8 @@ public class Depts implements Authorization {
...
@@ -584,8 +584,8 @@ public class Depts implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_changeSellerPhone
,
"换绑手机号失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_changeSellerPhone
,
"换绑手机号失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看销售
部门详情
"
,
priority
=
38
)
@Test
(
description
=
"查看销售
的部门ID
"
,
priority
=
38
)
public
void
查看销售
部门详情
(){
public
void
查看销售
的部门
ID
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
INVITE_ID
);
params
.
put
(
"id"
,
INVITE_ID
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_sellerDetail
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_sellerDetail
);
...
@@ -680,13 +680,13 @@ public class Depts implements Authorization {
...
@@ -680,13 +680,13 @@ public class Depts implements Authorization {
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_ykList
,
"微信会话不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_ykList
,
"微信会话不为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"
我的
审批搜索成员"
,
priority
=
47
)
@Test
(
description
=
"
面访
审批搜索成员"
,
priority
=
47
)
public
void
我的
审批搜索成员
(){
public
void
面访
审批搜索成员
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"sellerName"
,
"自动化"
);
params
.
put
(
"sellerName"
,
"自动化"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_findMySellerByFuzzyName
);;
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_findMySellerByFuzzyName
);;
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
1
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_findMySellerByFuzzyName
,
"问题详情为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
1
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_findMySellerByFuzzyName
,
"问题详情为空"
,
response
.
body
().
asString
()));
}
}
public
void
dimissionStatus
(
int
sellreid
){
public
void
dimissionStatus
(
int
sellreid
){
...
...
src/test/java/com/oto/cases/otoseller/FormSubmit.java
View file @
a2471f8b
...
@@ -47,7 +47,7 @@ public class FormSubmit implements Authorization {
...
@@ -47,7 +47,7 @@ public class FormSubmit implements Authorization {
paramsFrom
.
put
(
"title"
,
"勿动-自动化资料组"
);
paramsFrom
.
put
(
"title"
,
"勿动-自动化资料组"
);
Response
response
=
network
.
postResponse
(
paramsFrom
,
BasicConfig
.
WORK_saveFormDetail
);
Response
response
=
network
.
postResponse
(
paramsFrom
,
BasicConfig
.
WORK_saveFormDetail
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertFalse
(
success
,
network
.
message
(
paramsFrom
,
BasicConfig
.
WORK_saveFormDetail
,
"
修改资料组状态失败
"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
paramsFrom
,
BasicConfig
.
WORK_saveFormDetail
,
"
开启空资料组状态成功
"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取资料组的配置详情"
,
priority
=
4
)
@Test
(
description
=
"获取资料组的配置详情"
,
priority
=
4
)
...
@@ -63,6 +63,17 @@ public class FormSubmit implements Authorization {
...
@@ -63,6 +63,17 @@ public class FormSubmit implements Authorization {
custDetail
(
8
,
false
,
false
);
custDetail
(
8
,
false
,
false
);
}
}
@Test
(
description
=
"移动资料组"
,
priority
=
5
)
public
void
移动资料组
(){
HashMap
<
String
,
Object
>
paramsFrom
=
new
HashMap
<>();
paramsFrom
.
put
(
"from"
,
8
);
paramsFrom
.
put
(
"to"
,
7
);
Response
response
=
network
.
postResponse
(
paramsFrom
,
BasicConfig
.
WORK_formOrder
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
paramsFrom
,
BasicConfig
.
WORK_formOrder
,
"移动资料组状态失败"
,
response
.
body
().
asString
()));
response
=
network
.
postResponse
(
paramsFrom
,
BasicConfig
.
WORK_formOrder
);
}
@Test
(
description
=
"新增资料组题目"
,
priority
=
6
)
@Test
(
description
=
"新增资料组题目"
,
priority
=
6
)
...
...
src/test/java/com/oto/cases/otoseller/Invite.java
View file @
a2471f8b
...
@@ -20,6 +20,7 @@ import java.util.Map;
...
@@ -20,6 +20,7 @@ import java.util.Map;
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
.
assignSeller
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
assignSeller
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
now
;
import
static
com
.
oto
.
config
.
BasicConfig
.*;
import
static
com
.
oto
.
config
.
BasicConfig
.*;
import
static
com
.
oto
.
utils
.
BaseUtils
.
ssoLogin
;
import
static
com
.
oto
.
utils
.
BaseUtils
.
ssoLogin
;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
...
@@ -29,8 +30,7 @@ public class Invite implements Authorization {
...
@@ -29,8 +30,7 @@ public class Invite implements Authorization {
public
static
Map
<
String
,
Integer
>
header
;
public
static
Map
<
String
,
Integer
>
header
;
public
Map
<
String
,
Double
>
coefficient
;
public
Map
<
String
,
Double
>
coefficient
;
public
static
long
sceneId
;
public
static
long
sceneId
;
public
String
inviteUrl
;
//邀请函链接
public
static
String
inviteUrl
;
//邀请函链接
public
static
long
now
;
//当前时间戳
public
static
long
today
;
//当前日期0点时间戳
public
static
long
today
;
//当前日期0点时间戳
public
static
long
sunndayWeek
;
//当前周日日期
public
static
long
sunndayWeek
;
//当前周日日期
public
double
takerCoefficient
;
public
double
takerCoefficient
;
...
@@ -40,8 +40,6 @@ public class Invite implements Authorization {
...
@@ -40,8 +40,6 @@ public class Invite implements Authorization {
public
void
setUp
(){
public
void
setUp
(){
header
=
new
HashMap
<>();
header
=
new
HashMap
<>();
coefficient
=
new
HashMap
<>();
coefficient
=
new
HashMap
<>();
now
=
System
.
currentTimeMillis
();
today
=
now
-(
now
+
8
*
3600
*
1000
)
%
(
60
*
60
*
24
*
1000
);
otoManagerAuth
();
otoManagerAuth
();
Sunday
();
Sunday
();
}
}
...
@@ -98,13 +96,13 @@ public class Invite implements Authorization {
...
@@ -98,13 +96,13 @@ public class Invite implements Authorization {
@Test
(
description
=
"修改客户面访状态为明确拒绝"
,
priority
=
5
)
@Test
(
description
=
"修改客户面访状态为明确拒绝"
,
priority
=
5
)
public
void
修改客户面访状态为明确拒绝
(){
public
void
修改客户面访状态为明确拒绝
(){
updateInvite
(
0
,
now
+
86400000
);
updateInvite
(
0
,
now
+
86400000
,
cust_id
);
getHasFirstInvite
(
0
,
true
);
getHasFirstInvite
(
0
,
true
);
}
}
@Test
(
description
=
"修改客户面访状态为已约到时间未定"
,
priority
=
6
)
@Test
(
description
=
"修改客户面访状态为已约到时间未定"
,
priority
=
6
)
public
void
修改客户面访状态为已约到时间未定
(){
public
void
修改客户面访状态为已约到时间未定
(){
updateInvite
(
2
,
now
+
86400000
);
updateInvite
(
2
,
now
+
86400000
,
cust_id
);
getHasFirstInvite
(
2
,
true
);
getHasFirstInvite
(
2
,
true
);
}
}
...
@@ -115,13 +113,13 @@ public class Invite implements Authorization {
...
@@ -115,13 +113,13 @@ public class Invite implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
confUsableSize
=
response
.
jsonPath
().
getInt
(
"data.findAll{it.confUsable == 1}.size()"
);
int
confUsableSize
=
response
.
jsonPath
().
getInt
(
"data.findAll{it.confUsable == 1}.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
confUsableSize
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
confUsableSize
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改客户面访承诺时间为1天后"
,
priority
=
8
)
@Test
(
description
=
"修改客户面访承诺时间为1天后"
,
priority
=
8
)
public
void
修改客户面访承诺时间为
1
天后
(){
public
void
修改客户面访承诺时间为
1
天后
(){
updateInvite
(
1
,
now
+
86400000
);
updateInvite
(
1
,
now
+
86400000
,
cust_id
);
getHasFirstInvite
(
1
,
true
);
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCallCustInfo
(
1
);
...
@@ -135,7 +133,7 @@ public class Invite implements Authorization {
...
@@ -135,7 +133,7 @@ public class Invite implements Authorization {
@Test
(
description
=
"修改客户具体时间客户状态不变"
,
priority
=
10
)
@Test
(
description
=
"修改客户具体时间客户状态不变"
,
priority
=
10
)
public
void
修改客户具体时间客户状态不变
(){
public
void
修改客户具体时间客户状态不变
(){
updateInvite
(
1
,
now
+
86400000
+
3600000
);
updateInvite
(
1
,
now
+
86400000
+
3600000
,
cust_id
);
getHasFirstInvite
(
1
,
true
);
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCallCustInfo
(
1
);
...
@@ -144,7 +142,7 @@ public class Invite implements Authorization {
...
@@ -144,7 +142,7 @@ public class Invite implements Authorization {
@Test
(
description
=
"修改客户具体日期,老邀约为已鸽"
,
priority
=
11
)
@Test
(
description
=
"修改客户具体日期,老邀约为已鸽"
,
priority
=
11
)
public
void
修改客户具体日期老邀约变为已鸽
(){
public
void
修改客户具体日期老邀约变为已鸽
(){
updateInvite
(
1
,
now
+
86400000
*
2
);
updateInvite
(
1
,
now
+
86400000
*
2
,
cust_id
);
getHasFirstInvite
(
1
,
true
);
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCallCustInfo
(
1
);
...
@@ -154,7 +152,7 @@ public class Invite implements Authorization {
...
@@ -154,7 +152,7 @@ public class Invite implements Authorization {
@Test
(
description
=
"修改客户未约到客户状态变为已鸽"
,
priority
=
12
)
@Test
(
description
=
"修改客户未约到客户状态变为已鸽"
,
priority
=
12
)
public
void
修改客户未约到客户状态变为已鸽
(){
public
void
修改客户未约到客户状态变为已鸽
(){
updateInvite
(
0
,
now
+
3600000
);
updateInvite
(
0
,
now
+
3600000
,
cust_id
);
getHasFirstInvite
(
0
,
true
);
getHasFirstInvite
(
0
,
true
);
getCallCustInfo
(
0
);;
getCallCustInfo
(
0
);;
...
@@ -163,7 +161,7 @@ public class Invite implements Authorization {
...
@@ -163,7 +161,7 @@ public class Invite implements Authorization {
@Test
(
description
=
"修改客户已约到客户状态时间今天后变为已确认"
,
priority
=
13
)
@Test
(
description
=
"修改客户已约到客户状态时间今天后变为已确认"
,
priority
=
13
)
public
void
修改客户已约到客户状态时间今天后变为已确认
(){
public
void
修改客户已约到客户状态时间今天后变为已确认
(){
updateInvite
(
1
,
now
+
3600000
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
);
getHasFirstInvite
(
1
,
true
);
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCallCustInfo
(
1
);
...
@@ -328,8 +326,8 @@ public class Invite implements Authorization {
...
@@ -328,8 +326,8 @@ public class Invite implements Authorization {
@Test
(
description
=
"立即分配邀约客户"
,
priority
=
25
)
@Test
(
description
=
"立即分配邀约客户"
,
priority
=
25
)
public
void
立即分配邀约客户
(){
public
void
立即分配邀约客户
(){
updateInvite
(
0
,
now
+
3600000
);
updateInvite
(
0
,
now
+
3600000
,
cust_id
);
updateInvite
(
1
,
now
+
3600000
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
);
getCalendarlist
(
today
,
2
,
"自动化激活用户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
2
,
"自动化激活用户"
,
"勿动-自动化测试邀约"
);
otoManagerAuth
();
otoManagerAuth
();
...
@@ -394,9 +392,9 @@ public class Invite implements Authorization {
...
@@ -394,9 +392,9 @@ public class Invite implements Authorization {
}
}
//修改客户的约面情况
//修改客户的约面情况
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
public
static
void
updateInvite
(
int
interviewFlag
,
long
time
,
int
customer_id
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust
omer
_id
);
params
.
put
(
"eventType"
,
2
);
params
.
put
(
"eventType"
,
2
);
params
.
put
(
"firstInterviewFlag"
,
interviewFlag
);
params
.
put
(
"firstInterviewFlag"
,
interviewFlag
);
if
(
interviewFlag
==
1
){
//1为已约到需要填写时间地点
if
(
interviewFlag
==
1
){
//1为已约到需要填写时间地点
...
@@ -421,7 +419,7 @@ public class Invite implements Authorization {
...
@@ -421,7 +419,7 @@ public class Invite implements Authorization {
//获取客户详情回填的客户约面信息
//获取客户详情回填的客户约面信息
public
void
getHasFirstInvite
(
int
interviewFlag
,
boolean
isinviter
){
public
static
void
getHasFirstInvite
(
int
interviewFlag
,
boolean
isinviter
){
sleep
(
1000
);
sleep
(
1000
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
...
@@ -489,11 +487,13 @@ public class Invite implements Authorization {
...
@@ -489,11 +487,13 @@ public class Invite implements Authorization {
}
}
}
}
if
(
flag
==
0
){
if
(
flag
==
0
&&
inviteStatus
!=
0
){
Assert
.
fail
(
"未找到相应的约面记录"
);
Assert
.
fail
(
"未找到相应的约面记录"
);
}
}
}
}
public
static
void
Sunday
(){
public
static
void
Sunday
(){
now
=
System
.
currentTimeMillis
();
today
=
now
-(
now
+
8
*
3600
*
1000
)
%
(
60
*
60
*
24
*
1000
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
if
(
cal
.
get
(
Calendar
.
DAY_OF_WEEK
)
==
Calendar
.
SUNDAY
){
if
(
cal
.
get
(
Calendar
.
DAY_OF_WEEK
)
==
Calendar
.
SUNDAY
){
...
...
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
a2471f8b
...
@@ -73,7 +73,7 @@ public class Manager implements Authorization {
...
@@ -73,7 +73,7 @@ public class Manager implements Authorization {
}
}
@Test
(
description
=
"修改产品组信息"
,
priority
=
5
)
@Test
(
description
=
"修改产品组信息"
,
priority
=
5
)
public
void
修改产品信息
(){
public
void
修改产品
组
信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
5
);
params
.
put
(
"id"
,
5
);
params
.
put
(
"areaCodes"
,
new
String
[]{
"330000"
,
"330100"
});
params
.
put
(
"areaCodes"
,
new
String
[]{
"330000"
,
"330100"
});
...
@@ -127,8 +127,8 @@ public class Manager implements Authorization {
...
@@ -127,8 +127,8 @@ public class Manager implements Authorization {
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_oto_directorList
,
"查看所有总监列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_oto_directorList
,
"查看所有总监列表为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改公司
产品
"
,
priority
=
9
)
@Test
(
description
=
"修改公司
险种
"
,
priority
=
9
)
public
void
修改公司
产品
(){
public
void
修改公司
险种
(){
ArrayList
costOptions
=
new
ArrayList
();
ArrayList
costOptions
=
new
ArrayList
();
costOptions
.
add
(
0
);
costOptions
.
add
(
0
);
costOptions
.
add
(
1
);
costOptions
.
add
(
1
);
...
@@ -141,11 +141,11 @@ public class Manager implements Authorization {
...
@@ -141,11 +141,11 @@ public class Manager implements Authorization {
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改
公司产品
失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改
险种
失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看
产品
列表"
,
priority
=
10
)
@Test
(
description
=
"查看
险种
列表"
,
priority
=
10
)
public
void
查看
产品
列表
(){
public
void
查看
险种
列表
(){
Response
response
=
null
;
Response
response
=
null
;
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
int
size
=
0
;
int
size
=
0
;
...
@@ -165,8 +165,8 @@ public class Manager implements Authorization {
...
@@ -165,8 +165,8 @@ public class Manager implements Authorization {
Assert
.
assertEquals
(
prodName
,
"勿动-自动化专用产品更新"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productList
,
"产品的名称未更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
prodName
,
"勿动-自动化专用产品更新"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productList
,
"产品的名称未更新"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"还原
公司产品
"
,
priority
=
11
)
@Test
(
description
=
"还原
险种信息
"
,
priority
=
11
)
public
void
还原
公司产品
(){
public
void
还原
险种信息
(){
ArrayList
costOptions
=
new
ArrayList
();
ArrayList
costOptions
=
new
ArrayList
();
costOptions
.
add
(
0
);
costOptions
.
add
(
0
);
costOptions
.
add
(
1
);
costOptions
.
add
(
1
);
...
@@ -180,7 +180,7 @@ public class Manager implements Authorization {
...
@@ -180,7 +180,7 @@ public class Manager implements Authorization {
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改
公司产品
失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改
险种
失败"
,
response
.
body
().
asString
()));
}
}
...
@@ -503,29 +503,7 @@ public class Manager implements Authorization {
...
@@ -503,29 +503,7 @@ public class Manager implements Authorization {
Assert
.
assertEquals
(
liveId
,
IdMakeUtil
.
encodingId
(
8203L
),
network
.
message
(
params
,
BasicConfig
.
live_mapping_getTrueLinkInfo
,
"模糊查询结果错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
liveId
,
IdMakeUtil
.
encodingId
(
8203L
),
network
.
message
(
params
,
BasicConfig
.
live_mapping_getTrueLinkInfo
,
"模糊查询结果错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取客户来源对应关系列表"
,
priority
=
39
)
public
void
获取客户来源对应关系列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_custFromSourceList
);
String
custFromSource
=
response
.
jsonPath
().
getString
(
"data[0].custFromSource"
);
String
desc
=
response
.
jsonPath
().
getString
(
"data[0].desc"
);
Assert
.
assertEquals
(
custFromSource
,
"01_01-01"
,
network
.
message
(
BasicConfig
.
MANAGER_custFromSourceList
,
"客户来源枚举值错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
desc
,
"投放客户-自建落地页-表单"
,
network
.
message
(
BasicConfig
.
MANAGER_custFromSourceList
,
"对应的来源描述错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"公域引流_查找客户"
,
priority
=
41
)
public
void
公域引流
_
查找客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"phoneNum"
,
"15136361301"
);
Response
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()"
);
Assert
.
assertEquals
(
custName
,
"自动化测试用户1"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名与填单时错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
companySize
,
3
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的产品组错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"批量分配客户"
,
priority
=
42
)
@Test
(
description
=
"批量分配客户"
,
priority
=
42
)
public
void
批量分配客户
(){
public
void
批量分配客户
(){
...
@@ -539,212 +517,7 @@ public class Manager implements Authorization {
...
@@ -539,212 +517,7 @@ public class Manager implements Authorization {
batchAssignSeller
(
3
,
EXPERT_ID
,
custids
,
"manage"
);
//批量分配给专家
batchAssignSeller
(
3
,
EXPERT_ID
,
custids
,
"manage"
);
//批量分配给专家
}
}
@Test
(
description
=
"单个分配客户"
,
priority
=
43
)
public
void
单个分配客户
(){
assignSeller
(
Manager
.
cust_id
+
2
,
23
,
false
,
1
,
"manage"
);
sleep
(
1000
);
assignSeller
(
Manager
.
cust_id
+
2
,
SELLER_ID
,
true
,
2
,
"manage"
);
sleep
(
1000
);
assignSeller
(
Manager
.
cust_id
+
2
,
INVITE_ID
,
true
,
1
,
"manage"
);
}
@Test
(
description
=
"搜索角色列表"
,
priority
=
44
)
public
void
搜索角色列表
(){
//邀约角色成功搜索到邀约成员
searchRole
(
"勿动-自动化测试邀约"
,
1
,
1
,
"manage"
);
//邀约角色不可搜索到销售成员
searchRole
(
"勿动-自动化测试带看"
,
1
,
0
,
"manage"
);
//邀约角色不可搜索到专家成员
searchRole
(
"勿动-自动化测试专家"
,
1
,
0
,
"manage"
);
//销售角色不可搜索到邀约成员
searchRole
(
"勿动-自动化测试邀约"
,
2
,
0
,
"manage"
);
//销售角色成功搜索到销售成员
searchRole
(
"勿动-自动化测试带看"
,
2
,
1
,
"manage"
);
//销售角色不可搜索到专家成员
searchRole
(
"勿动-自动化测试专家"
,
2
,
0
,
"manage"
);
//专家角色不可搜索到邀约成员
searchRole
(
"勿动-自动化测试邀约"
,
3
,
0
,
"manage"
);
//专家角色不可搜索到销售成员
searchRole
(
"勿动-自动化测试带看"
,
3
,
0
,
"manage"
);
//专家角色成功搜索到专家成员
searchRole
(
"勿动-自动化测试专家"
,
3
,
1
,
"manage"
);
//搜索不区分组织架构
searchRole
(
"专家"
,
3
,
5
,
"manage"
);
}
@Test
(
description
=
"修改客户标签"
,
priority
=
45
)
public
void
修改客户标签
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"tagIds"
,
new
int
[]{
22
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_tagUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_tagUpdate
,
"修改客户标签失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"客户标签更新"
,
priority
=
46
)
public
void
客户标签更新
(){
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageSize"
,
10
);
selectParams
.
put
(
"phoneNum"
,
"15136361300"
);
Response
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
int
tagSize
=
response
.
jsonPath
().
getInt
(
"data.list[0].tagNames.size()"
);
String
inviteName
=
response
.
jsonPath
().
getString
(
"data.list[0].inviteVo.sellerName"
);
String
sellerName
=
response
.
jsonPath
().
getString
(
"data.list[0].sellerVo.sellerName"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.list[0].expertVo.sellerName"
);
Assert
.
assertEquals
(
tagSize
,
1
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"修改客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
inviteName
,
"勿动-自动化测试邀约"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进邀约错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sellerName
,
"勿动-自动化测试带看"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进销售错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试专家"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进专家错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"批量给客户打标签"
,
priority
=
47
)
public
void
批量给客户打标签
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custIds"
,
custids
);
params
.
put
(
"tagIds"
,
new
int
[]{
20
,
24
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_tag_batchUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_tag_batchUpdate
,
"批量修改客户标签失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"批量客户标签更新"
,
priority
=
48
)
public
void
批量客户标签更新
(){
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageSize"
,
10
);
selectParams
.
put
(
"phoneNum"
,
"15136361300"
);
Response
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
int
tagSize
=
response
.
jsonPath
().
getInt
(
"data.list[0].tagNames.size()"
);
Assert
.
assertEquals
(
tagSize
,
3
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"批量打客户标签失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"跟进人筛选客户"
,
priority
=
49
)
public
void
跟进人筛选客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"otoSidList"
,
42
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"邀约人筛选结果错误"
,
response
.
body
().
asString
()));
params
.
put
(
"otoSidList"
,
284
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"专家筛选结果错误"
,
response
.
body
().
asString
()));
params
.
put
(
"otoSidList"
,
290
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"带看人筛选结果错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"标签列表"
,
priority
=
50
)
public
void
标签列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_tagList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
10
,
network
.
message
(
BasicConfig
.
MANAGER_tagList
,
"标签列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"角色列表"
,
priority
=
51
)
public
void
角色列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_roleList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_roleList
,
"角色列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"修改客户的产品组"
,
priority
=
52
)
public
void
修改客户产品组
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"companyIds"
,
new
int
[]{
5
,
6
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_customer_update
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_customer_update
,
"修改客户的产品组失败"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"phoneNum"
,
"15136361300"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()"
);
Assert
.
assertEquals
(
companySize
,
2
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的产品组错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询所有产品列表"
,
priority
=
53
)
public
void
查询所有产品列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_product_listAll
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_product_listAll
,
"查看产品列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询可导入的客户来源列表"
,
priority
=
54
)
public
void
查询可导入的客户来源列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_getCustSourceEnum
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
BasicConfig
.
MANAGER_getCustSourceEnum
,
"查看可导入的客户来源列表"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"导入客户文件并成功"
,
priority
=
55
)
public
void
导入客户文件
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyIds"
,
new
int
[]{
5
});
params
.
put
(
"source"
,
1
);
params
.
put
(
"fileName"
,
"自动化导入客户.xlsx"
);
params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20221114/1499deb6eb5222f02ab88facaa0db316.xlsx"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_importOtoCustomer
);
int
result
=
response
.
jsonPath
().
getInt
(
"data"
);
Assert
.
assertNotNull
(
result
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_importOtoCustomer
,
"启动导入客户程序失败"
,
response
.
body
().
asString
()));
params
.
clear
();
boolean
succecss
=
false
;
params
.
put
(
"taskId"
,
result
);
for
(
int
i
=
0
;
i
<
10
;
i
++){
sleep
(
1000
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_result
);
boolean
hasFinish
=
response
.
jsonPath
().
getBoolean
(
"data.hasFinish"
);
if
(
hasFinish
)
{
String
failureExcelUrl
=
response
.
jsonPath
().
getString
(
"data.failureExcelUrl"
);
int
successCount
=
response
.
jsonPath
().
getInt
(
"data.successCount"
);
Assert
.
assertNotNull
(
failureExcelUrl
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_result
,
"失败原因链接不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
successCount
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_result
,
"导入成功数量不为1"
,
response
.
body
().
asString
()));
succecss
=
true
;
break
;
}
}
Assert
.
assertTrue
(
succecss
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_result
,
"导入客户结果失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询导入的文件上传记录"
,
priority
=
56
)
public
void
查询导入的文件上传记录
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"taskType"
,
34
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
5
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_listForType
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_listForType
,
"查看导入文件上传记录为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"公域引流_查询问题详情"
,
priority
=
57
)
public
void
公域引流
_
查询问题详情
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"customerId"
,
cust_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_qaDetail
);;
int
answer
=
response
.
jsonPath
().
getInt
(
"data.list[0].optionTitles.size()"
);
Assert
.
assertTrue
(
answer
>
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_qaDetail
,
"问题详情为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"公域引流_创建标签"
,
priority
=
58
)
@Test
(
description
=
"公域引流_创建标签"
,
priority
=
58
)
public
void
公域引流
_
创建标签
(){
public
void
公域引流
_
创建标签
(){
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
a2471f8b
...
@@ -99,7 +99,7 @@ public class Phone implements Authorization {
...
@@ -99,7 +99,7 @@ public class Phone implements Authorization {
params
.
put
(
"custId"
,
customer_id
);
params
.
put
(
"custId"
,
customer_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listCustInterConf
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listCustInterConf
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_listCustInterConf
,
"见面场景列表数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
PHONE_listCustInterConf
,
"见面场景列表数量错误"
,
response
.
body
().
asString
()));
}
}
...
@@ -117,7 +117,7 @@ public class Phone implements Authorization {
...
@@ -117,7 +117,7 @@ public class Phone implements Authorization {
params
.
put
(
"custId"
,
customer_id
);
params
.
put
(
"custId"
,
customer_id
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listCustInterConf
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listCustInterConf
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
PHONE_listCustInterConf
,
"见面场景列表数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
PHONE_listCustInterConf
,
"见面场景列表数量错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"创建社区参观的面访"
,
priority
=
8
)
@Test
(
description
=
"创建社区参观的面访"
,
priority
=
8
)
...
@@ -717,8 +717,8 @@ public class Phone implements Authorization {
...
@@ -717,8 +717,8 @@ public class Phone implements Authorization {
@Test
(
description
=
"方案讲解历史更新"
,
priority
=
67
)
@Test
(
description
=
"方案讲解历史更新"
,
priority
=
67
)
public
void
方案讲解历史更新
(){
public
void
方案讲解历史更新
(){
get
SchemeNum
(
4
,
2
,
2
,
false
);
get
Tree
(
4
,
null
,
1
,
1
,
99
);
getSchemeList
(
3
,
2
,
0
);
getSchemeList
(
3
,
1
);
}
}
@Test
(
description
=
"查看我的日报为未提交"
,
priority
=
75
)
@Test
(
description
=
"查看我的日报为未提交"
,
priority
=
75
)
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
a2471f8b
...
@@ -43,25 +43,25 @@ public class Work implements Authorization {
...
@@ -43,25 +43,25 @@ public class Work implements Authorization {
menuList
(
4
);
menuList
(
4
);
otoTakerAuth
();
otoTakerAuth
();
menuList
(
2
);
menuList
(
3
);
otoExpertAuth
();
otoExpertAuth
();
menuList
(
2
);
menuList
(
3
);
otoAssistAuth
();
otoAssistAuth
();
menuList
(
10
);
menuList
(
10
);
otoLeaderAuth
();
otoLeaderAuth
();
menuList
(
1
1
);
menuList
(
1
2
);
otoPMAuth
();
otoPMAuth
();
menuList
(
12
);
menuList
(
12
);
otoAreaAuth
();
otoAreaAuth
();
menuList
(
1
0
);
menuList
(
1
1
);
otoManagerAuth
();
otoManagerAuth
();
menuList
(
19
);
menuList
(
20
);
}
}
@Test
(
description
=
"工作台_标签列表"
,
priority
=
5
)
@Test
(
description
=
"工作台_标签列表"
,
priority
=
5
)
...
@@ -138,7 +138,7 @@ public class Work implements Authorization {
...
@@ -138,7 +138,7 @@ public class Work implements Authorization {
params
.
put
(
"pageSize"
,
50
);
params
.
put
(
"pageSize"
,
50
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_inviterCustList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_inviterCustList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertEquals
(
size
,
6
,
network
.
message
(
params
,
BasicConfig
.
WORK_inviterCustList
,
"需要联系列表中首位客户非新增客户"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_inviterCustList
,
"需要联系列表中首位客户非新增客户"
,
response
.
body
().
asString
()));
followTimes
=
response
.
jsonPath
().
getInt
(
"data.list[0].followTimes"
);
followTimes
=
response
.
jsonPath
().
getInt
(
"data.list[0].followTimes"
);
Object
lastFollowTime
=
response
.
jsonPath
().
getJsonObject
(
"data.list[0].lastFollowTime"
);
Object
lastFollowTime
=
response
.
jsonPath
().
getJsonObject
(
"data.list[0].lastFollowTime"
);
...
@@ -884,16 +884,10 @@ public class Work implements Authorization {
...
@@ -884,16 +884,10 @@ public class Work implements Authorization {
@Test
(
description
=
"放弃客户进入回收池"
,
priority
=
65
)
@Test
(
description
=
"放弃客户进入回收池"
,
priority
=
65
)
public
void
放弃客户进入回收池
(){
public
void
放弃客户进入回收池
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
abandonCust
(
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"abandonReasonType"
,
3
);
params
.
put
(
"abandonRemark"
,
"放弃原因"
+
new
Date
());
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
()));
sleep
(
1000
);
sleep
(
1000
);
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticHeader
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticHeader
);
int
totalNum
=
response
.
jsonPath
().
getInt
(
"data.totalNum"
);
int
totalNum
=
response
.
jsonPath
().
getInt
(
"data.totalNum"
);
int
num
=
header
.
get
(
"totalNum"
);
int
num
=
header
.
get
(
"totalNum"
);
Assert
.
assertEquals
(
totalNum
,
num
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"客户总数未更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
totalNum
,
num
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"客户总数未更新"
,
response
.
body
().
asString
()));
...
@@ -902,7 +896,6 @@ public class Work implements Authorization {
...
@@ -902,7 +896,6 @@ public class Work implements Authorization {
response
=
network
.
getResponse
(
BasicConfig
.
WORK_coefficient_detail
);
response
=
network
.
getResponse
(
BasicConfig
.
WORK_coefficient_detail
);
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
,
coefficient
.
get
(
"totalCoefficient"
),
network
.
message
(
BasicConfig
.
WORK_coefficient_detail
,
"放弃客户销售总系数变化"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"放弃客户后重新激活进入预备池"
,
priority
=
66
)
@Test
(
description
=
"放弃客户后重新激活进入预备池"
,
priority
=
66
)
...
@@ -1038,7 +1031,7 @@ public class Work implements Authorization {
...
@@ -1038,7 +1031,7 @@ public class Work implements Authorization {
Response
response
=
network
.
postResponse
(
params
,
path
);
Response
response
=
network
.
postResponse
(
params
,
path
);
if
(
result
){
if
(
result
){
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
path
,
"
销售不同产品组分配客户成功
"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
path
,
"
分配客户失败
"
,
response
.
body
().
asString
()));
}
}
else
{
else
{
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
...
@@ -1062,4 +1055,14 @@ public class Work implements Authorization {
...
@@ -1062,4 +1055,14 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
tagName
,
tags
.
get
(
key
),
network
.
message
(
BasicConfig
.
WORK_tagList
,
"标签名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
tagName
,
tags
.
get
(
key
),
network
.
message
(
BasicConfig
.
WORK_tagList
,
"标签名称错误"
,
response
.
body
().
asString
()));
}
}
}
}
public
static
void
abandonCust
(
int
c_id
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
c_id
);
params
.
put
(
"abandonReasonType"
,
3
);
params
.
put
(
"abandonRemark"
,
"放弃原因"
+
new
Date
());
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
()));
}
}
}
src/test/java/com/oto/config/BasicConfig.java
View file @
a2471f8b
...
@@ -39,10 +39,15 @@ public class BasicConfig {
...
@@ -39,10 +39,15 @@ public class BasicConfig {
// 钉钉机器人 线上-告警群
// 钉钉机器人 线上-告警群
public
static
final
String
dingTalkPath
=
"https://oapi.dingtalk.com/robot/send?access_token=e6fc528a3a5991ba74d800c9b1688bf5e0f4f88864ec92da777f84c260181407"
;
public
static
final
String
dingTalkPath
=
"https://oapi.dingtalk.com/robot/send?access_token=e6fc528a3a5991ba74d800c9b1688bf5e0f4f88864ec92da777f84c260181407"
;
/*******OTO销售工作台*********/
/*******OTO销售工作台
-企微
*********/
public
static
final
String
OTO_INVITER_TKU
=
"4yrzAfNog7WE527NKCNmqBqph48N7mWR9J49QYysZmKYC3DF97hQFap7RphynF3GFXLhp7GFZ35mc"
;
public
static
final
String
OTO_INVITER_TKU
=
"4yrzAfNog7WE527NKCNmqBqph48N7mWR9J49QYysZmKYC3DF97hQFap7RphynF3GFXLhp7GFZ35mc"
;
public
static
final
String
OTO_TAKER_TKU
=
"7Fcuh7FWTsTHSpfadRRWCqckAq8hCnYnpu4ijNqaLqu6sqzpgJ9CDUyeRitqrvkwVt8JRMgKpmqq9oiGyqEmk5AbqpJo73W8Gh4uEjafWgfz9Xrr3BdAsTRZUojBpqm7VQyZbP6dS1UFdofCYaj5B497"
;
public
static
final
String
OTO_TAKER_TKU
=
"7Fcuh7FWTsTHSpfadRRWCqckAq8hCnYnpu4ijNqaLqu6sqzpgJ9CDUyeRitqrvkwVt8JRMgKpmqq9oiGyqEmk5AbqpJo73W8Gh4uEjafWgfz9Xrr3BdAsTRZUojBpqm7VQyZbP6dS1UFdofCYaj5B497"
;
public
static
final
String
OTO_EXPERT_TKU
=
"7Fcuh7FWTsTHSpfadRRWCqKfrLzGwUzSt2GyKaN2k4JGQDTqw8BwHhYw3TyqyaYEjXrPE6fkTN8KHHHhhFKnjdfEt8mmziXNdVKTpV1oLBfQVLsLG32XkcYgX9nHtUA3r9bYDRhQGQp1y4AumVyQFbxr"
;
public
static
final
String
OTO_EXPERT_TKU
=
"7Fcuh7FWTsTHSpfadRRWCqKfrLzGwUzSt2GyKaN2k4JGQDTqw8BwHhYw3TyqyaYEjXrPE6fkTN8KHHHhhFKnjdfEt8mmziXNdVKTpV1oLBfQVLsLG32XkcYgX9nHtUA3r9bYDRhQGQp1y4AumVyQFbxr"
;
/*******OTO销售工作台-个微*********/
public
static
final
String
WX_CUSTOMER_TKU
=
"3XE1uRL2Mq7DEPFFUMAtEgc1KZagjL4Bw7STUYA79h2mLaQExn9ji9MtuMqeigWxzYyLqGhdKFSWs18uFNXF74dZzMAuvJKHkLrc63b9erfkSoBQvM"
;
public
static
final
String
WX_EXPERT_TKU
=
"8WLT4bmESccxwWsdtyqvYAujdym8wr9EFgyuxyVTUn3bWkjBxCaRZ3Ab9Th23hEEHsVL89gYm26n7Eag4ZxYGhabwkN8voFamdmibepJZ7Jjinx"
;
public
static
final
String
WX_LEADER_TKU
=
"8WLT4bmESccxwWsdtyqvYGjw2btb5QStHynN3Wqird53MakwdEDu5aNZEnV3PdpvmxipZ4bVxD7bjZKdofEdP9XVWgdNfNF52Vw1qV2dsf7gWVe"
;
// *************** 客集集域名 ***************
// *************** 客集集域名 ***************
public
static
final
String
HOST
=
"https://kjj.m.duibatest.com.cn"
;
public
static
final
String
HOST
=
"https://kjj.m.duibatest.com.cn"
;
public
static
final
String
SSO_HOST
=
"https://sso.duibatest.com.cn"
;
public
static
final
String
SSO_HOST
=
"https://sso.duibatest.com.cn"
;
...
@@ -52,6 +57,7 @@ public class BasicConfig {
...
@@ -52,6 +57,7 @@ public class BasicConfig {
public
static
final
String
FORM_HOST
=
"https://kjj-static.duibatest.com.cn"
;
public
static
final
String
FORM_HOST
=
"https://kjj-static.duibatest.com.cn"
;
public
static
final
String
PHONE_HOST
=
"https://kjj-auth.duibatest.com.cn"
;
public
static
final
String
PHONE_HOST
=
"https://kjj-auth.duibatest.com.cn"
;
public
static
final
String
JiuJiuBao_HOST
=
"https://oto-mng.duibatest.com.cn"
;
public
static
final
String
JiuJiuBao_HOST
=
"https://oto-mng.duibatest.com.cn"
;
public
static
final
String
WX_HOST
=
"https://oto-web.duibatest.com.cn"
;
// *************** 管理后台 ***************
// *************** 管理后台 ***************
public
static
final
String
SSO_doLogin
=
SSO_HOST
+
"/doLogin"
;
public
static
final
String
SSO_doLogin
=
SSO_HOST
+
"/doLogin"
;
...
@@ -227,6 +233,15 @@ public class BasicConfig {
...
@@ -227,6 +233,15 @@ public class BasicConfig {
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_OA_submit
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/submit"
;
public
static
final
String
WORK_OA_tree
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/tree"
;
public
static
final
String
WORK_OA_audit
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/audit"
;
public
static
final
String
WORK_OA_getAuditNum
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/auditInfo/num/get"
;
public
static
final
String
WORK_OA_list
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/list"
;
public
static
final
String
WORK_OA_expertName
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/expertName"
;
public
static
final
String
WORK_OA_custName
=
WORK_HOST
+
"/kjy/oto/manager/report/oa/custName"
;
//*************************工作计划*****************************
//*************************工作计划*****************************
public
static
final
String
WORK_minimumDept
=
WORK_HOST
+
"/kjy/oto/manager/customer/minimum/dept/list"
;
public
static
final
String
WORK_minimumDept
=
WORK_HOST
+
"/kjy/oto/manager/customer/minimum/dept/list"
;
public
static
final
String
WORK_obtainCustBySellerId
=
WORK_HOST
+
"/kjy/oto/manager/customer/obtainCustBySellerId"
;
public
static
final
String
WORK_obtainCustBySellerId
=
WORK_HOST
+
"/kjy/oto/manager/customer/obtainCustBySellerId"
;
...
@@ -238,6 +253,13 @@ public class BasicConfig {
...
@@ -238,6 +253,13 @@ public class BasicConfig {
public
static
final
String
WORK_interviewAuditReject
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditReject"
;
public
static
final
String
WORK_interviewAuditReject
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditReject"
;
public
static
final
String
WORK_interviewAuditPass
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditPass"
;
public
static
final
String
WORK_interviewAuditPass
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditPass"
;
//*************************活动行事历***************************
public
static
final
String
WORK_saveActivity
=
WORK_HOST
+
"/kjy/oto/manager/task/calendar/save"
;
public
static
final
String
WORK_modifyActivity
=
WORK_HOST
+
"/kjy/oto/manager/task/calendar/modify"
;
public
static
final
String
WORK_cancelActivity
=
WORK_HOST
+
"/kjy/oto/manager/task/calendar/cancel"
;
public
static
final
String
WORK_listActivity
=
WORK_HOST
+
"/kjy/oto/manager/task/calendar/list"
;
public
static
final
String
WORK_detailActivity
=
WORK_HOST
+
"/kjy/oto/manager/task/calendar/detail"
;
//*************************客户盘点***************************
//*************************客户盘点***************************
public
static
final
String
WORK_liveSearch
=
WORK_HOST
+
"/kjy/oto/manager/customer/liveSearch"
;
public
static
final
String
WORK_liveSearch
=
WORK_HOST
+
"/kjy/oto/manager/customer/liveSearch"
;
public
static
final
String
WORK_roleSellerList
=
WORK_HOST
+
"/kjy/oto/manager/customer/roleSellerList"
;
public
static
final
String
WORK_roleSellerList
=
WORK_HOST
+
"/kjy/oto/manager/customer/roleSellerList"
;
...
@@ -315,7 +337,24 @@ public class BasicConfig {
...
@@ -315,7 +337,24 @@ public class BasicConfig {
public
static
final
String
PHONE_submitEvaluate
=
HOST
+
"/kjy/oto/interview/submitEvaluate"
;
public
static
final
String
PHONE_submitEvaluate
=
HOST
+
"/kjy/oto/interview/submitEvaluate"
;
public
static
final
String
WX_look
=
HOST
+
"/kjy/mp/oto/risk/invLetter/look"
;
public
static
final
String
WX_look
=
HOST
+
"/kjy/mp/oto/risk/invLetter/look"
;
public
static
final
String
WX_confirm
=
HOST
+
"/kjy/mp/oto/risk/invLetter/confirm"
;
public
static
final
String
WX_confirm
=
HOST
+
"/kjy/mp/oto/risk/invLetter/confirm"
;
//***********************销售工作台手机端**********************
//*************************销售工作台微信端********************************
public
static
final
String
WX_signDetail
=
WX_HOST
+
"/oto/activity/sign/detail"
;
public
static
final
String
WX_signSubmit
=
WX_HOST
+
"/oto/activity/sign/submit"
;
public
static
final
String
WX_sellerSubmitRecordList
=
WX_HOST
+
"/oto/seller/submitRecord/pageList"
;
public
static
final
String
otherDetailForSeller
=
WX_HOST
+
"/oto/seller/submitRecord/otherDetailForSeller"
;
public
static
final
String
WX_submitRecordDetail
=
WX_HOST
+
"/oto/seller/submitRecord/signDetail"
;
public
static
final
String
WX_checkSign
=
WX_HOST
+
"/oto/seller/submitRecord/checkSign"
;
public
static
final
String
WX_interviewConfigList
=
WX_HOST
+
"/oto/seller/submitRecord/interviewConfigList"
;
public
static
final
String
WX_custPhase
=
WX_HOST
+
"/oto/seller/submitRecord/custPhase"
;
public
static
final
String
WX_leaderList
=
WX_HOST
+
"/oto/seller/submitRecord/leaderList"
;
public
static
final
String
WX_leaderHeader
=
WX_HOST
+
"/oto/seller/submitRecord/leaderHeader"
;
public
static
final
String
WX_otherDetailForLeader
=
WX_HOST
+
"/oto/seller/submitRecord/otherDetailForLeader"
;
public
static
final
String
WX_deptList
=
WX_HOST
+
"/oto/seller/dept/minimum/list"
;
public
static
final
String
WX_searchCust
=
WX_HOST
+
"/oto/seller/submitRecord/searchCust"
;
public
static
final
String
WX_submitRecord
=
WX_HOST
+
"/oto/seller/submitRecord/submit"
;
//*************************销售工作台企微端**********************
public
static
final
String
PHONE_getCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/getCustPhase"
;
public
static
final
String
PHONE_getCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/getCustPhase"
;
public
static
final
String
PHONE_updateCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/updateCustPhase"
;
public
static
final
String
PHONE_updateCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/updateCustPhase"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
...
...
src/test/workTestNG.xml
View file @
a2471f8b
...
@@ -25,6 +25,12 @@
...
@@ -25,6 +25,12 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"PC_活动签到"
>
<classes>
<class
name=
"com.oto.cases.otoseller.Activity"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"PC_邀约承诺"
>
<test
preserve-order=
"true"
name=
"PC_邀约承诺"
>
<classes>
<classes>
<class
name=
"com.oto.cases.otoseller.Invite"
/>
<class
name=
"com.oto.cases.otoseller.Invite"
/>
...
...
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