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
b8f87874
Commit
b8f87874
authored
Sep 26, 2021
by
郭姣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除首页公司专区的ID变更
parent
c69e1157
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
293 additions
and
184 deletions
+293
-184
RedLevelBean.java
src/test/java/com/kjj/bean/manager/RedLevelBean.java
+11
-0
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+98
-4
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+4
-0
liveTestNG.xml
src/test/liveTestNG.xml
+180
-180
No files found.
src/test/java/com/kjj/bean/manager/RedLevelBean.java
0 → 100644
View file @
b8f87874
package
com
.
kjj
.
bean
.
manager
;
import
lombok.Data
;
@Data
public
class
RedLevelBean
{
private
int
amount
;
private
int
num
;
}
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
b8f87874
package
com
.
kjj
.
cases
.
live
.
flipCard
;
import
com.kjj.bean.manager.RedLevelBean
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
...
...
@@ -108,6 +109,99 @@ public class FlipCard implements Authorization {
}
*/
@Test
(
description
=
"保存翻牌配置"
,
priority
=
1
)
public
void
保存翻牌配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
//Params.put("liveId",6441);
Params
.
put
(
"freeNum"
,
3
);
Params
.
put
(
"helpNum"
,
1
);
List
<
RedLevelBean
>
RedLevels
=
new
ArrayList
<>();
RedLevelBean
redLevel1
=
new
RedLevelBean
();
redLevel1
.
setAmount
(
30
);
//红包金额为0.3
redLevel1
.
setNum
(
1
);
//红包数量
RedLevels
.
add
(
redLevel1
);
//红包等级I
RedLevelBean
redLevel2
=
new
RedLevelBean
();
redLevel2
.
setAmount
(
40
);
//红包金额为0.4
redLevel2
.
setNum
(
1
);
//红包数量
RedLevels
.
add
(
redLevel2
);
//红包等级II
Params
.
put
(
"stepReds"
,
RedLevels
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveOrUpdateV2
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveOrUpdateV2
,
"保存翻牌配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"开启翻牌配置"
,
priority
=
2
)
public
void
开启翻牌配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
//Params.put("liveId",6441);
Params
.
put
(
"confStatus"
,
2
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_wordSwitchStatus
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordSwitchStatus
,
"开启翻牌配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"编辑红包等级"
,
priority
=
3
)
public
void
编辑红包等级
(){
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
//Params.put("liveId",6451);
Params
.
put
(
"freeNum"
,
3
);
Params
.
put
(
"helpNum"
,
1
);
List
<
RedLevelBean
>
RedLevels
=
new
ArrayList
<>();
RedLevelBean
redLevel1
=
new
RedLevelBean
();
redLevel1
.
setAmount
(
50
);
//红包金额为0.5
redLevel1
.
setNum
(
1
);
//红包数量
RedLevels
.
add
(
redLevel1
);
//红包等级III
Params
.
put
(
"stepReds"
,
RedLevels
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveOrUpdateV2
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveOrUpdateV2
,
"编辑翻牌红包等级失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看直播翻牌配置详情"
,
priority
=
4
)
public
void
查看直播翻牌配置详情
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
//Params.put("liveId",6439);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_detailV2
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
redConfId
=
response
.
jsonPath
().
getString
(
"data.stepReds.get(2).redConfId"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
redConfId
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_detailV2
,
"查看直播翻牌配置详情失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"删除红包等级"
,
priority
=
5
)
public
void
删除红包等级
(){
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
//Params.put("liveId",6439);
Params
.
put
(
"redConfId"
,
redConfId
);
//Params.put("redConfId",28877);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_wordDelete
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
String
desc
=
response
.
jsonPath
().
getString
(
"desc"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordDelete
,
"删除红包等级失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
desc
,
"OK"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordDelete
,
"删除红包等级失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看直播配置"
,
priority
=
6
)
public
void
查看直播配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
//Params.put("liveId",6439);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
);
boolean
flipWordConfBuildStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfBuildStatus"
);
System
.
out
.
println
(
flipWordConfBuildStatus
);
Assert
.
assertTrue
(
flipWordConfBuildStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置翻牌"
,
response
.
body
().
asString
()));
boolean
flipWordConfStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfStatus"
);
System
.
out
.
println
(
flipWordConfStatus
);
Assert
.
assertTrue
(
flipWordConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未开启翻牌"
,
response
.
body
().
asString
()));
}
//用户任务完成
@Test
(
description
=
"访客H分享直播间"
,
priority
=
7
)
public
void
访客
H
分享直播间
()
{
...
...
@@ -177,7 +271,7 @@ public class FlipCard implements Authorization {
}
/*
@Test
(
description
=
"已登录查询分享人头像昵称"
,
priority
=
11
)
public
void
已登录查询分享人头像昵称
()
{
...
...
@@ -293,7 +387,7 @@ public class FlipCard implements Authorization {
}
*/
//预约
@Test
(
description
=
"翻牌集字_预约"
,
priority
=
16
)
...
...
@@ -320,7 +414,7 @@ public class FlipCard implements Authorization {
}
/*
@Test
(
description
=
"用户完成任务情况"
,
priority
=
17
)
public
void
用户完成任务情况
()
{
...
...
@@ -550,5 +644,5 @@ public class FlipCard implements Authorization {
}
*/
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
b8f87874
...
...
@@ -252,6 +252,9 @@ public class BasicConfig {
public
static
final
String
MANAGER_flipWord
=
MANAGER_HOST
+
"/kjy/manager/flip/word/saveOrUpdate"
;
public
static
final
String
MANAGER_wordSwitchStatus
=
MANAGER_HOST
+
"/kjy/manager/flip/word/switchStatus"
;
public
static
final
String
MANAGER_wordDetail
=
MANAGER_HOST
+
"/kjy/manager/flip/word/detail"
;
public
static
final
String
MANAGER_saveOrUpdateV2
=
MANAGER_HOST
+
"/kjy/manager/flip/word/saveOrUpdate/v2"
;
public
static
final
String
MANAGER_detailV2
=
MANAGER_HOST
+
"/kjy/manager/flip/word/detail/v2"
;
public
static
final
String
MANAGER_wordDelete
=
MANAGER_HOST
+
"/kjy/manager/flip/word/delete"
;
public
static
final
String
MOBILE_status
=
MOBILE_HOST
+
"/kjy/live/flip/word/status"
;
public
static
final
String
MOBILE_wordConf
=
MOBILE_HOST
+
"/kjy/live/flip/word/conf"
;
...
...
@@ -267,6 +270,7 @@ public class BasicConfig {
public
static
final
String
MOBILE_record
=
MOBILE_HOST
+
"/kjy/live/flip/word/user/record"
;
public
static
final
String
MOBILE_turn
=
MOBILE_HOST
+
"/kjy/live/flip/word/turn"
;
public
static
final
String
MOBILE_turnState
=
MOBILE_HOST
+
"/kjy/live/flip/word/turn/state"
;
public
static
final
String
MOBILE_confV2
=
MOBILE_HOST
+
"/kjy/live/flip/word/conf/v2"
;
// *************** 直播间过渡视频 ***************
public
static
final
String
MANAGER_confCaveOrUpdate
=
MANAGER_HOST
+
"/kjy/manager/live/trans/video/conf/saveOrUpdate"
;
public
static
final
String
MANAGER_videoSwitch
=
MANAGER_HOST
+
"/kjy/manager/live/trans/video/conf/status/switch"
;
...
...
src/test/liveTestNG.xml
View file @
b8f87874
This diff is collapsed.
Click to expand it.
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