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
91e2ce3e
Commit
91e2ce3e
authored
Jul 29, 2021
by
xiamengchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增我的客户
parent
e5dde0b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
181 deletions
+55
-181
ForwardAndRead.java
...java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
+0
-58
MyCustomer.java
...est/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
+27
-78
MyForward.java
...test/java/com/kjj/cases/assistant/whoSawMe/MyForward.java
+0
-1
WhoSawMe.java
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
+28
-44
No files found.
src/test/java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
View file @
91e2ce3e
...
...
@@ -60,64 +60,6 @@ public class ForwardAndRead implements Authorization {
Assert
.
assertTrue
(
forwardResult
,
network
.
message
(
param
,
BasicConfig
.
FORWARD
,
"转发名片失败"
,
response
.
body
().
asString
()));
}
// @Test(description = "代理人转发抽奖", priority = 3)
// public void 转发抽奖() throws IOException{
// // 获取抽奖素材ID
// lottery_scId = getContentScId(BasicConfig.LOTTERY_CONTENTID);
//
// // 获取指定中奖客户信息
// Map<String, String> custInfos = new HashMap<>();
// custInfos.put("avatar", getUserInfo(BasicConfig.AGENT_TKU).get("avatar"));
// custInfos.put("visitorId", encodeId(decodeTku(BasicConfig.AGENT_TKU).get("userId")));
// custInfos.put("visitorNickname", getUserInfo(BasicConfig.AGENT_TKU).get("wxName"));
//
// // 指定客户中奖
// List<Object> winners = new ArrayList<>();
// winners.add(custInfos);
// param = new HashMap<>();
// param.put("scid", lottery_scId);
// param.put("winners", winners);
// response = network.postResponse(param, BasicConfig.LOTTERRY_addWinnersEn);
// String winnerId = response.jsonPath().getString("data[0].winnerId");
// Assert.assertNotNull(winnerId, network.message(param, BasicConfig.LOTTERRY_addWinnersEn, "添加中奖客户失败", response.body().asString()));
//
// // 保存抽奖配置
// List<String> winnerIds = new ArrayList<>();
// winnerIds.add(winnerId);
// Map<String, Object> prizeDetails = new HashMap<>();
// prizeDetails.put("customPrizeRate", 100);
// prizeDetails.put("customPrizeType", 1);
// prizeDetails.put("prizeImg", "https://yun.duiba.com.cn/kjj-prize-nodeimages/redbag.png");
// prizeDetails.put("prizeName", "奖品红包");
// prizeDetails.put("totalStock", 1);
// prizeDetails.put("winnerIds", winnerIds);
//
// param = new HashMap<>();
// param.put("pageTitle", "暖心冬日好礼");
// param.put("prizeDetails", prizeDetails);
// param.put("scid", lottery_scId);
// response = network.postResponse(param, BasicConfig.LOTTERRY_saveOrUpdateConf);
// activityConfId = response.jsonPath().getString("data");
// Assert.assertNotNull(activityConfId, network.message(param, BasicConfig.LOTTERRY_saveOrUpdateConf, "抽奖配置保存失败,未生成活动ID", response.body().asString()));
//
// // 获取配置详情
// param = new HashMap<>();
// param.put("scid", lottery_scId);
// param.put("activityConfId", activityConfId);
// response = network.getResponse(param, BasicConfig.LOTTERRY_getConf);
// activityCustomPrizeId = response.jsonPath().getString("data.prizeDetails[0].activityCustomPrizeId");
// Assert.assertEquals(response.jsonPath().getString("data.activityConfId"), activityConfId, network.message(param, BasicConfig.LOTTERRY_getConf, "获取配置与预期不对应", response.body().asString()));
// Assert.assertNotNull(activityCustomPrizeId, network.message(param, BasicConfig.LOTTERRY_getConf, "activityCustomPrizeId值为空", response.body().asString()));
//
// // 分享抽奖
// param = new HashMap<>();
// param.put("scId", lottery_scId);
// param.put("forwardType", 1);
// response = network.getResponse(param, BasicConfig.FORWARD);
// Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARD, "接口请求失败", response.body().asString()));
// Assert.assertTrue(response.jsonPath().getBoolean("data"), network.message(param, BasicConfig.FORWARD, "分享抽奖活动失败", response.body().asString()));
// }
// 访客访问素材及产生线索
@Test
(
description
=
"访客阅读文章"
,
priority
=
3
)
public
void
访客阅读文章
()
throws
IOException
{
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
View file @
91e2ce3e
package
com
.
kjj
.
cases
.
assistant
.
whoSawMe
;
import
com.jogamp.common.util.ArrayHashSet
;
import
com.kjj.bean.whoSawMe.ChatList
;
import
com.kjj.bean.whoSawMe.CustFavorite
;
import
com.kjj.bean.whoSawMe.LinkList
;
...
...
@@ -32,7 +33,6 @@ public class MyCustomer implements Authorization {
private
long
visitor1UserId
;
private
String
sessionId
;
private
int
visitCount
;
private
Long
timeStamp
;
private
String
id
;
// 自定义提醒事项id
@BeforeClass
...
...
@@ -234,67 +234,34 @@ public class MyCustomer implements Authorization {
}
// 我的客户首页_获取客户列表_筛选客户
@Test
(
description
=
"客户列表_七日活跃"
,
priority
=
12
)
public
void
客户列表
_
七日活跃
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"activeType"
,
1
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"sortType"
,
3
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
CUSTOMERSEARCH
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"接口请求失败"
,
response
.
body
().
asString
()));
List
<
Object
>
lists
=
response
.
jsonPath
().
getList
(
"data.list"
);
Assert
.
assertTrue
(
lists
.
size
()
>=
1
,
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"七日活跃客户数为0"
,
response
.
body
().
asString
()));
}
// 我的客户首页_获取客户列表_筛选客户
@Test
(
description
=
"客户列表_直接转发"
,
priority
=
13
)
public
void
客户列表
_
直接转发
()
throws
IOException
{
@Test
(
description
=
"客户列表_好友转发"
,
priority
=
14
)
public
void
客户列表
_
好友转发
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"custOrigin"
,
1
);
param
.
put
(
"custOrigin"
,
2
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"sortType"
,
3
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
CUSTOMERSEARCH
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"接口请求失败"
,
response
.
body
().
asString
()));
L
ist
<
Object
>
lists
=
response
.
jsonPath
().
getList
(
"data.list
"
);
Assert
.
assert
True
(
lists
.
size
()
>=
1
,
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"直接转发客户数为0
"
,
response
.
body
().
asString
()));
L
ong
custUserId
=
response
.
jsonPath
().
getLong
(
"data.list[0].userId
"
);
Assert
.
assert
Equals
(
custUserId
,
far
.
decodeTku
(
BasicConfig
.
VISITOR1_TKU
).
get
(
"userId"
),
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"好友转发的访客userId与预期不一致
"
,
response
.
body
().
asString
()));
}
// 我的客户首页_获取客户列表_筛选客户
@Test
(
description
=
"客户列表_好友转发"
,
priority
=
14
)
public
void
客户列表
_
好友转发
()
throws
IOException
{
// 客户列表_标签
@Test
(
description
=
"客户列表_标签"
,
priority
=
31
)
public
void
客户列表
_
标签
()
throws
IOException
{
List
<
String
>
tagIds
=
new
ArrayList
<>();
tagIds
.
add
(
createTagId
);
param
=
new
HashMap
<>();
param
.
put
(
"custOrigin"
,
2
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"sortType"
,
3
);
param
.
put
(
"tagIds"
,
tagIds
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
CUSTOMERSEARCH
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"接口请求失败"
,
response
.
body
().
asString
()));
Long
custUserId
=
response
.
jsonPath
().
getLong
(
"data.list[0].userId"
);
Assert
.
assertEquals
(
custUserId
,
far
.
decodeTku
(
BasicConfig
.
VISITOR1_TKU
).
get
(
"userId"
),
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"好友转发的访客userId与预期不一致"
,
response
.
body
().
asString
()));
long
userId
=
response
.
jsonPath
().
getLong
(
"data.list[0].sellerId"
);
Assert
.
assertEquals
(
userId
,
visitor1UserId
,
network
.
message
(
param
,
BasicConfig
.
CUSTOMERSEARCH
,
"筛选结果与预期不符"
,
response
.
body
().
asString
()));
}
// // 我的客户首页_搜索客户
// @Test(description = "搜索客户", priority = 15)
// public void 客户列表_搜索客户() throws IOException{
// param = new HashMap<>();
// // 获取用户微信昵称
// network.agentCookies.put("tku", BasicConfig.VISITOR_TKU);
// response = network.getResponse(BasicConfig.USER_INFO);
// String customerName = response.jsonPath().getString("data.wxName");
//
// // 代理人搜索客户
// network.agentCookies.put("tku", BasicConfig.VISITOR2_TKU);
// param.put("content", customerName);
// param.put("pageIndex", 1);
// param.put("pageSize", 20);
// response = network.getResponse(param, BasicConfig.SEARCHCUSTOMERBYCONTENT);
// Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.SEARCHCUSTOMERBYCONTENT, "接口请求失败", response.body().asString()));
// List<Object> cusLists = response.jsonPath().getList("data.list");
// Assert.assertTrue(cusLists.size() > 0, network.message(param, BasicConfig.SEARCHCUSTOMERBYCONTENT, "查询无匹配结果", response.body().asString()));
// }
// 客户详情页_头部信息栏
@Test
(
description
=
"客户详情页_头部信息栏"
,
priority
=
16
)
public
void
客户详情页
_
头部信息栏
()
throws
IOException
{
...
...
@@ -373,17 +340,6 @@ public class MyCustomer implements Authorization {
Assert
.
assertTrue
(
drawPresentInsuranceCount
>=
1
,
network
.
message
(
param
,
BasicConfig
.
CLUESTATISTICS
,
"客户领取赠险次数小于1"
,
response
.
body
().
asString
()));
}
// // 客户详情页_人脉统计
// @Test(description = "客户详情页_人脉统计", priority = 20)
// public void 客户详情页_人脉统计() throws IOException{
// param = new HashMap<>();
// param.put("custUserId", far.decodeTku(BasicConfig.VISITOR_TKU).get("userId"));
// response = network.getResponse(param, BasicConfig.CUSTRELATION);
// Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.CUSTRELATION, "接口请求失败", response.body().asString()));
// int num = response.jsonPath().getInt("data.num");
// Assert.assertTrue(num >= 1, network.message(param, BasicConfig.CUSTRELATION, "客户人脉统计数量小于1", response.body().asString()));
// }
// 客户详情页_线索统计
@Test
(
description
=
"客户详情页_线索统计"
,
priority
=
21
)
public
void
客户详情页
_
线索统计
()
throws
IOException
{
...
...
@@ -406,7 +362,6 @@ public class MyCustomer implements Authorization {
param
.
put
(
"custUserId"
,
visitor1UserId
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
CUSTREADPERFERENCE
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CUSTREADPERFERENCE
,
"接口请求失败"
,
response
.
body
().
asString
()));
}
// 客户详情页_来访记录
...
...
@@ -520,7 +475,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户管理_自定义提醒事项
@Test
(
description
=
"客户信息_客户管理_自定义提醒事项"
,
priority
=
3
1
)
@Test
(
description
=
"客户信息_客户管理_自定义提醒事项"
,
priority
=
3
2
)
public
void
客户信息
_
客户管理
_
自定义提醒事项
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"remindContent"
,
"自定义提醒"
);
...
...
@@ -549,7 +504,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户管理_修改提醒事项
@Test
(
description
=
"客户信息_客户管理_修改提醒事项"
,
priority
=
3
2
)
@Test
(
description
=
"客户信息_客户管理_修改提醒事项"
,
priority
=
3
3
)
public
void
客户信息
_
客户管理
_
修改提醒事项
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"id"
,
id
);
...
...
@@ -575,7 +530,7 @@ public class MyCustomer implements Authorization {
}
//客户信息_客户管理_删除自定义提醒
@Test
(
description
=
"客户信息_客户管理_删除自定义提醒"
,
priority
=
3
3
)
@Test
(
description
=
"客户信息_客户管理_删除自定义提醒"
,
priority
=
3
4
)
public
void
客户信息
_
客户管理
_
删除自定义提醒
()
throws
IOException
{
// 删除待提醒事件
param
=
new
HashMap
<>();
...
...
@@ -607,7 +562,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户管理_生日提醒
@Test
(
description
=
"客户信息_客户管理_生日提醒"
,
priority
=
3
4
)
@Test
(
description
=
"客户信息_客户管理_生日提醒"
,
priority
=
3
5
)
public
void
客户信息
_
客户管理
_
生日提醒
()
throws
IOException
{
String
userId
=
String
.
valueOf
(
visitor1UserId
);
// 开启生日提醒
...
...
@@ -643,7 +598,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户管理_节日提醒
@Test
(
description
=
"客户信息_客户管理_节日提醒"
,
priority
=
3
5
)
@Test
(
description
=
"客户信息_客户管理_节日提醒"
,
priority
=
3
6
)
public
void
客户信息
_
客户管理
_
节日提醒
()
throws
IOException
{
String
userId
=
String
.
valueOf
(
visitor1UserId
);
// 开启节日提醒
...
...
@@ -676,7 +631,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户关系链_统计信息
@Test
(
description
=
"客户信息_客户关系链_统计信息"
,
priority
=
3
6
)
@Test
(
description
=
"客户信息_客户关系链_统计信息"
,
priority
=
3
7
)
public
void
客户信息
_
客户关系链
_
统计信息
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"custUserId"
,
far
.
decodeTku
(
BasicConfig
.
AGENT_TKU
).
get
(
"userId"
));
...
...
@@ -686,7 +641,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户关系链_人脉列表
@Test
(
description
=
"客户信息_客户关系链_人脉列表"
,
priority
=
3
7
)
@Test
(
description
=
"客户信息_客户关系链_人脉列表"
,
priority
=
3
8
)
public
void
客户信息
_
客户关系链
_
人脉列表
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"custUserId"
,
far
.
decodeTku
(
BasicConfig
.
AGENT_TKU
).
get
(
"userId"
));
...
...
@@ -699,7 +654,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户关系链_邀请排行
@Test
(
description
=
"客户信息_客户关系链_邀请排行"
,
priority
=
3
8
)
@Test
(
description
=
"客户信息_客户关系链_邀请排行"
,
priority
=
3
9
)
public
void
客户信息
_
客户关系链
_
邀请排行
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"type"
,
2
);
...
...
@@ -711,7 +666,7 @@ public class MyCustomer implements Authorization {
}
//客户信息_更多资料
@Test
(
description
=
"客户信息_更多资料"
,
priority
=
39
)
@Test
(
description
=
"客户信息_更多资料"
,
priority
=
40
)
public
void
客户信息
_
更多资料
()
throws
IOException
{
// 更新资料信息
List
<
Object
>
baseMaterial
=
new
ArrayList
<>();
...
...
@@ -753,7 +708,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_留言
@Test
(
description
=
"客户详情页_留言"
,
priority
=
4
0
)
@Test
(
description
=
"客户详情页_留言"
,
priority
=
4
1
)
public
void
客户详情页
_
留言
()
throws
IOException
{
// 判断销售员是否首次访问新功能(留言)
param
=
new
HashMap
<>();
...
...
@@ -764,7 +719,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_留言_发送消息
@Test
(
description
=
"客户详情页_留言_发送消息"
,
priority
=
4
1
)
@Test
(
description
=
"客户详情页_留言_发送消息"
,
priority
=
4
2
)
public
void
客户详情页
_
留言
_
发送消息
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"content"
,
"Hello"
);
...
...
@@ -775,7 +730,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_留言_聊天内容
@Test
(
description
=
"客户详情页_留言_聊天内容"
,
priority
=
4
2
)
@Test
(
description
=
"客户详情页_留言_聊天内容"
,
priority
=
4
3
)
public
void
客户详情页
_
留言
_
聊天内容
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"pageSize"
,
30
);
...
...
@@ -797,7 +752,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_留言_留言对象是否关注公众号
@Test
(
description
=
"客户详情页_留言_留言对象是否关注公众号"
,
priority
=
4
3
)
@Test
(
description
=
"客户详情页_留言_留言对象是否关注公众号"
,
priority
=
4
4
)
public
void
客户详情页
_
留言
_
留言对象是否关注公众号
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"targetSid"
,
far
.
decodeTku
(
BasicConfig
.
VISITOR2_TKU
).
get
(
"sellerId"
));
...
...
@@ -806,12 +761,6 @@ public class MyCustomer implements Authorization {
Assert
.
assertEquals
(
subscribe
,
1
,
network
.
message
(
param
,
BasicConfig
.
CHAT_GETSUBSCRIBESTATUS
,
"判断用户是否关注公众号失败"
,
response
.
body
().
asString
()));
}
// // 客户详情页_留言_用户回复
// @Test(description = "客户详情页_留言_用户回复", priority = 44)
// public void 客户详情页_留言_用户回复() throws IOException{
//
// }
public
Long
roundUpToGetCurrentTimestamp
(){
// 向上取整获取当前时间戳(半小时为单位)
Date
current
=
new
Date
();
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/MyForward.java
View file @
91e2ce3e
...
...
@@ -4,7 +4,6 @@ import com.kjj.cases.admin.Authorization;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.apache.groovy.json.internal.IO
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
View file @
91e2ce3e
...
...
@@ -262,8 +262,8 @@ public class WhoSawMe implements Authorization {
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
BOSS_ROLE
,
"接口请求失败"
,
response
.
body
().
asString
()));
boolean
hasSubordinate
=
response
.
jsonPath
().
getBoolean
(
"data.hasSubordinate"
);
int
teamNumber
=
response
.
jsonPath
().
getInt
(
"data.teamNumber"
);
Assert
.
assertTrue
(
hasSubordinate
,
network
.
message
(
param
,
BasicConfig
.
BOSS_ROLE
,
"
用户
查询无下级"
,
response
.
body
().
asString
()));
Assert
.
assert
True
(
teamNumber
>=
2
,
network
.
message
(
param
,
BasicConfig
.
BOSS_ROLE
,
"代理人团队人数有误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
hasSubordinate
,
network
.
message
(
param
,
BasicConfig
.
BOSS_ROLE
,
"
代理人
查询无下级"
,
response
.
body
().
asString
()));
Assert
.
assert
Equals
(
teamNumber
,
2
,
network
.
message
(
param
,
BasicConfig
.
BOSS_ROLE
,
"代理人团队人数有误"
,
response
.
body
().
asString
()));
}
// 代理人团队成员数
...
...
@@ -274,48 +274,31 @@ public class WhoSawMe implements Authorization {
response
=
network
.
getResponse
(
param
,
BasicConfig
.
TEAMMEMBERNUM
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
TEAMMEMBERNUM
,
"接口请求失败"
,
response
.
body
().
asString
()));
int
personalNum
=
response
.
jsonPath
().
getInt
(
"data.personalNum"
);
Assert
.
assertTrue
(
personalNum
>=
2
,
network
.
message
(
param
,
BasicConfig
.
TEAMMEMBERNUM
,
"代理人团队人数有误"
,
response
.
body
().
asString
()));
}
// // 获取今日团队数据
// @Test(description = "获取今日团队数据", priority = 21)
// public void 获取今日团队数据() throws IOException{
// param = new HashMap<>();
// param.put("superiorId", xxxSellerId);
// param.put("sortType", 4);
// param.put("team", false);
// response = network.getResponse(param, BasicConfig.TEAMDATA);
// Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.TEAMDATA, "接口请求失败", response.body().asString()));
// int forwardMaterialNum = response.jsonPath().getInt("data.forwardMaterialNum");
// int forwardCardNum = response.jsonPath().getInt("data.forwardCardNum");
// int gainSaleClueNum = response.jsonPath().getInt("data.gainSaleClueNum");
// Assert.assertEquals(forwardCardNum, 4, network.message(param, BasicConfig.TEAMDATA, "转发卡片数量不为1", response.body().asString()));
// Assert.assertEquals(forwardMaterialNum, 4, network.message(param, BasicConfig.TEAMDATA, "转发素材数量不为1", response.body().asString()));
// Assert.assertEquals(gainSaleClueNum, 8, network.message(param, BasicConfig.TEAMDATA, "获得线索数量不为2", response.body().asString()));
// }
// // 获取个人排行列表
// @Test(description = "获取个人排行列表", priority = 22)
// public void 获取个人排行列表() throws IOException{
// param= new HashMap<>();
// param.put("pageIndex", 1);
// param.put("pageSize", 20);
// param.put("sortType", 4);
// param.put("superiorId", xxxSellerId);
// param.put("listType", 4);
// param.put("team", false);
// response = network.getResponse(param, BasicConfig.TEAMRANKINGLIST);
// Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.TEAMRANKINGLIST, "接口请求失败", response.body().asString()));
// List<RankingList> rankingLists = JsonUtil.parseResponseToPageBean(response, RankingList.class);
// List<String> memberSids = Lists.newArrayList();
// memberSids.add(far.encodeId(xxxSellerId));
// memberSids.add(far.encodeId(far.decodeTku(BasicConfig.AGENT_TKU).get("sellerId")));
// Assert.assertTrue(rankingLists.size() >= 2, network.message(param, BasicConfig.TEAMRANKINGLIST, "排行榜人员数有误", response.body().asString()));
// for (int i = 0; i < rankingLists.size(); i++){
// boolean isExist = memberSids.contains(rankingLists.get(i).getSellerId());
// Assert.assertTrue(isExist, network.message(param, BasicConfig.TEAMRANKINGLIST, "排行榜内成员sid有误", response.body().asString()));
// }
// }
Assert
.
assertEquals
(
personalNum
,
2
,
network
.
message
(
param
,
BasicConfig
.
TEAMMEMBERNUM
,
"代理人团队人数有误"
,
response
.
body
().
asString
()));
}
// 获取个人排行列表
@Test
(
description
=
"获取个人排行列表"
,
priority
=
22
)
public
void
获取个人排行列表
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"sortType"
,
4
);
param
.
put
(
"superiorId"
,
xxxSellerId
);
param
.
put
(
"listType"
,
4
);
param
.
put
(
"team"
,
false
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
TEAMRANKINGLIST
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
TEAMRANKINGLIST
,
"接口请求失败"
,
response
.
body
().
asString
()));
List
<
RankingList
>
rankingLists
=
JsonUtil
.
parseResponseToPageBean
(
response
,
RankingList
.
class
);
List
<
String
>
memberSids
=
Lists
.
newArrayList
();
memberSids
.
add
(
far
.
encodeId
(
xxxSellerId
));
memberSids
.
add
(
far
.
encodeId
(
far
.
decodeTku
(
BasicConfig
.
AGENT_TKU
).
get
(
"sellerId"
)));
Assert
.
assertTrue
(
rankingLists
.
size
()
>=
2
,
network
.
message
(
param
,
BasicConfig
.
TEAMRANKINGLIST
,
"排行榜人员数有误"
,
response
.
body
().
asString
()));
for
(
int
i
=
0
;
i
<
rankingLists
.
size
();
i
++){
boolean
isExist
=
memberSids
.
contains
(
rankingLists
.
get
(
i
).
getSellerId
());
Assert
.
assertTrue
(
isExist
,
network
.
message
(
param
,
BasicConfig
.
TEAMRANKINGLIST
,
"排行榜内成员sid有误"
,
response
.
body
().
asString
()));
}
}
// 团队任务
...
...
@@ -399,6 +382,7 @@ public class WhoSawMe implements Authorization {
response
=
network
.
getResponse
(
param
,
BasicConfig
.
BOSS_TEAMTASKLIST
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
BOSS_TEAMTASKLIST
,
"接口请求失败"
,
response
.
body
().
asString
()));
}
// 查看今日转发素材列表
@Test
(
description
=
"查看今日转发素材列表"
,
priority
=
29
)
public
void
查看转发素材列表
()
throws
IOException
{
...
...
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