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
e1fcc804
Commit
e1fcc804
authored
Mar 22, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3523be8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
15 deletions
+57
-15
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
+57
-15
No files found.
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
View file @
e1fcc804
...
...
@@ -149,18 +149,18 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert
.
assertTrue
(
data5
,
network
.
message
(
saveOrUpdate4Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE4
,
"问卷配置失败"
,
saveOrUpdate4Res
.
body
().
asString
()));
}
@Test
(
description
=
"代理人参与条件"
,
priority
=
9
)
public
void
代理人参与条件
()
{
Map
<
String
,
Object
>
saveAgentParticipateParam
=
new
HashMap
<>();
saveAgentParticipateParam
.
put
(
"liveId"
,
liveID
);
saveAgentParticipateParam
.
put
(
"inviteCount"
,
1
);
Response
saveAgentParticipateParamRes
=
network
.
postResponse
(
saveAgentParticipateParam
,
BasicConfig
.
MANAGER_SAVEAGENTPARTICIPATE
);
boolean
data6
=
saveAgentParticipateParamRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data6
);
Assert
.
assertTrue
(
data6
,
network
.
message
(
saveAgentParticipateParam
,
BasicConfig
.
MANAGER_SAVEAGENTPARTICIPATE
,
"代理人参与条件配置失败"
,
saveAgentParticipateParamRes
.
body
().
asString
()));
}
//
@Test(description = "代理人参与条件", priority = 9)
//
public void 代理人参与条件() {
//
//
Map<String, Object> saveAgentParticipateParam = new HashMap<>();
//
saveAgentParticipateParam.put("liveId", liveID);
//
saveAgentParticipateParam.put("inviteCount", 1);
//
//
Response saveAgentParticipateParamRes = network.postResponse(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE);
//
boolean data6 = saveAgentParticipateParamRes.jsonPath().getBoolean("data");
//
System.out.println(data6);
//
Assert.assertTrue(data6, network.message(saveAgentParticipateParam, BasicConfig.MANAGER_SAVEAGENTPARTICIPATE, "代理人参与条件配置失败", saveAgentParticipateParamRes.body().asString()));
//
}
@Test
(
description
=
"指定中奖奖品"
,
priority
=
10
)
public
void
指定中奖奖品
()
{
...
...
@@ -170,6 +170,9 @@ public class SaveAndUpdate implements AdminAuthorization {
saveSpecifyAwardParam
.
put
(
"specifyAwardType"
,
1
);
//1:统一采购,2:自行准备
saveSpecifyAwardParam
.
put
(
"totalCount"
,
5
);
saveSpecifyAwardParam
.
put
(
"unitPrice"
,
2990
);
saveSpecifyAwardParam
.
put
(
"maxCanSpecifyCount"
,
0
);
saveSpecifyAwardParam
.
put
(
"privilegeScope"
,
1
);
saveSpecifyAwardParam
.
put
(
"inviteCount"
,
1
);
saveSpecifyAwardParam
.
put
(
"welfareConfId"
,
192
);
Response
saveSpecifyAwardRes
=
network
.
postResponse
(
saveSpecifyAwardParam
,
BasicConfig
.
MANAGER_SAVESPECIFYAWARD
);
...
...
@@ -324,15 +327,54 @@ public class SaveAndUpdate implements AdminAuthorization {
public
void
直播中抽奖
()
{
Map
<
String
,
Object
>
add1Param
=
new
HashMap
<>();
add1Param
.
put
(
"liveId"
,
liveID
);
add1Param
.
put
(
"interactNum"
,
10
);
add1Param
.
put
(
"showInteractNum"
,
10
);
add1Param
.
put
(
"interactNum"
,
10
0
);
add1Param
.
put
(
"showInteractNum"
,
10
0
);
add1Param
.
put
(
"welfareId"
,
191
);
add1Param
.
put
(
"afterMin"
,
1
0
);
add1Param
.
put
(
"afterMin"
,
2
0
);
Response
add1Res
=
network
.
postResponse
(
add1Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data
=
add1Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
add1Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add1Res
.
body
().
asString
()));
Map
<
String
,
Object
>
add2Param
=
new
HashMap
<>();
add2Param
.
put
(
"liveId"
,
liveID
);
add2Param
.
put
(
"interactNum"
,
100
);
add2Param
.
put
(
"showInteractNum"
,
100
);
add2Param
.
put
(
"welfareId"
,
192
);
add2Param
.
put
(
"afterMin"
,
30
);
Response
add2Res
=
network
.
postResponse
(
add2Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data1
=
add2Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertNotNull
(
data1
,
network
.
message
(
add2Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add2Res
.
body
().
asString
()));
Map
<
String
,
Object
>
add3Param
=
new
HashMap
<>();
add3Param
.
put
(
"liveId"
,
liveID
);
add3Param
.
put
(
"interactNum"
,
100
);
add3Param
.
put
(
"showInteractNum"
,
100
);
add3Param
.
put
(
"welfareId"
,
193
);
add3Param
.
put
(
"afterMin"
,
35
);
Response
add3Res
=
network
.
postResponse
(
add3Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data2
=
add3Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data2
);
Assert
.
assertNotNull
(
data2
,
network
.
message
(
add3Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add3Res
.
body
().
asString
()));
Map
<
String
,
Object
>
add4Param
=
new
HashMap
<>();
add4Param
.
put
(
"liveId"
,
liveID
);
add4Param
.
put
(
"interactNum"
,
100
);
add4Param
.
put
(
"showInteractNum"
,
100
);
add4Param
.
put
(
"welfareId"
,
194
);
add4Param
.
put
(
"afterMin"
,
40
);
Response
add4Res
=
network
.
postResponse
(
add4Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data3
=
add4Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data3
);
Assert
.
assertNotNull
(
data3
,
network
.
message
(
add4Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add4Res
.
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