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
ed043666
Commit
ed043666
authored
Aug 20, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加亲友抽奖券的代码
parent
75b3d8cc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
RelativeLottery.java
...test/java/com/kjj/cases/live/lottery/RelativeLottery.java
+39
-1
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+4
-3
No files found.
src/test/java/com/kjj/cases/live/lottery/RelativeLottery.java
View file @
ed043666
package
com
.
kjj
.
cases
.
live
.
lottery
;
import
com.kjj.bean.lottery.ConfIdList
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.JsonUtil
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
public
class
RelativeLottery
implements
Authorization
{
public
List
<
ConfIdList
>
List_ConfId
;
public
String
shareSign
;
public
class
RelativeLottery
{
@BeforeClass
public
void
setUp
(){
agentAuth
();
}
@Test
(
description
=
"代理人查询抽奖奖品列表"
,
priority
=
1
)
public
void
查询抽奖奖品列表
()
{
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
getLiveAwardListRes
=
network
.
getResponse
(
getLiveAwardListParam
,
USER_getLiveAwardList
);
List
<
ConfIdList
>
list
=
JsonUtil
.
parseResponseToListBean
(
getLiveAwardListRes
,
ConfIdList
.
class
);
System
.
out
.
println
(
list
);
this
.
List_ConfId
=
list
;
Assert
.
assertNotNull
(
list
,
network
.
message
(
getLiveAwardListParam
,
USER_getLiveAwardList
,
"抽奖标记为false"
,
getLiveAwardListRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询亲友配置开启状态"
,
priority
=
2
)
public
void
查询亲友配置开启状态
()
{
visitorAuth9
();
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_allLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
int
fissionLotteryConfStatus
=
response
.
jsonPath
().
getInt
(
"data.fissionLotteryConfStatus"
);
Assert
.
assertEquals
(
fissionLotteryConfStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_allLottery
,
"亲友配置券未开启"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
ed043666
...
...
@@ -274,9 +274,10 @@ public class BasicConfig {
public
static
final
String
MOBILE_popupDetail
=
MOBILE_HOST
+
"/kjy/live/auth/popup/detail"
;
// *************** 亲友抽奖券 ***************
public
static
final
String
MANAGER_relativeLottery
=
MOBILE_HOST
+
"/kjy/manager/fission/lottery/saveOrUpdate"
;
public
static
final
String
MANAGER_detailLottery
=
MOBILE_HOST
+
"/kjy/manager/fission/lottery/detail"
;
public
static
final
String
MANAGER_switchStatusLottery
=
MOBILE_HOST
+
"/kjy/manager/fission/lottery/switchStatus"
;
public
static
final
String
MANAGER_relativeLottery
=
MANAGER_HOST
+
"/kjy/manager/fission/lottery/saveOrUpdate"
;
public
static
final
String
MANAGER_detailLottery
=
MANAGER_HOST
+
"/kjy/manager/fission/lottery/detail"
;
public
static
final
String
MANAGER_switchStatusLottery
=
MANAGER_HOST
+
"/kjy/manager/fission/lottery/switchStatus"
;
public
static
final
String
MOBILE_allLottery
=
MOBILE_HOST
+
"kjy/live/pre/conf/all"
;
// *************** 时长宝箱 ***************
public
static
final
String
MANAGER_list1
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/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