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
c69e1157
Commit
c69e1157
authored
Sep 23, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20210922-xmc' into 'master'
Feature/20210922 xmc See merge request test-group/kejiji!124
parents
0e76e9a5
a02fe834
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
175 additions
and
23 deletions
+175
-23
Agent.java
src/test/java/com/kjj/cases/live/agent/Agent.java
+169
-21
InviteReward.java
...st/java/com/kjj/cases/live/inviteReward/InviteReward.java
+2
-2
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+4
-0
No files found.
src/test/java/com/kjj/cases/live/agent/Agent.java
View file @
c69e1157
...
@@ -34,6 +34,7 @@ public class Agent implements Authorization {
...
@@ -34,6 +34,7 @@ public class Agent implements Authorization {
public
String
teamName
;
public
String
teamName
;
public
String
sellerName
;
public
String
sellerName
;
public
static
String
encodeAgentId
;
public
static
String
encodeAgentId
;
public
static
String
encodeTeamId
;
@BeforeClass
@BeforeClass
public
void
setUp
()
{
agentAuth
();
}
public
void
setUp
()
{
agentAuth
();
}
...
@@ -47,6 +48,7 @@ public class Agent implements Authorization {
...
@@ -47,6 +48,7 @@ public class Agent implements Authorization {
Assert
.
assertNotNull
(
jobNumber
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_userInfo1
,
"用户非代理人"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
jobNumber
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_userInfo1
,
"用户非代理人"
,
response
.
body
().
asString
()));
encodeAgentId
=
response
.
jsonPath
().
getString
(
"data.agentId"
);
encodeAgentId
=
response
.
jsonPath
().
getString
(
"data.agentId"
);
encodeTeamId
=
response
.
jsonPath
().
getString
(
"data.teamId"
);
}
}
...
@@ -88,7 +90,7 @@ public class Agent implements Authorization {
...
@@ -88,7 +90,7 @@ public class Agent implements Authorization {
@Test
(
description
=
"修改代理人信息"
,
priority
=
5
)
@Test
(
description
=
"修改代理人信息"
,
priority
=
5
)
public
void
修改代理人信息
()
{
public
void
修改代理人信息
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"sellerName"
,
"小智"
+
RandomUtils
.
nextInt
(
1
,
100
));
params
.
put
(
"sellerName"
,
"小智"
+
RandomUtils
.
nextInt
(
1
,
100
));
params
.
put
(
"phoneNumber"
,
"152588101691"
);
params
.
put
(
"phoneNumber"
,
"152588101691"
);
params
.
put
(
"jobNumber"
,
"KJJ0000"
);
params
.
put
(
"jobNumber"
,
"KJJ0000"
);
params
.
put
(
"wechatQrCode"
,
"//yun.dui88.com/kjy/nc/qrcode1/1981ec88d22fe37041feac4724c627670817.png"
);
params
.
put
(
"wechatQrCode"
,
"//yun.dui88.com/kjy/nc/qrcode1/1981ec88d22fe37041feac4724c627670817.png"
);
...
@@ -301,23 +303,58 @@ public class Agent implements Authorization {
...
@@ -301,23 +303,58 @@ public class Agent implements Authorization {
* 排行榜
* 排行榜
*/
*/
// 代理人给自己点赞
@Test
(
description
=
"个人排行榜点赞"
,
priority
=
19
)
public
void
个人排行榜点赞
()
{
Map
<
String
,
Object
>
agentLikePar
=
new
HashMap
<>();
agentLikePar
.
put
(
"agentId"
,
encodeAgentId
);
agentLikePar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
agentLikePar
.
put
(
"action"
,
1
);
Response
agentLikeRes
=
network
.
postResponse
(
agentLikePar
,
MOBILE_agentLike
);
try
{
boolean
data
=
agentLikeRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
agentLikePar
,
MOBILE_agentLike
,
"点赞失败"
,
agentLikeRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
agentLikePar
,
MOBILE_agentLike
,
"获取数据失败"
,
agentLikeRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"团队排行榜点赞"
,
priority
=
20
)
public
void
团队排行榜点赞
()
{
Map
<
String
,
Object
>
teamLikePar
=
new
HashMap
<>();
teamLikePar
.
put
(
"teamId"
,
encodeTeamId
);
teamLikePar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
teamLikePar
.
put
(
"action"
,
1
);
Response
teamLikeRes
=
network
.
postResponse
(
teamLikePar
,
MOBILE_teamLike
);
try
{
boolean
data
=
teamLikeRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
teamLikePar
,
MOBILE_teamLike
,
"点赞失败"
,
teamLikeRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
teamLikePar
,
MOBILE_teamLike
,
"获取数据失败"
,
teamLikeRes
.
body
().
asString
()));
}
}
//个人榜单
//个人榜单
public
String
invitationNum
;
public
String
invitationNum
;
@Test
(
description
=
"获取代理人自己的榜单信息"
,
priority
=
18
)
@Test
(
description
=
"获取代理人自己的榜单信息"
,
priority
=
21
)
public
void
获取代理人自己的榜单信息
()
{
public
void
获取代理人自己的榜单信息
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentOwnCharts
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentOwnCharts
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
invitationNum
=
response
.
jsonPath
().
getString
(
"data.invitationNum"
);
invitationNum
=
response
.
jsonPath
().
getString
(
"data.invitationNum"
);
int
likeNum
=
response
.
jsonPath
().
getInt
(
"data.likeNum"
);
System
.
out
.
println
(
"success="
+
success
+
",invitationNum="
+
invitationNum
);
System
.
out
.
println
(
"success="
+
success
+
",invitationNum="
+
invitationNum
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentOwnCharts
,
"获取代理人自己的榜单信息"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentOwnCharts
,
"获取代理人自己的榜单信息"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
invitationNum
,
network
.
message
(
MOBILE_AgentOwnCharts
,
"获取代理人自己榜单内的邀请人数失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
invitationNum
,
network
.
message
(
MOBILE_AgentOwnCharts
,
"获取代理人自己榜单内的邀请人数失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
likeNum
,
1
,
network
.
message
(
params
,
MOBILE_AgentOwnCharts
,
"代理人获赞数错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"所有榜单的奖品列表"
,
priority
=
19
)
@Test
(
description
=
"所有榜单的奖品列表"
,
priority
=
22
)
public
void
所有榜单的奖品列表
(){
public
void
所有榜单的奖品列表
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -327,20 +364,48 @@ public class Agent implements Authorization {
...
@@ -327,20 +364,48 @@ public class Agent implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_allRewardList
,
"所有榜单的奖品列表获取失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_allRewardList
,
"所有榜单的奖品列表获取失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取排行榜页面个人榜单"
,
priority
=
2
0
)
@Test
(
description
=
"获取排行榜页面个人榜单"
,
priority
=
2
3
)
public
void
获取排行榜页面个人榜单
(){
public
void
获取排行榜页面个人榜单
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentPersonalCharts
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentPersonalCharts
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
data
);
List
<
Map
<
String
,
Object
>>
agents
=
null
;
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentPersonalCharts
,
"获取个人榜单失败"
,
response
.
body
().
asString
()));
boolean
hasTarget
=
false
;
try
{
agents
=
response
.
jsonPath
().
getList
(
"data.list"
);
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
params
,
MOBILE_AgentPersonalCharts
,
"获取数据失败"
,
response
.
body
().
asString
()));
}
for
(
Map
<
String
,
Object
>
agent
:
agents
){
if
(
agent
.
get
(
"agentId"
).
equals
(
encodeAgentId
)){
int
isLike
=
(
int
)
agent
.
get
(
"isLike"
);
Assert
.
assertEquals
(
isLike
,
1
,
network
.
message
(
params
,
MOBILE_AgentPersonalCharts
,
"点赞状态错误"
,
response
.
body
().
asString
()));
}
}
}
@Test
(
description
=
"获取赞我的人"
,
priority
=
24
)
public
void
获取赞我的人
()
{
Map
<
String
,
Object
>
likeMeFriendPar
=
new
HashMap
<>();
likeMeFriendPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
likeMeFriendRes
=
network
.
getResponse
(
likeMeFriendPar
,
MOBILE_likeMeFriend
);
System
.
out
.
println
(
likeMeFriendRes
.
body
().
asString
());
try
{
List
<
Map
<
String
,
Object
>>
friends
=
likeMeFriendRes
.
jsonPath
().
getList
(
"data.list"
);
String
friendName
=
(
String
)
friends
.
get
(
0
).
get
(
"nickName"
);
Assert
.
assertEquals
(
friendName
,
"小智8"
,
network
.
message
(
likeMeFriendPar
,
MOBILE_likeMeFriend
,
"最近赞我的朋友昵称错误"
,
likeMeFriendRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
likeMeFriendPar
,
MOBILE_likeMeFriend
,
"获取数据失败"
,
likeMeFriendRes
.
body
().
asString
()));
}
}
}
@Test
(
description
=
"代理人直播间公司统计"
,
priority
=
2
1
)
@Test
(
description
=
"代理人直播间公司统计"
,
priority
=
2
5
)
public
void
代理人直播间公司统计
(){
public
void
代理人直播间公司统计
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -355,7 +420,7 @@ public class Agent implements Authorization {
...
@@ -355,7 +420,7 @@ public class Agent implements Authorization {
* 团队榜
* 团队榜
*/
*/
@Test
(
description
=
"自己所在团队的榜单"
,
priority
=
2
2
)
@Test
(
description
=
"自己所在团队的榜单"
,
priority
=
2
6
)
public
void
自己所在团队的榜单
(){
public
void
自己所在团队的榜单
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -363,33 +428,116 @@ public class Agent implements Authorization {
...
@@ -363,33 +428,116 @@ public class Agent implements Authorization {
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ownTeamCharts
,
"自己所在团队的榜单获取失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ownTeamCharts
,
"自己所在团队的榜单获取失败"
,
response
.
body
().
asString
()));
int
likeNum
=
response
.
jsonPath
().
getInt
(
"data.likeNum"
);
Assert
.
assertEquals
(
likeNum
,
1
,
network
.
message
(
params
,
MOBILE_ownTeamCharts
,
"获赞数量不对"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取排行榜页面团队榜单"
,
priority
=
2
3
)
@Test
(
description
=
"获取排行榜页面团队榜单"
,
priority
=
2
7
)
public
void
获取排行榜页面团队榜单
(){
public
void
获取排行榜页面团队榜单
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
List
<
String
>
list
=
response
.
jsonPath
().
getList
(
"data.list.teamName
"
);
List
<
Map
<
String
,
Object
>>
lists
=
response
.
jsonPath
().
getList
(
"data.list
"
);
System
.
out
.
println
(
"-------"
+
list
.
size
());
System
.
out
.
println
(
"-------"
+
list
s
.
size
());
for
(
String
name:
list
){
for
(
Map
<
String
,
Object
>
list
:
lists
){
System
.
out
.
println
(
"success="
+
success
+
",teamName="
+
name
);
System
.
out
.
println
(
"success="
+
success
+
",teamName="
+
list
.
get
(
"teamName"
)
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
,
"获取团队榜单失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
,
"获取团队榜单失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
name
,
network
.
message
(
MOBILE_TeamTeamCharts
,
"榜单内团队名称获取失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
list
.
get
(
"teamName"
),
network
.
message
(
MOBILE_TeamTeamCharts
,
"榜单内团队名称获取失败"
,
response
.
body
().
asString
()));
if
(
list
.
get
(
"teamId"
).
equals
(
encodeTeamId
)){
int
isLike
=
(
int
)
list
.
get
(
"isLike"
);
Assert
.
assertEquals
(
isLike
,
1
,
network
.
message
(
params
,
MOBILE_TeamTeamCharts
,
"点赞状态错误"
,
response
.
body
().
asString
()));
}
}
}
@Test
(
description
=
"获取赞我团队的朋友列表"
,
priority
=
28
)
public
void
获取赞我团队的朋友列表
()
{
Map
<
String
,
Object
>
likeMyTeamPar
=
new
HashMap
<>();
likeMyTeamPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
likeMyTeamPar
.
put
(
"teamId"
,
encodeTeamId
);
Response
likeMyTeamRes
=
network
.
getResponse
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
);
try
{
List
<
Map
<
String
,
Object
>>
friends
=
likeMyTeamRes
.
jsonPath
().
getList
(
"data.list"
);
String
name
=
(
String
)
friends
.
get
(
0
).
get
(
"nickName"
);
Assert
.
assertEquals
(
name
,
"小智8"
,
network
.
message
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
,
"最近赞我团队的朋友昵称错误"
,
likeMyTeamRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
,
"获取数据失败"
,
likeMyTeamRes
.
body
().
asString
()));
}
}
}
// 取消点赞
@Test
(
description
=
"取消对自己的点赞"
,
priority
=
29
)
public
void
取消对自己的点赞
()
{
Map
<
String
,
Object
>
agentLikePar
=
new
HashMap
<>();
agentLikePar
.
put
(
"agentId"
,
encodeAgentId
);
agentLikePar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
agentLikePar
.
put
(
"action"
,
0
);
Response
agentLikeRes
=
network
.
postResponse
(
agentLikePar
,
MOBILE_agentLike
);
try
{
boolean
data
=
agentLikeRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
agentLikePar
,
MOBILE_agentLike
,
"取消点赞失败"
,
agentLikeRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
agentLikePar
,
MOBILE_agentLike
,
"获取数据失败"
,
agentLikeRes
.
body
().
asString
()));
}
// 检查是否取消成功
// 赞我的朋友数量为0
Map
<
String
,
Object
>
likeMeFriendPar
=
new
HashMap
<>();
likeMeFriendPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
likeMeFriendRes
=
network
.
getResponse
(
likeMeFriendPar
,
MOBILE_likeMeFriend
);
System
.
out
.
println
(
likeMeFriendRes
.
body
().
asString
());
try
{
List
<
Map
<
String
,
Object
>>
friends
=
likeMeFriendRes
.
jsonPath
().
getList
(
"data.list"
);
Assert
.
assertEquals
(
friends
.
size
(),
0
,
network
.
message
(
likeMeFriendPar
,
MOBILE_likeMeFriend
,
"赞我的朋友数量不为0"
,
likeMeFriendRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
likeMeFriendPar
,
MOBILE_likeMeFriend
,
"获取数据失败"
,
likeMeFriendRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"取消对自己团队的点赞"
,
priority
=
30
)
public
void
取消对自己团队的点赞
()
{
Map
<
String
,
Object
>
teamLikePar
=
new
HashMap
<>();
teamLikePar
.
put
(
"teamId"
,
encodeTeamId
);
teamLikePar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
teamLikePar
.
put
(
"action"
,
0
);
Response
teamLikeRes
=
network
.
postResponse
(
teamLikePar
,
MOBILE_teamLike
);
try
{
boolean
data
=
teamLikeRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
teamLikePar
,
MOBILE_teamLike
,
"点赞失败"
,
teamLikeRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
teamLikePar
,
MOBILE_teamLike
,
"获取数据失败"
,
teamLikeRes
.
body
().
asString
()));
}
// 检查是否取消成功
Map
<
String
,
Object
>
likeMyTeamPar
=
new
HashMap
<>();
likeMyTeamPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
likeMyTeamPar
.
put
(
"teamId"
,
encodeTeamId
);
Response
likeMyTeamRes
=
network
.
getResponse
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
);
try
{
List
<
Map
<
String
,
Object
>>
friends
=
likeMyTeamRes
.
jsonPath
().
getList
(
"data.list"
);
Assert
.
assertEquals
(
friends
.
size
(),
0
,
network
.
message
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
,
"赞我团队的朋友数量不为0"
,
likeMyTeamRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
,
"获取数据失败"
,
likeMyTeamRes
.
body
().
asString
()));
}
}
}
// 获取队内榜;
// 获取队内榜;
@Test
(
description
=
"获取队内榜"
,
priority
=
24
)
@Test
(
description
=
"获取队内榜"
,
priority
=
31
)
public
void
获取队内榜
(){
public
void
获取队内榜
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -400,7 +548,7 @@ public class Agent implements Authorization {
...
@@ -400,7 +548,7 @@ public class Agent implements Authorization {
}
}
@Test
(
description
=
"获取个人队内榜单"
,
priority
=
25
)
@Test
(
description
=
"获取个人队内榜单"
,
priority
=
32
)
public
void
获取个人队内榜单
()
{
public
void
获取个人队内榜单
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -420,7 +568,7 @@ public class Agent implements Authorization {
...
@@ -420,7 +568,7 @@ public class Agent implements Authorization {
/**
/**
* 邀约
* 邀约
*/
*/
@Test
(
description
=
"获取代理人是否有邀请权限"
,
priority
=
26
)
@Test
(
description
=
"获取代理人是否有邀请权限"
,
priority
=
33
)
public
void
获取代理人是否有邀请权限
()
{
public
void
获取代理人是否有邀请权限
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -433,7 +581,7 @@ public class Agent implements Authorization {
...
@@ -433,7 +581,7 @@ public class Agent implements Authorization {
// 获取代理人直播海报信息;
// 获取代理人直播海报信息;
@Test
(
description
=
"获取代理人直播海报信息"
,
priority
=
27
)
@Test
(
description
=
"获取代理人直播海报信息"
,
priority
=
34
)
public
void
获取代理人直播海报信息
()
{
public
void
获取代理人直播海报信息
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -444,7 +592,7 @@ public class Agent implements Authorization {
...
@@ -444,7 +592,7 @@ public class Agent implements Authorization {
}
}
@Test
(
description
=
"获取小程序短链"
,
priority
=
28
)
@Test
(
description
=
"获取小程序短链"
,
priority
=
35
)
public
void
获取小程序短链
()
{
public
void
获取小程序短链
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
src/test/java/com/kjj/cases/live/inviteReward/InviteReward.java
View file @
c69e1157
...
@@ -59,7 +59,7 @@ public class InviteReward implements Authorization {
...
@@ -59,7 +59,7 @@ public class InviteReward implements Authorization {
}
}
@Test
(
description
=
"代理人开红包"
,
priority
=
4
)
@Test
(
description
=
"代理人开红包"
,
priority
=
4
)
public
void
代理人开红包
(){
public
void
代理人开红包
(){
ThreadSleepUtils
.
sleep
(
720000
);
//
ThreadSleepUtils.sleep(720000);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
postResponse
(
params
,
MOBILE_rewardUserOpen
);
Response
response
=
network
.
postResponse
(
params
,
MOBILE_rewardUserOpen
);
...
@@ -87,7 +87,7 @@ public class InviteReward implements Authorization {
...
@@ -87,7 +87,7 @@ public class InviteReward implements Authorization {
@Test
(
description
=
"代理人B开红包详情"
,
priority
=
7
)
@Test
(
description
=
"代理人B开红包详情"
,
priority
=
7
)
public
void
代理人
B
开红包详情
(){
public
void
代理人
B
开红包详情
(){
agentAuth1
();
agentAuth1
();
ThreadSleepUtils
.
sleep
(
1
000
);
ThreadSleepUtils
.
sleep
(
2
000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
MOBILE_rewardOpenState
);
Response
response
=
network
.
getResponse
(
params
,
MOBILE_rewardOpenState
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
c69e1157
...
@@ -521,6 +521,10 @@ public class BasicConfig {
...
@@ -521,6 +521,10 @@ public class BasicConfig {
public
static
final
String
MOBILE_companyTotalData
=
MOBILE_HOST
+
"/kjy/live/team/companyTotalData"
;
public
static
final
String
MOBILE_companyTotalData
=
MOBILE_HOST
+
"/kjy/live/team/companyTotalData"
;
public
static
final
String
MOBILE_ownTeamCharts
=
MOBILE_HOST
+
"/kjy/live/team/ownTeamCharts"
;
public
static
final
String
MOBILE_ownTeamCharts
=
MOBILE_HOST
+
"/kjy/live/team/ownTeamCharts"
;
public
static
final
String
MOBILE_ownChartsInTeam
=
MOBILE_HOST
+
"/kjy/live/agent/ownChartsInTeam"
;
public
static
final
String
MOBILE_ownChartsInTeam
=
MOBILE_HOST
+
"/kjy/live/agent/ownChartsInTeam"
;
public
static
final
String
MOBILE_agentLike
=
MOBILE_HOST
+
"/kjy/live/agent/agentLike"
;
public
static
final
String
MOBILE_teamLike
=
MOBILE_HOST
+
"/kjy/live/team/teamLike"
;
public
static
final
String
MOBILE_likeMeFriend
=
MOBILE_HOST
+
"/kjy/live/agent/likeMeFriends"
;
public
static
final
String
MOBILE_likeMyTeamFriends
=
MOBILE_HOST
+
"/kjy/live/team/likeMyTeamFriends"
;
public
static
final
String
MANAGER_CompanyVideoList
=
MANAGER_HOST
+
"/kjy/manager/live/company/video/list"
;
public
static
final
String
MANAGER_CompanyVideoList
=
MANAGER_HOST
+
"/kjy/manager/live/company/video/list"
;
...
...
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