Commit 7b95cd47 authored by 张艳玲's avatar 张艳玲

奖品签收

parent 13fe04ee
......@@ -7,7 +7,7 @@ import java.util.List;
@Data
public class QuseRewardList {
private List<QuesList> list;
private List<QuseRewardList.QuesList> list;
@Data
public static class QuesList{
private String quesConfId;
......
......@@ -27,7 +27,7 @@ public interface AdminAuthorization {
}
/**
* 访客A(嘿保险)授权,代理人指定中奖用户 ,ID:907
* 访客A(志勇)授权,代理人指定中奖用户
*/
default void visitorAuth() {
network.agentCookies.put("authKey", VISITORKEY);
......@@ -89,7 +89,7 @@ public interface AdminAuthorization {
System.out.println("用户AUTH_KEY:" + VISITORKEY8);
}
/**
* 访客H(喜洋洋)授权
* 访客I(嘿保险)授权,ID:907
*/
default void visitorAuth9() {
network.agentCookies.put("authKey", VISITORKEY9);
......
......@@ -1042,5 +1042,78 @@ public class Lottery implements AdminAuthorization {
}
@Test(description = "代理人分享直播间", priority = 74)
public void 代理人分享直播间() {
agentAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> signParam = new HashMap<>();
signParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
signParam.put("shareType", 2);
Response signRes = network.getResponse(signParam, BasicConfig.MOBILE_GETSHARESIGN);
HashMap data = signRes.jsonPath().getJsonObject("data");
System.out.println(data);
this.shareSign = (String) data.get("shareSign");
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_GETSHARESIGN, "分享失败", signRes.body().asString()));
}
@Test(description = "访客H关系绑定", priority = 75)
public void 访客H关系绑定() {
visitorAuth9();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
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 = "中奖任务邀请H绑定结果和绑定凭证", priority = 76)
public void 获取访客H绑定结果和绑定凭证() {
visitorAuth9();
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
HashMap data = tokenRes.jsonPath().getJsonObject("data");
System.out.println(data);
this.token = (String) data.get("token");
System.out.println(token);
Object token = tokenRes.jsonPath().getJsonObject("data");
Assert.assertNotNull(token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "中奖任务邀请H根据绑定凭证发放抽奖码", priority = 77)
public void 中奖任务邀请H根据绑定凭证发放抽奖码() {
visitorAuth9();
ThreadSleepUtils.sleep(500);
Map<String, Object> codeParam = new HashMap<>();
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
Response codeRes = network.getResponse(codeParam, BasicConfig.MOBILE_Code);
boolean success = codeRes.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(codeParam, BasicConfig.MOBILE_Code, "发放抽奖码失败", codeRes.body().asString()));
}
@Test(description = "访客H到场", priority = 78)
public void 访客H到场() {
visitorAuth9();
Map<String, Object> connectSuccessParam = new HashMap<>();
connectSuccessParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response connectSuccessoRes = network.getResponse(connectSuccessParam, BasicConfig.USER_connectSuccess);
boolean success = connectSuccessoRes.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(connectSuccessParam, BasicConfig.USER_connectSuccess, "访客到场请求失败", connectSuccessoRes.body().asString()));
}
}
This diff is collapsed.
......@@ -45,7 +45,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test(description = "获取答题按团队分配的团队列表", priority = 2)
public void 获取答题按团队分配的团队列表() {
Map<String, Object> TeamParam = new HashMap<>();
TeamParam.put("confId", this.ListConfid.get(1).getId());
TeamParam.put("confId", this.ListConfid.get(2).getId());
TeamParam.put("pageIndex",1);
TeamParam.put("pageSize",50);
Response response = network.getResponse(TeamParam, BasicConfig.MANAGER_TeamAssignmentList);
......@@ -58,7 +58,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test(description = "添加团队", priority = 3)
public void 添加团队() {
Map<String, Object> addTeamParam = new HashMap<>();
addTeamParam.put("confId", this.ListConfid.get(1).getId());
addTeamParam.put("confId", this.ListConfid.get(2).getId());
addTeamParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
addTeamParam.put("teamIds", Arrays.asList(3837,3324,3817));
Response response = network.postResponse(addTeamParam, BasicConfig.MANAGER_addTeam);
......@@ -72,7 +72,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test(description = "获取答题已分配的团队列表", priority = 4)
public void 获取答题已分配的团队列表() {
Map<String, Object> TeamParam = new HashMap<>();
TeamParam.put("confId", this.ListConfid.get(1).getId());
TeamParam.put("confId", this.ListConfid.get(2).getId());
TeamParam.put("pageIndex",1);
TeamParam.put("pageSize",50);
Response response = network.getResponse(TeamParam, BasicConfig.MANAGER_TeamAssignmentList);
......@@ -86,7 +86,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test(description = "单个团队删除", priority = 5)
public void 单个团队删除() {
Map<String, Object> TeamParam = new HashMap<>();
TeamParam.put("confId", this.ListConfid.get(1).getId());
TeamParam.put("confId", this.ListConfid.get(2).getId());
TeamParam.put("id",this.teamID.get(0).getId());
Response response = network.postResponse(TeamParam, BasicConfig.MANAGER_delTeam);
boolean data = response.jsonPath().getBoolean("data");
......@@ -98,7 +98,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test(description = "一键清空团队", priority = 6)
public void 一键清空团队() {
Map<String, Object> TeamParam = new HashMap<>();
TeamParam.put("confId", this.ListConfid.get(1).getId());
TeamParam.put("confId", this.ListConfid.get(2).getId());
Response response = network.postResponse(TeamParam, BasicConfig.MANAGER_deleteAll);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
......@@ -109,7 +109,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test(description = "添加指定中奖团队", priority = 7)
public void 添加指定中奖团队() {
Map<String, Object> addTeamParam = new HashMap<>();
addTeamParam.put("confId", this.ListConfid.get(1).getId());
addTeamParam.put("confId", this.ListConfid.get(2).getId());
addTeamParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
addTeamParam.put("teamIds", Arrays.asList(3817));
Response response = network.postResponse(addTeamParam, BasicConfig.MANAGER_addTeam);
......@@ -123,7 +123,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test(description = "开启团队配置开关", priority = 8)
public void 开启团队配置开关() {
Map<String, Object> addTeamParam = new HashMap<>();
addTeamParam.put("confId", this.ListConfid.get(1).getId());
addTeamParam.put("confId", this.ListConfid.get(2).getId());
Response response = network.postResponse(addTeamParam, BasicConfig.MANAGER_updateTeam);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
......
......@@ -19,7 +19,37 @@ public class Unlimited implements AdminAuthorization {
BaseUtils.ssoLogin();
}
@Test(description = "获取有奖答题列表信息", priority = 1)
@Test(description = "修改本场答题规则仅一次中奖", priority = 1)
public void 修改本场答题规则仅一次中奖() {
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// updateParam.put("liveId", 2960);
updateParam.put("redPacketRuleType", 1);
updateParam.put("welfareRuleType", 1);
Response response = network.postResponse(updateParam, BasicConfig.MANAGER_updateQuestionPrizesRule);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_updateQuestionPrizesRule, "答题有奖红包规则无限制", response.body().asString()));
}
@Test(description = "答题有奖限制中奖1次", priority = 2)
public void 答题有奖限制中奖1() {
Map<String, Object> getConfParam = new HashMap<>();
getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// getConfParam.put("liveId", 2960);
Response response = network.getResponse(getConfParam, BasicConfig.MANAGER_getQuestionPrizesRule);
Object redPacketRuleType = response.jsonPath().getJsonObject("data.redPacketRuleType");
System.out.println(redPacketRuleType);
Assert.assertEquals(redPacketRuleType,1, network.message(getConfParam, BasicConfig.MANAGER_getQuestionPrizesRule, "答题有奖红包限制1次", response.body().asString()));
Object welfareRuleType = response.jsonPath().getJsonObject("data.welfareRuleType");
System.out.println(welfareRuleType);
Assert.assertEquals(welfareRuleType,1, network.message(getConfParam, BasicConfig.MANAGER_getQuestionPrizesRule, "答题有奖红包限制1次", response.body().asString()));
}
@Test(description = "获取有奖答题列表信息", priority = 3)
public void 获取有奖答题列表信息() {
Map<String, Object> getConfParam = new HashMap<>();
getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......@@ -31,7 +61,7 @@ public class Unlimited implements AdminAuthorization {
}
@Test(description = "本场答题无限制中奖规则", priority = 2)
@Test(description = "本场答题无限制中奖规则", priority = 4)
public void 本场答题无限制中奖规则() {
Map<String, Object> getConfParam = new HashMap<>();
getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
......
This diff is collapsed.
This diff is collapsed.
......@@ -290,4 +290,8 @@ public class User implements AdminAuthorization {
}
}
......@@ -27,9 +27,9 @@ public class BasicConfig {
//直播访客 (新强)
public static String VISITORKEY6 ="DyGoVEPj7nANppy7P8NS4Z4v3PAwxeqJodqYrmwYkoHYMsV4yAxbTXwZ5wWmGQTddQgxdWoNCmN43P8fzhcuWRmdE";
//直播访客 (熊二)
public static String VISITORKEY7 ="LEH7epeHVDJWzhZ6DiexTHnsy28pGo5XmzZG7KzUUKbJwaH84WuambhcvuhbKjYEBPivHr6LyYkQiCkh1fAg4BKKkJmoX";
public static String VISITORKEY7 ="LEH7epeHVDJWzhZ6DiexTHnsaPwQpbsXDYKqcguWGz3bANuXof13XAd74h5DvPeMkgMPmBhjxykz4C2a2V4oZLhdHDMvS";
//直播访客 (熊大)
public static String VISITORKEY8 ="LEH7epeHVDJWzhZ6DiexTHnsy28pGo5bL75Lr5VqnVBDBqZVAUZDaFbXuMHKrnKVvTa8qAQcvrVmqN9fxue59EMwYib7p";
public static String VISITORKEY8 ="LEH7epeHVDJWzhZ6DiexTHnsaPwQpcHvNnpxzrpy7o6fLHsDiQ8X6jiwuiHAr3PWST2a1qMd5nZY6UrQdGuHCi82jhBPs";
// 基础线代理人 TKU
public static String AGENT_TKU = "T3gM31f18jCFEcfoYxvVk1LsF5T1YkcBNDbUaryi3TgvwatuP6mroJjZ2k7iCHjC9Srujh7k311i3vFuZm";
......
......@@ -19,19 +19,20 @@
</classes>
</test>
<test preserve-order="true" name="有奖答题无限制配置">
<test preserve-order="true" name="有奖答题配置">
<classes>
<class name="com.kjj.cases.live.manager.QuesReward.Unlimited"/>
<class name="com.kjj.cases.live.manager.QuesReward.Add"/>
</classes>
</test>
<test preserve-order="true" name="有奖答题团队配置">
<classes>
<class name="com.kjj.cases.live.manager.QuesReward.TeamAssignment"/>
</classes>
</test>
<test preserve-order="true" name="有奖答题限制1次中奖">
<test preserve-order="true" name="有奖答题限制中奖">
<classes>
<class name="com.kjj.cases.live.manager.QuesReward.limited"/>
</classes>
......@@ -118,11 +119,30 @@
<class name="com.kjj.cases.live.red.LiveVistorRed"/>
</classes>
</test>
<test preserve-order="true" name="有奖答题">
<!-- <test preserve-order="true" name="有奖答题">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.red.QuestionAwards"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="有奖答题限制1次中奖">
<classes>
<class name="com.kjj.cases.live.red.QuestionAwards"/>
<class name="com.kjj.cases.live.red.Limited"/>
</classes>
</test>
<test preserve-order="true" name="有奖答题无限制配置">
<classes>
<class name="com.kjj.cases.live.manager.QuesReward.Unlimited"/>
</classes>
</test>
<test preserve-order="true" name="有奖答题限制无限制中奖">
<classes>
<class name="com.kjj.cases.live.red.Unlimited"/>
</classes>
</test>
<test preserve-order="true" name="投票">
<classes>
<class name="com.kjj.cases.live.choice.Choice"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment