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
dbf34a58
Commit
dbf34a58
authored
Aug 31, 2021
by
郭姣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代理人参与有奖答题,有奖答题优化接口配置修改
parent
9420e1bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
23 deletions
+7
-23
Answer.java
src/test/java/com/kjj/cases/live/answer/Answer.java
+7
-23
No files found.
src/test/java/com/kjj/cases/live/answer/Answer.java
View file @
dbf34a58
...
...
@@ -229,27 +229,6 @@ public class Answer implements Authorization {
//访客端
/*查询访客端有奖答题配置详情*/
@Test
(
description
=
"邀请访客A关系绑定"
,
priority
=
9
)
public
void
访客
A
绑定
()
{
visitorAuth9
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"邀请访客A3关系绑定"
,
priority
=
10
)
public
void
访客
A3
绑定
()
{
visitorAuth3
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"代理人关系绑定"
,
priority
=
11
)
public
void
代理人关系绑定
()
{
agentAuth
();
...
...
@@ -1234,6 +1213,7 @@ public class Answer implements Authorization {
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
this
.
quesConfId
.
get
(
6
).
getQuesConfId
());
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_QuesRewardUp
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesRewardUp
,
"上架答题红包失败"
,
response
.
body
().
asString
()));
...
...
@@ -1248,6 +1228,8 @@ public class Answer implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
this
.
quesConfId
.
get
(
6
).
getQuesConfId
());
// params.put("liveId","Kj21NDU2NzE");
// params.put("confId",this.quesConfId.get(10).getQuesConfId());
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_QuesRewardStart
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
...
...
@@ -1292,6 +1274,7 @@ public class Answer implements Authorization {
boolean
result
=
response
.
jsonPath
().
getBoolean
(
"data.result"
);
System
.
out
.
println
(
result
);
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesParticipate
,
"领取答题红包失败"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
response
.
body
().
asString
());
}
@Test
(
description
=
"代理人领取第四轮答题红包结果"
,
priority
=
67
)
...
...
@@ -1310,7 +1293,7 @@ public class Answer implements Authorization {
Object
amount
=
response
.
jsonPath
().
getJsonObject
(
"data.amount"
);
System
.
out
.
println
(
amount
);
Assert
.
assertNotNull
(
amount
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesParticipateInfo
,
"领取失败"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
response
.
body
().
asString
());
}
/*上架主播端未发放的有奖答题-福利*/
@Test
(
description
=
"上架第四轮答题福利"
,
priority
=
68
)
...
...
@@ -1358,7 +1341,7 @@ public class Answer implements Authorization {
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesDetail
,
"查询第四轮福利失败"
,
response
.
body
().
asString
()));
//校验该题目是否允许邀请,0为不支持
System
.
out
.
println
(
response
);
System
.
out
.
println
(
response
.
body
().
asString
()
);
boolean
supportInvite
=
response
.
jsonPath
().
getBoolean
(
"data.supportInvite"
);
System
.
out
.
println
(
supportInvite
);
Assert
.
assertFalse
(
supportInvite
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesDetail
,
"不支持邀请配置有误"
,
response
.
body
().
asString
()));
...
...
@@ -1393,5 +1376,6 @@ public class Answer implements Authorization {
Integer
welfareStatus
=
response
.
jsonPath
().
getJsonObject
(
"data.welfareStatus"
);
System
.
out
.
println
(
welfareStatus
);
Assert
.
assertTrue
(
welfareStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesParticipateInfo
,
"领取异常"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
response
.
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