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
de9cd227
Commit
de9cd227
authored
Aug 19, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加亲友抽奖券的代码
parent
e71b5220
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
110 additions
and
40 deletions
+110
-40
Authorization.java
src/test/java/com/kjj/cases/admin/Authorization.java
+5
-0
HomePage.java
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
+1
-1
passQues.java
src/test/java/com/kjj/cases/live/answer/passQues.java
+0
-3
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+0
-4
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+60
-4
Share.java
src/test/java/com/kjj/cases/live/liveConfig/Share.java
+20
-21
RelativeLottery.java
...test/java/com/kjj/cases/live/lottery/RelativeLottery.java
+10
-0
LiveVistorRed.java
src/test/java/com/kjj/cases/live/red/LiveVistorRed.java
+6
-6
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+8
-1
No files found.
src/test/java/com/kjj/cases/admin/Authorization.java
View file @
de9cd227
...
...
@@ -229,6 +229,11 @@ public interface Authorization {
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth25
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth25
);
}
//访客X(亦心)ID:96 实名
default
void
visitorAuth26
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth26
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth26
);
}
...
...
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
View file @
de9cd227
...
...
@@ -56,7 +56,7 @@ public class HomePage implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
HOME_getContentList
);
Object
obj
=
response
.
jsonPath
().
getJsonObject
(
"data.list"
);
Assert
.
assertNotNull
(
obj
,
network
.
message
(
params
,
HOME_getContentList
,
"获取首页种草素材列表失败"
,
response
.
body
().
asString
()));
grasscontentId
=
response
.
jsonPath
().
getString
(
"data.list.get(
0
).contentId"
);
grasscontentId
=
response
.
jsonPath
().
getString
(
"data.list.get(
8
).contentId"
);
articleId
=
decodingId
(
grasscontentId
);
//获取素材对应的scid
...
...
src/test/java/com/kjj/cases/live/answer/passQues.java
View file @
de9cd227
...
...
@@ -659,9 +659,6 @@ public class passQues implements Authorization {
int
amount1
=
resultRes
.
jsonPath
().
getInt
(
"data.amount"
);
System
.
out
.
println
(
amount1
);
Assert
.
assertTrue
(
amount1
==
30
,
network
.
message
(
redResultParam
,
BasicConfig
.
ANCHOR_redResult
,
"红包领取金额为空"
,
resultRes
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
de9cd227
...
...
@@ -481,8 +481,4 @@ public class FlipCard implements Authorization {
}
}
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
de9cd227
...
...
@@ -2339,7 +2339,63 @@ public class SaveLive implements Authorization {
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_otherDetail
,
"查询第6轮时长红包详情失败"
,
response
.
body
().
asString
()));
}
}
/**
* 亲友抽奖券配置
*/
// @Test(description = "保存亲友抽奖券配置", priority = 125)
// public void 保存亲友抽奖券配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("giftedLotteryUrl","");
// Params.put("notGiftedLotteryUrl","");
// Params.put("popLotteryUrl","");
// Params.put("envelopeWord","这是信封话术");
// Params.put("lotteryName","亲友抽奖券");
// Params.put("lotteryNum",3);
// Params.put("lotteryInstruction","这是亲友抽奖券的说明");
// Response response = network.postResponse(Params, BasicConfig.MANAGER_relativeLottery);
// System.out.println(response.body().asString());
// boolean data =response.jsonPath().getBoolean("data");
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_relativeLottery, "保存亲友券配置失败", response.body().asString()));
// }
//
// @Test(description = "查看亲友抽奖券配置详情", priority = 126)
// public void 查看亲友抽奖券配置详情() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_detailLottery);
// System.out.println(response.body().asString());
// Object data =response.jsonPath().getJsonObject("data");
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_detailLottery, "查看亲友抽奖券配置详情为空", response.body().asString()));
//
// int lotteryNum = response.jsonPath().getInt("data.lotteryNum");
// int openStatus = response.jsonPath().getInt("data.openStatus");
// Assert.assertEquals(openStatus,0, network.message(Params, BasicConfig.MANAGER_detailLottery, "亲友抽奖券数开启状态错误", response.body().asString()));
// Assert.assertEquals(lotteryNum,3, network.message(Params, BasicConfig.MANAGER_detailLottery, "亲友抽奖券数量错误", response.body().asString()));
// }
//
// @Test(description = "开启亲友抽奖券配置", priority = 127)
// public void 开启亲友抽奖券配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("openStatus", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_switchStatusLottery);
// System.out.println(response.body().asString());
// boolean data =response.jsonPath().getBoolean("data");
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switchStatusLottery, "开启亲友券配置失败", response.body().asString()));
// }
//
// @Test(description = "查询亲友抽奖券配置状态", priority = 128)
// public void 查询亲友抽奖券配置状态() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
// System.out.println(response.body().asString());
// boolean fissionLotteryConfBuildStatus = response.jsonPath().getBoolean("data.fissionLotteryConfBuildStatus");
// Assert.assertTrue(fissionLotteryConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置亲友抽奖券", response.body().asString()));
//
// boolean fissionLotteryConfStatus = response.jsonPath().getBoolean("data.fissionLotteryConfStatus");
// Assert.assertTrue(fissionLotteryConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置亲友抽奖券", response.body().asString()));
//
// }
}
src/test/java/com/kjj/cases/live/liveConfig/Share.java
View file @
de9cd227
...
...
@@ -38,9 +38,6 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"直播前常规分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"直播前_常规分享配置列表为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"直播中_常规分享"
,
priority
=
2
)
...
...
@@ -62,8 +59,6 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"直播中常规分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"直播中常规分享配置列表为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"红包分享"
,
priority
=
3
)
...
...
@@ -85,8 +80,6 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"红包分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"红包分享配置列表为null"
,
response
.
body
().
asString
()));
}
...
...
@@ -109,8 +102,6 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"宝箱裂变分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"宝箱裂变分享配置列表为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"猜数红包分享"
,
priority
=
5
)
...
...
@@ -132,8 +123,6 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"猜数字红包分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"猜数字红包配置列表为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"翻牌分享"
,
priority
=
6
)
...
...
@@ -155,8 +144,6 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"翻牌红包分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"翻牌红包配置列表为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"好运红包分享"
,
priority
=
7
)
...
...
@@ -178,9 +165,6 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"好运红包分享"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"好运红包配置列表为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"答题闯关分享"
,
priority
=
8
)
...
...
@@ -202,12 +186,27 @@ public class Share implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[0].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"答题闯关分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"答题闯关配置列表为null"
,
response
.
body
().
asString
()));
}
// @Test(description = "亲友抽奖券分享", priority = 9)
// public void 亲友抽奖券分享() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("mpShareUrl", "//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg");
// Params.put("mpShareTitle", "亲友抽奖券分享文案");
// Params.put("shareType",10);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_saveOrUpdateMpShare);
// boolean data =response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data,network.message(Params, BasicConfig.MOBILE_info, "答题闯关分享失败", response.body().asString()));
//
// Params.clear();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("shareType",10);
// response=network.getResponse(Params, BasicConfig.MANAGER_mpShareList);
// System.out.println(response.body().asString());
// String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
// Assert.assertEquals(mpShareTitle,"亲友抽奖券分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "答题闯关配置列表为null", response.body().asString()));
// }
}
src/test/java/com/kjj/cases/live/lottery/RelativeLottery.java
0 → 100644
View file @
de9cd227
package
com
.
kjj
.
cases
.
live
.
lottery
;
import
org.testng.annotations.BeforeClass
;
public
class
RelativeLottery
{
@BeforeClass
public
void
setUp
(){
}
}
src/test/java/com/kjj/cases/live/red/LiveVistorRed.java
View file @
de9cd227
...
...
@@ -389,10 +389,10 @@ public class LiveVistorRed implements Authorization {
}
@Test
(
description
=
"访客
H
查询被助力者访客I的信息"
,
priority
=
23
)
public
void
访客
H
查询被助力者访客
I
的信息
()
@Test
(
description
=
"访客
C
查询被助力者访客I的信息"
,
priority
=
23
)
public
void
访客
C
查询被助力者访客
I
的信息
()
{
visitorAuth
9
();
visitorAuth
3
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_Red
);
params
.
put
(
"shareSign"
,
red_sharesign
);
...
...
@@ -402,9 +402,9 @@ public class LiveVistorRed implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_RedHelpQuery
,
"帮好友助力失败"
,
response
.
body
().
asString
()));
}
/*访客端-访客
A帮访客B
助力*/
@Test
(
description
=
"访客
H
帮访客I助力"
,
priority
=
24
)
public
void
访客
H
帮访客
I
助力
()
/*访客端-访客
C帮访客I
助力*/
@Test
(
description
=
"访客
C
帮访客I助力"
,
priority
=
24
)
public
void
访客
C
帮访客
I
助力
()
{
visitorAuth3
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
de9cd227
...
...
@@ -64,6 +64,10 @@ public class BasicConfig {
public
static
String
visitorAuth24
=
"2Tsc8MwHZmXJKPfze38rXm37UEX1EtfvfjxjLr1GZDVAdRXD3hSK2j6WjZQgFaqHHJcT5yk3tB64Ebu38fmuJymWQtPcAdr"
;
//直播访客 (亦心)ID:96 实名用户
public
static
String
visitorAuth25
=
"5MgSyboxqzAQZZJEsTf43nVX38cJBxsCHATPDDoWL7qHS5PaPehMLbSmTNWgySTMFYevyw9tSxYKVU2VfhR9fW1FrWTk"
;
//直播访客 (小米粥)ID:749
public
static
String
visitorAuth26
=
"LEH7epeHVDJWzhZ6DiexTHnfbvr9gocGu9FvH3CVz6g4Cez7hNpJpzWTAnDH2FiQ3oj3dDx5W6NQYDzd3ToQiPbQpbtag"
;
//直播访客 (兑吧集团)ID:947
public
static
String
visitorAuth27
=
"LEH7epeHVDJWzhZ6DiexTHnfbvr9gocGu9ExJDb9xHoegrcNGiGyvUPrCXu5VECCsW6HDaVZMFu1Rph5WvdbB3jbkGcM9"
;
/**
* 集客助手授权key
...
...
@@ -269,7 +273,10 @@ public class BasicConfig {
public
static
final
String
MOBILE_assist
=
MOBILE_HOST
+
"/kjy/live/help/assist"
;
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_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