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
04d76684
Commit
04d76684
authored
Jul 21, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新直播前客户统计
parent
5d1764d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
16 deletions
+45
-16
Agent.java
src/test/java/com/kjj/cases/live/agent/Agent.java
+14
-1
LiveBefore.java
src/test/java/com/kjj/cases/live/agent/LiveBefore.java
+25
-12
DesignatedWinner.java
...est/java/com/kjj/cases/live/lottery/DesignatedWinner.java
+6
-3
No files found.
src/test/java/com/kjj/cases/live/agent/Agent.java
View file @
04d76684
...
...
@@ -416,8 +416,20 @@ public class Agent implements Authorization {
/**
* 邀约
*/
@Test
(
description
=
"获取代理人是否有邀请权限"
,
priority
=
26
)
public
void
获取代理人是否有邀请权限
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
MOBILE_hasInviteAuth
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_hasInviteAuth
,
"代理人没有邀请权限"
,
response
.
body
().
asString
()));
}
// 获取代理人直播海报信息;
@Test
(
description
=
"获取代理人直播海报信息"
,
priority
=
2
6
)
@Test
(
description
=
"获取代理人直播海报信息"
,
priority
=
2
7
)
public
void
获取代理人直播海报信息
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -429,6 +441,7 @@ public class Agent implements Authorization {
}
}
...
...
src/test/java/com/kjj/cases/live/agent/LiveBefore.java
View file @
04d76684
...
...
@@ -14,12 +14,25 @@ import java.util.Map;
public
class
LiveBefore
implements
Authorization
{
@BeforeClass
public
void
setUp
()
{
agentAuth
();
}
public
void
setUp
()
{
agentAuth
();
}
public
String
pageSize
;
@Test
(
description
=
"直播前客户数量统计"
,
priority
=
1
)
public
void
直播前客户数量统计
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_customerStat
);
System
.
out
.
println
(
response
.
body
().
asString
());
int
allNum
=
response
.
jsonPath
().
getInt
(
"data.allNum"
);
Assert
.
assertTrue
(
allNum
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_customerStat
,
"客户总数为null"
,
response
.
body
().
asString
()));
int
newCustomNum
=
response
.
jsonPath
().
getInt
(
"data.newCustomNum"
);
Assert
.
assertTrue
(
newCustomNum
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_customerStat
,
"新客户数量未null"
,
response
.
body
().
asString
()));
int
oldCustomNum
=
response
.
jsonPath
().
getInt
(
"data.oldCustomNum"
);
Assert
.
assertTrue
(
oldCustomNum
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_customerStat
,
"老客户数量未null"
,
response
.
body
().
asString
()));
}
//直播前我的客户页面
// 获取直播前我的客户页面全部tab;
@Test
(
description
=
"获取直播前我的客户页面全部tab数据"
,
priority
=
1
)
public
void
获取直播前我的客户页面全部
tab
数据
()
{
...
...
@@ -28,9 +41,9 @@ public class LiveBefore implements Authorization {
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assert
True
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
,
"获取直播前全部tab下数据失败"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
response
.
body
().
asString
()
);
Object
list
=
response
.
jsonPath
().
getJsonObject
(
"data.list"
);
Assert
.
assert
NotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
,
"获取直播前全部tab下数据失败"
,
response
.
body
().
asString
()));
}
// 获取直播前我的客户页面直接邀请tab;
...
...
@@ -42,9 +55,9 @@ public class LiveBefore implements Authorization {
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"directly"
,
1
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assert
True
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
,
"获取直播前我的客户页面直接邀请tab数据失败"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
response
.
body
().
asString
()
);
Object
list
=
response
.
jsonPath
().
getJsonObject
(
"data.list"
);
Assert
.
assert
NotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
,
"获取直播前我的客户页面直接邀请tab数据失败"
,
response
.
body
().
asString
()));
}
// 获取直播前我的客户页面转介绍tab;
...
...
@@ -56,9 +69,9 @@ public class LiveBefore implements Authorization {
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"directly"
,
0
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assert
True
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
,
"获取直播前我的客户页面转介绍tab数据失败"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
response
.
body
().
asString
()
);
Object
list
=
response
.
jsonPath
().
getJsonObject
(
"data.list"
);
Assert
.
assert
NotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_MyCustomerList
,
"获取直播前我的客户页面转介绍tab数据失败"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/lottery/DesignatedWinner.java
View file @
04d76684
...
...
@@ -309,9 +309,12 @@ public class DesignatedWinner implements Authorization {
Map
<
String
,
Object
>
AwardInfoParam
=
new
HashMap
<>();
AwardInfoParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
AAwardInfoRes
=
network
.
getResponse
(
AwardInfoParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardInfo
);
Object
data
=
AAwardInfoRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
AwardInfoParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardInfo
,
"查询指定中奖信息失败"
,
AAwardInfoRes
.
body
().
asString
()));
System
.
out
.
println
(
AAwardInfoRes
.
body
().
asString
());
boolean
specifyAwardConfEnable
=
AAwardInfoRes
.
jsonPath
().
getBoolean
(
"data.specifyAwardConfEnable"
);
Assert
.
assertTrue
(
specifyAwardConfEnable
,
network
.
message
(
AwardInfoParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardInfo
,
"指定中奖配置未开启"
,
AAwardInfoRes
.
body
().
asString
()));
int
agentSpecifyCount
=
AAwardInfoRes
.
jsonPath
().
getInt
(
"data.agentSpecifyCount"
);
Assert
.
assertTrue
(
agentSpecifyCount
==
1
,
network
.
message
(
AwardInfoParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardInfo
,
"指定数量未null"
,
AAwardInfoRes
.
body
().
asString
()));
}
...
...
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