Commit 973f688d authored by 张艳玲's avatar 张艳玲

新增猜数字红包

parent 7fda6d13
package com.kjj.bean.lottery;
import lombok.Data;
@Data
public class CondDetail {
private String treasureConfId;
}
......@@ -15,6 +15,7 @@ public class TreasureAward {
private Integer maxNum;
private Integer treasureProbability;
private Integer winLimitCount;
private Integer isLimit;
......
......@@ -129,7 +129,7 @@ public interface AdminAuthorization {
}
/**
* 访客M(大妹子保险)非实名用户授权,ID:102
* 访客M(大妹子)非实名用户授权,ID:299
*/
default void visitorAuth13() {
network.agentCookies.put("authKey", VISITORKEY13);
......@@ -137,7 +137,7 @@ public interface AdminAuthorization {
}
/**
* 访客N(光头强)非实名用户授权,ID:173
* 访客N(光头强)非实名用户授权,ID:540
*/
default void visitorAuth14() {
network.agentCookies.put("authKey", VISITORKEY14);
......@@ -176,6 +176,30 @@ public interface AdminAuthorization {
System.out.println("用户AUTH_KEY:" + VISITORKEY18);
}
/**
* 访客T(林国芸)ID:786
*/
default void visitorAuth19() {
network.agentCookies.put("authKey", visitorAuth19);
System.out.println("用户AUTH_KEY:" + visitorAuth19);
}
/**
* 访客Y(孙心桂)ID:785
*/
default void visitorAuth20() {
network.agentCookies.put("authKey", visitorAuth20);
System.out.println("用户AUTH_KEY:" + visitorAuth20);
}
/**
* 访客W(谢翊美)ID:791
*/
default void visitorAuth21() {
network.agentCookies.put("authKey", visitorAuth21);
System.out.println("用户AUTH_KEY:" + visitorAuth21);
}
}
This diff is collapsed.
......@@ -94,32 +94,32 @@ public class ManagerGuess implements AdminAuthorization {
@Test(description = "编辑猜数字红包", priority = 5)
public void 编辑猜数字红包() {
Map<String, Object> AmountParam = new HashMap<>();
AmountParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
AmountParam.put("redAmount",88);
AmountParam.put("redRealNum",1);
AmountParam.put("redShowNum",1);
AmountParam.put("guessMinNum",1);
AmountParam.put("guessMaxNum",10);
AmountParam.put("guessLeastTime",4);
AmountParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(AmountParam, BasicConfig.MANAGER_saveOrUpdate1);
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
updateParam.put("redAmount",88);
updateParam.put("redRealNum",1);
updateParam.put("redShowNum",1);
updateParam.put("guessMinNum",1);
updateParam.put("guessMaxNum",10);
updateParam.put("guessLeastTime",4);
updateParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(updateParam, BasicConfig.MANAGER_saveOrUpdate1);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(AmountParam, BasicConfig.MANAGER_saveOrUpdate1, "新增猜数字红包失败", response.body().asString()));
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_saveOrUpdate1, "新增猜数字红包失败", response.body().asString()));
}
@Test(description = "删除猜数字红包", priority = 6)
public void 删除猜数字红包() {
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
detailParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(detailParam, BasicConfig.MANAGER_del_1);
Map<String, Object> delParam = new HashMap<>();
delParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
delParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(delParam, BasicConfig.MANAGER_del_1);
boolean data=response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(detailParam, BasicConfig.MANAGER_del_1, "删除猜数字红包失败", response.body().asString()));
Assert.assertTrue(data, network.message(delParam, BasicConfig.MANAGER_del_1, "删除猜数字红包失败", response.body().asString()));
}
......@@ -187,19 +187,19 @@ public class ManagerGuess implements AdminAuthorization {
@Test(description = "直播前编辑猜数字红包", priority = 11)
public void 直播前编辑猜数字红包() {
adminAuth();
Map<String, Object> AmountParam = new HashMap<>();
AmountParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
AmountParam.put("redAmount",99);
AmountParam.put("redRealNum",1);
AmountParam.put("redShowNum",10);
AmountParam.put("guessMinNum",1);
AmountParam.put("guessMaxNum",10);
AmountParam.put("guessLeastTime",4);
AmountParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(AmountParam, BasicConfig.MOBILE_saveOrUpdate);
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
updateParam.put("redAmount",99);
updateParam.put("redRealNum",1);
updateParam.put("redShowNum",10);
updateParam.put("guessMinNum",1);
updateParam.put("guessMaxNum",10);
updateParam.put("guessLeastTime",4);
updateParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(updateParam, BasicConfig.MOBILE_saveOrUpdate);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(AmountParam, BasicConfig.MOBILE_saveOrUpdate, "直播前编辑猜数字红包失败", response.body().asString()));
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MOBILE_saveOrUpdate, "直播前编辑猜数字红包失败", response.body().asString()));
}
......@@ -207,13 +207,13 @@ public class ManagerGuess implements AdminAuthorization {
@Test(description = "直播前删除猜数字红包", priority = 12)
public void 直播前删除猜数字红包() {
adminAuth();
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
detailParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(detailParam, BasicConfig.MOBILE_delete);
Map<String, Object> delParam = new HashMap<>();
delParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
delParam.put("confId", this.confid.get(0).getConfId());
Response response = network.postResponse(delParam, BasicConfig.MOBILE_delete);
boolean data=response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(detailParam, BasicConfig.MOBILE_delete, "直播前删除猜数字红包失败", response.body().asString()));
Assert.assertTrue(data, network.message(delParam, BasicConfig.MOBILE_delete, "直播前删除猜数字红包失败", response.body().asString()));
}
......
package com.kjj.cases.live.manager;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
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.Map;
public class Share implements AdminAuthorization {
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
}
@Test(description = "新增常规小程序分享", priority = 1)
public void 新增常规小程序分享() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("mpShareUrl", "//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg");
saveParam.put("mpShareTitle", "「{{welfareName}}」常规分享文案{{name}}");
saveParam.put("shareType", 1);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_saveOrUpdateMpShare);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data,network.message(saveParam, BasicConfig.MOBILE_info, "新增常规小程序分享失败", response.body().asString()));
}
@Test(description = "新增红包小程序分享", priority = 2)
public void 新增红包宝箱小程序分享() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("mpShareUrl", "//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg");
saveParam.put("mpShareTitle", "「{{welfareName}}」红包分享文案{{name}}");
saveParam.put("shareType", 2);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_saveOrUpdateMpShare);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data,network.message(saveParam, BasicConfig.MOBILE_info, "新增红包小程序分享失败", response.body().asString()));
}
@Test(description = "新增直播宝箱小程序分享", priority = 3)
public void 新增直播宝箱小程序分享() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("mpShareUrl", "//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg");
saveParam.put("mpShareTitle", "「{{welfareName}}」宝箱裂变分享文案{{name}}");
saveParam.put("shareType", 4);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_saveOrUpdateMpShare);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data,network.message(saveParam, BasicConfig.MOBILE_info, "新增直播宝箱小程序分享失败", response.body().asString()));
}
@Test(description = "新增猜数红包小程序分享", priority = 4)
public void 新增猜数红包小程序分享() {
Map<String, Object> saveParam = new HashMap<>();
saveParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
saveParam.put("mpShareUrl", "//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg");
saveParam.put("mpShareTitle", "「{{welfareName}}」猜数字红包分享文案{{name}}");
saveParam.put("shareType", 5);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_saveOrUpdateMpShare);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data,network.message(saveParam, BasicConfig.MOBILE_info, "新增猜数红包小程序分享失败", response.body().asString()));
}
}
......@@ -47,35 +47,35 @@ public class TreasureTime implements AdminAuthorization {
TreasureCode treasureCode =new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(null);
treasureCode.setMaxNum(0);
treasureCode.setRuleType(1);
updateParam.put("treasureCode",treasureCode);
Response response = network.postResponse(updateParam, BasicConfig.MANAGER_update1);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_update1, "第一轮宝箱时长配置失败", response.body().asString()));
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_update1, "停留时长1分钟固定抽奖码", response.body().asString()));
}
@Test(description = "获取第轮宝箱配置详情", priority = 3)
public void 获取第轮宝箱配置详情() {
@Test(description = "获取第1轮宝箱配置详情", priority = 3)
public void 获取第1轮宝箱配置详情() {
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("treasureConfId",this.ConfId.get(0).getTreasureConfId());
Response response = network.getResponse(detailParam, BasicConfig.MANAGER_detail1);
Object data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(detailParam, BasicConfig.MANAGER_detail1, "获取第轮宝箱配置详情失败", response.body().asString()));
Assert.assertNotNull(data, network.message(detailParam, BasicConfig.MANAGER_detail1, "获取第1轮宝箱配置详情失败", response.body().asString()));
}
@Test(description = "停留时长2分钟随机抽奖码", priority = 4)
public void 停留时长2分钟随机抽奖码() {
@Test(description = "停留时长2分钟现金红包", priority = 4)
public void 停留时长2分钟现金红包() {
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("treasureConfId",this.ConfId.get(1).getTreasureConfId());
updateParam.put("boxConfType",1);
updateParam.put("boxConfType",2);
updateParam.put("openCondition",2);
TreasureCode treasureCode =new TreasureCode();
......@@ -84,30 +84,53 @@ public class TreasureTime implements AdminAuthorization {
treasureCode.setRuleType(2);
updateParam.put("treasureCode",treasureCode);
TreasureRed treasureRed =new TreasureRed();
treasureRed.setRedTotalAmount(100);
treasureRed.setRuleType(1);
treasureRed.setTotalNum(1);
treasureRed.setFixedNum(30);
updateParam.put("treasureRed",treasureRed);
Response response = network.postResponse(updateParam, BasicConfig.MANAGER_update1);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_update1, "第二轮宝箱时长配置失败", response.body().asString()));
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_update1, "停留时长2分钟现金红包配置失败", response.body().asString()));
}
@Test(description = "获取第轮宝箱配置详情", priority = 5)
public void 获取第轮宝箱配置详情() {
@Test(description = "获取第2轮宝箱配置详情", priority = 5)
public void 获取第2轮宝箱配置详情() {
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("treasureConfId",this.ConfId.get(1).getTreasureConfId());
Response response = network.getResponse(detailParam, BasicConfig.MANAGER_detail1);
Object data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(detailParam, BasicConfig.MANAGER_detail1, "获取第二轮宝箱配置详情失败", response.body().asString()));
Assert.assertNotNull(data, network.message(detailParam, BasicConfig.MANAGER_detail1, "获取第2轮宝箱配置详情失败", response.body().asString()));
}
@Test(description = "查询奖品列表", priority = 6)
public void 查询奖品列表() {
Map<String, Object> getListParam = new HashMap<>();
getListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getListParam.put("companyId", 101);
getListParam.put("pageIndex", 1);
getListParam.put("pageSize", 20);
getListParam.put("welfareType", 6);
Response response = network.getResponse(getListParam, BasicConfig.MANAGER_getList4Admin);
List<WelfareList>list = JsonUtil.parseResponseToPageBean(response, WelfareList.class);
System.out.println(list);
this.id = list;
Assert.assertNotNull(list, network.message(getListParam, BasicConfig.MANAGER_getList4Admin, "查询奖品列表失败", response.body().asString()));
}
@Test(description = "停留时长3分钟随机抽奖码", priority = 6)
public void 停留时长3分钟随机抽奖码() {
@Test(description = "停留时长3分钟实物奖品", priority = 7)
public void 停留时长3分钟实物奖品() {
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("treasureConfId",this.ConfId.get(2).getTreasureConfId());
updateParam.put("boxConfType",1);
updateParam.put("boxConfType",3);
updateParam.put("openCondition",3);
TreasureCode treasureCode =new TreasureCode();
......@@ -116,22 +139,23 @@ public class TreasureTime implements AdminAuthorization {
treasureCode.setRuleType(1);
updateParam.put("treasureCode",treasureCode);
TreasureRed treasureRed =new TreasureRed();
treasureRed.setRedTotalAmount(100);
treasureRed.setRuleType(1);
treasureRed.setTotalNum(3);
treasureRed.setFixedNum(30);
updateParam.put("treasureRed",treasureRed);
TreasureAward treasureAward =new TreasureAward();
treasureAward.setAwardName("萌娃锦鲤");
treasureAward.setBizConfId(0);
treasureAward.setIsLimit(2);
treasureAward.setTotalNum(1);
treasureAward.setWelfareId(this.id.get(5).getId());
updateParam.put("treasureAward",treasureAward);
Response response = network.postResponse(updateParam, BasicConfig.MANAGER_update1);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_update1, "第轮宝箱时长配置失败", response.body().asString()));
Assert.assertTrue(data, network.message(updateParam, BasicConfig.MANAGER_update1, "第3轮宝箱时长配置失败", response.body().asString()));
}
@Test(description = "获取第三轮宝箱配置详情", priority = 7)
@Test(description = "获取第三轮宝箱配置详情", priority = 8)
public void 获取第三轮宝箱配置详情() {
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("treasureConfId",this.ConfId.get(2).getTreasureConfId());
......@@ -142,39 +166,20 @@ public class TreasureTime implements AdminAuthorization {
}
@Test(description = "查询奖品列表", priority = 8)
public void 查询奖品列表() {
Map<String, Object> getListParam = new HashMap<>();
getListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getListParam.put("companyId", 101);
getListParam.put("pageIndex", 1);
getListParam.put("pageSize", 20);
getListParam.put("welfareType", 6);
Response response = network.getResponse(getListParam, BasicConfig.MANAGER_getList4Admin);
List<WelfareList>list = JsonUtil.parseResponseToPageBean(response, WelfareList.class);
System.out.println(list);
this.id = list;
Assert.assertNotNull(list, network.message(getListParam, BasicConfig.MANAGER_getList4Admin, "查询奖品列表失败", response.body().asString()));
}
@Test(description = "停留时长4分钟随机抽奖码", priority = 9)
public void 停留时长4分钟随机抽奖码() {
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("treasureConfId",this.ConfId.get(3).getTreasureConfId());
updateParam.put("boxConfType",1);
updateParam.put("openCondition",3);
updateParam.put("openCondition",4);
TreasureCode treasureCode =new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(6);
treasureCode.setRuleType(1);
treasureCode.setRuleType(2);
updateParam.put("treasureCode",treasureCode);
TreasureAward treasureAward =new TreasureAward();
treasureAward.setWelfareId(this.id.get(5).getId());
treasureAward.setTotalNum(-1);
updateParam.put("treasureAward",treasureAward);
Response response = network.postResponse(updateParam, BasicConfig.MANAGER_update1);
boolean data =response.jsonPath().getBoolean("data");
......
......@@ -212,9 +212,7 @@ public class Limited implements AdminAuthorization {
boolean openResult=response.jsonPath().getBoolean("data.openResult");
System.out.println(openResult);
Assert.assertTrue(openResult, network.message(params, BasicConfig.MOBILE_QuesParticipate, "参与失败", response.body().asString()));
boolean result=response.jsonPath().getBoolean("data.result");
System.out.println(result);
System.out.println("访客A领取答题红包_答题正确 timestamp:"+new Date().getTime());
Assert.assertTrue(result, network.message(params, BasicConfig.MOBILE_QuesParticipate, "答题失败", response.body().asString()));
......
......@@ -318,8 +318,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
/*访客端-访客A获取直播间参数-getShareSign*/
@Test(description = "访客A获取直播间参数", priority = 19)
public void 访客A获取直播间参数()
@Test(description = "访客H获取直播间参数", priority = 19)
public void 访客H获取直播间参数()
{
visitorAuth9();
Map<String, Object> params = new HashMap<>();
......@@ -334,8 +334,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
/*访客端-访客B查询被助力者访客A的信息*/
@Test(description = "访客B查询被助力者访客A的信息", priority = 20)
public void 访客B查询被助力者访客A的信息()
@Test(description = "访客I查询被助力者访客H的信息", priority = 20)
public void 访客I查询被助力者访客H的信息()
{
visitorAuth8();
Map<String, Object> params = new HashMap<>();
......@@ -348,23 +348,25 @@ public class LiveVistorRed implements AdminAuthorization {
}
/*访客端-访客B帮访客A助力*/
@Test(description = "访客B帮访客A助力", priority = 21)
public void 访客B帮访客A助力()
@Test(description = "访客I帮访客H助力", priority = 21)
public void 访客I帮访客H助力()
{
visitorAuth8();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("shareSign", red_sharesign);
params.put("confRedPacketId", confId_Red);
Response response = network.postResponse(params, BasicConfig.MOBILE_RedLuckHelp);
boolean data = response.jsonPath().getBoolean("success");
System.out.println(JSON.toJSONString(data));
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_RedLuckHelp, "帮好友助力失败", response.body().asString()));
}
ThreadSleepUtils.sleep(2000);
Map<String, Object> assistParam = new HashMap<>();
assistParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
assistParam.put("shareSign",red_sharesign);
assistParam.put("shareType",5);
assistParam.put("confId",confId_Red);
Response response = network.postResponse(assistParam, BasicConfig.MOBILE_assist);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客D给访客B助力失败", response.body().asString()));
}
/*访客端-访客B获取直播间参数-getShareSign*/
@Test(description = "访客B获取直播间参数", priority = 22)
public void 访客B获取直播间参数()
@Test(description = "访客I获取直播间参数", priority = 22)
public void 访客I获取直播间参数()
{
visitorAuth8();
Map<String, Object> params = new HashMap<>();
......@@ -378,9 +380,9 @@ public class LiveVistorRed implements AdminAuthorization {
Assert.assertNotNull(red_sharesign, network.message(params, BasicConfig.MOBILE_GETSHARESIGN, "获取直播间参数失败", response.body().asString()));
}
/*访客端-访客A查询被助力者访客B的信息*/
@Test(description = "访客A查询被助力者访客B的信息", priority = 23)
public void 访客A查询被助力者访客B的信息()
@Test(description = "访客H查询被助力者访客I的信息", priority = 23)
public void 访客H查询被助力者访客I的信息()
{
visitorAuth9();
Map<String, Object> params = new HashMap<>();
......@@ -393,21 +395,22 @@ public class LiveVistorRed implements AdminAuthorization {
}
/*访客端-访客A帮访客B助力*/
@Test(description = "访客A帮访客B助力", priority = 24)
public void 访客A帮访客B助力()
@Test(description = "访客H帮访客I助力", priority = 24)
public void 访客H帮访客I助力()
{
visitorAuth9();
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("shareSign", red_sharesign);
params.put("confRedPacketId", confId_Red);
Response response = network.postResponse(params, BasicConfig.MOBILE_RedLuckHelp);
boolean data = response.jsonPath().getBoolean("success");
System.out.println(JSON.toJSONString(data));
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_RedLuckHelp, "帮好友助力失败", response.body().asString()));
ThreadSleepUtils.sleep(2000);
Map<String, Object> assistParam = new HashMap<>();
assistParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
assistParam.put("shareSign",red_sharesign);
assistParam.put("shareType",5);
assistParam.put("confId",confId_Red);
Response response = network.postResponse(assistParam, BasicConfig.MOBILE_assist);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(assistParam, BasicConfig.MOBILE_assist, "访客D给访客B助力失败", response.body().asString()));
}
/*被助力者A-手气王助力详情信息查询*/
@Test(description = "红包详情助力信息", priority = 25)
public void 红包详情助力信息()
......@@ -423,8 +426,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
/*被助力者B-手气王助力详情信息查询*/
@Test(description = "被助力者B-红包详情助力信息", priority = 26)
public void 被助力者B红包详情助力信息()
@Test(description = "被助力者I-红包详情助力信息", priority = 26)
public void 被助力者I红包详情助力信息()
{
visitorAuth8();
Map<String, Object> params = new HashMap<>();
......@@ -464,8 +467,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
/*查询访客端访客B红包状态*/
@Test(description = "查询访客端访客B红包状态", priority = 29)
public void 查询访客端访客B红包状态()
@Test(description = "查询访客端访客I红包状态", priority = 29)
public void 查询访客端访客I红包状态()
{
visitorAuth8();
Map<String, Object> params = new HashMap<>();
......@@ -478,8 +481,8 @@ public class LiveVistorRed implements AdminAuthorization {
/*访客A开手气王红包*/
@Test(description = "访客A开手气王红包", priority = 30)
public void 访客A开手气王红包()
@Test(description = "访客H开手气王红包", priority = 30)
public void 访客H开手气王红包()
{
visitorAuth9();
ThreadSleepUtils.sleep(63000);
......@@ -493,8 +496,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
/*访客B开手气王红包*/
@Test(description = "访客B开手气王红包", priority = 31)
public void 访客B开手气王红包()
@Test(description = "访客I开手气王红包", priority = 31)
public void 访客I开手气王红包()
{
visitorAuth8();
Map<String, Object> params = new HashMap<>();
......@@ -567,8 +570,8 @@ public class LiveVistorRed implements AdminAuthorization {
/*访客B领红包轮询结果*/
@Test(description = "访客B领手气王红包轮询结果", priority = 36)
public void 访客B领手气王红包轮询结果()
@Test(description = "访客I领手气王红包轮询结果", priority = 36)
public void 访客I领手气王红包轮询结果()
{
visitorAuth8();
Map<String, Object> params = new HashMap<>();
......
......@@ -38,18 +38,25 @@ public class BasicConfig {
public static String VISITORKEY11 ="LEH7epeHVDJWzhZ6DiexTHnsaP1qQtqg4bchCs73vvVo9tdZjkmmjNMWkCsgrygU4cJaXfwzr7j51EK9Xcxdt2YdXnQjU";
//直播访客 (饺子)ID:97
public static String VISITORKEY12 ="5MgSyboxqzAQZZJEsTf43nVX38FgyAUo2fAxaP2wGJUTHcnhCNQ6xm4rZ8nMSjRk2BTsYwRhe1kABXuFmTA7JsepCEpa";
//直播访客 (大妹子保险)ID:102
public static String VISITORKEY13 ="LEH7epeHVDJWzhZ6DiexTHnsaP1qN9UZzYqpqzJA2Rdew611Z1Jx5JYQdByks4WNm9sPEYEcPjPWGB332v28BWjXfbFHf";
//直播访客 (光头强)ID:173
public static String VISITORKEY14 ="LEH7epeHVDJWzhZ6DiexTHnsaP1qN9UaB5Y7kQYL8TWRUMmAdzUP34yhV8w3PVg4uV5rxYeuetNdSU1HkUJ84QzXYYSF1";
//直播访客 (少侠)ID:79
public static String VISITORKEY15 ="5MgSyboxqzAQZZJEsTf43nVX38FgxYNfSo46ZMTRoniw9Rwh4vcC4373uQZR8B4f7re8nYAH3ePzUamTSWp57TLkhYGM";
//直播访客 (大妹子)ID:299
public static String VISITORKEY13 ="LEH7epeHVDJWzhZ6DiexTHnsaN9w9oWNN5DjmEBUV6rxQBX1gPqEDy6fBAMhJF4ZNUHR681CqgJaAwkQttsd8aB5WdCDf";
//直播访客 (光头强)ID:540
public static String VISITORKEY14 ="LEH7epeHVDJWzhZ6DiexTHnsaN9w9oWNUSEzLEnhXW7GvsDSbF1XDBJeeBRLp1u37nEXDs6aRhV7i8uxwJSKdaMFDutDp";
//直播访客 (少侠)ID:788
public static String VISITORKEY15 ="LEH7epeHVDJWzhZ6DiexTHnsaN9w9oWNQGsjS7kCzWj4MRh8UEgj65qMf774qQKtXQCskA56o29SkFTd6Zvc82mKjQ2P1";
//直播访客 (抬头有飞碟)ID:99
public static String VISITORKEY16 ="5MgSyboxqzAQZZJEsTf43nVX38FgxYNfT62QtXBfd44D2QpfhS1MHjzggYiRmLtzAqHLps4SB7m5PsqQQYkjS7hcPHSu";
//直播访客 (枫城)ID:77
public static String VISITORKEY17 ="5MgSyboxqzAQZZJEsTf43nVX38FgxYNfR7C5mkWn1EaJAymDPCSQyz3eaqsq7Wn47NU1cUqKXMHSEEbHfhXiv9Bq6XCc";
//直播访客 (小老弟来了)ID:94
public static String VISITORKEY18 ="5MgSyboxqzAQZZJEsTf43nVX38FgxYNfQ9pD69dnWxFV6NvpU2hiZ9J5kVEeFYdcviUxqNs5i37hvQEzCtzqhr7ywbwq";
//直播访客 (小老弟来了)ID:726
public static String VISITORKEY18 ="LEH7epeHVDJWzhZ6DiexTHnsaN9w9oXAbLLH4y37kY1Bh1zjcGqq8H65TzBAApa8c4h8PYXwogLPa8swFPNEpBqgqBRPH";
//直播访客 (林国芸)ID:786
public static String visitorAuth19 ="LEH7epeHVDJWzhZ6DiexTHnsaN9w9oXAUTTB6fYfPQ57LstgL84LnTWTZRadaM23vPXd7x2Q8Dos7RdCpWYg9AcJeUDz5";
//直播访客 (孙心桂)ID:785
public static String visitorAuth20 ="LEH7epeHVDJWzhZ6DiexTHnsaN9w9oXATWauEgZhrnVmFDGYrbyvfbCiHrAsmpMp7LRpUYvHTCCVYrfQJZZZeAGXs5q9B";
//直播访客 (谢翊美)ID:791
public static String visitorAuth21 ="LEH7epeHVDJWzhZ6DiexTHnsaN9w9oX4LYmRiH4EYLayw7oTtnaZ4YpLUcVaMTnAUuz5jSPcnRQgDm7R2XRS6AQgJqtta";
//***********************************************************************
// 基础线代理人 TKU
......@@ -91,13 +98,26 @@ public class BasicConfig {
public static final String MANAGER_detail_1 = MANAGER_HOST + "/kjy/manager/red/guess/detail";
public static final String MANAGER_del_1 = MANAGER_HOST + "/kjy/manager/red/guess/delete";
//助播端
public static final String MOBILE_guessList = MOBILE_HOST + "/conf/live/red/guess/list";
public static final String MOBILE_saveOrUpdate2 = MOBILE_HOST + "/conf/live/red/guess/saveOrUpdate";
public static final String MOBILE_detail1 = MOBILE_HOST + "/conf/live/red/guess/detail";
public static final String MOBILE_startOrEnd = MOBILE_HOST + "/conf/live/red/guess/startOrEnd";
public static final String MOBILE_saveOrUpdate = MOBILE_HOST + "/conf/pre/red/guess/saveOrUpdate";
public static final String MOBILE_findDetail = MOBILE_HOST + "/conf/pre/red/findDetail";
public static final String MOBILE_list = MOBILE_HOST + "/conf/pre/red/guess/list";
public static final String MOBILE_detail = MOBILE_HOST + "/conf/pre/red/guess/detail";
public static final String MOBILE_delete = MOBILE_HOST + "/conf/pre/red/guess/delete";
public static final String MOBILE_confDetail = MOBILE_HOST + "/clue/guess/number/red/confDetail";
public static final String MOBILE_userDetail = MOBILE_HOST + "/clue/guess/number/red/userDetail";
public static final String MOBILE_guess = MOBILE_HOST + "/clue/guess/number/red/guess";
public static final String MOBILE_open= MOBILE_HOST + "/clue/guess/number/red/open";
public static final String MOBILE_result = MOBILE_HOST + "/clue/guess/number/red/result";
// public static final String MOBILE_ = MOBILE_HOST + "";
// public static final String MOBILE_ = MOBILE_HOST + "";
// public static final String MOBILE_ = MOBILE_HOST + "";
// *************** 宝箱裂变 ***************
public static final String MANAGER_getList4Admin = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/getList4Admin";
......@@ -114,10 +134,25 @@ public class BasicConfig {
public static final String MANAGER_participateList = MOBILE_HOST + "/kjy/live/treasure/participateList";
// *************** 宝箱停留时长 ***************
// *************** 助力分享 ***************
public static final String MOBILE_sign = MOBILE_HOST + "/kjy/live/share/help/sign";
public static final String MOBILE_simple = MOBILE_HOST + "/kjy/live/help/simple";
public static final String MOBILE_info = MOBILE_HOST + "/kjy/live/help/info";
public static final String MOBILE_helpInfo = MOBILE_HOST + "/kjy/live/share/help/info";
public static final String MOBILE_assist = MOBILE_HOST + "/kjy/live/help/assist";
// *************** 时长宝箱 ***************
public static final String MANAGER_list1 = MANAGER_HOST + "/kjy/manager/treasure/time/conf/list";
public static final String MANAGER_detail1 = MANAGER_HOST + "/kjy/manager/treasure/time/conf/detail";
public static final String MANAGER_update1 = MANAGER_HOST + "/kjy/manager/treasure/time/conf/update";
public static final String MOBILE_timeDetail = MOBILE_HOST + "/kjy/live/treasure/time/detail";
public static final String MOBILE_joinDetail = MOBILE_HOST + "/kjy/live/treasure/time/joinDetail/simple";
public static final String MOBILE_finish = MOBILE_HOST + "/kjy/live/treasure/time/finish";
public static final String MOBILE_joinDetail1 = MOBILE_HOST + "/kjy/live/treasure/time/joinDetail";
public static final String MOBILE_treasureOpen = MOBILE_HOST + "/kjy/live/treasure/time/open";
public static final String MOBILE_joinResult = MOBILE_HOST + "/kjy/live/treasure/time/joinResult";
// *************** 代理人指定中奖 ***************
......@@ -190,9 +225,11 @@ public class BasicConfig {
public static final String MANAGER_rewardList = MANAGER_HOST + "/kjy/manager/live/ques/reward/list";
public static final String MANAGER_delete = MANAGER_HOST + "/kjy/manager/live/ques/reward/delete";
public static final String MANAGER_update = MANAGER_HOST + "/kjy/manager/live/ques/reward/update";
public static final String MANAGER_TreasureBenefits = MANAGER_HOST + "/kjy/manager/treasure/time/conf/list";
public static final String MANAGER_TreasureDetail = MANAGER_HOST + "/kjy/manager/treasure/time/conf/detail";
public static final String MANAGER_TreasureConUpdate = MANAGER_HOST + "/kjy/manager/treasure/time/conf/update";
//小程序分享
public static final String MANAGER_saveOrUpdateMpShare = MANAGER_HOST + "/kjy/manager/live/share/saveOrUpdateMpShare";
public static final String MANAGER_ = MANAGER_HOST + "";
// public static final String MANAGER_ = MANAGER_HOST + "";
// *************** 代理人 ***************
//代理人列表//
......@@ -238,6 +275,8 @@ public class BasicConfig {
public static final String MOBILE_Code = MOBILE_HOST + "/clue/invitation/code";
public static final String MOBILE_MyLotteryCode = MOBILE_HOST + "/kjy/live/lottery/myLotteryCode";
//投票
public static final String MOBILE_ChoiceCurrentDetail = MOBILE_HOST + "/conf/live/choice/currentDetail";
public static final String MOBILE_AddChoice = MOBILE_HOST + "/conf/live/choice/addChoice";
......
......@@ -3,6 +3,7 @@ package com.kjj.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.kjj.bean.manager.GuessList;
import groovy.json.JsonBuilder;
import io.restassured.response.Response;
......
......@@ -19,6 +19,12 @@
</classes>
</test>
<test preserve-order="true" name="小程序分享">
<classes>
<class name="com.kjj.cases.live.manager.Share"/>
</classes>
</test>
<test preserve-order="true" name="获取抽奖码校验">
<classes>
<class name="com.kjj.cases.live.LotteryCode.LotteryCode"/>
......@@ -37,7 +43,6 @@
</classes>
</test>
<test preserve-order="true" name="宝箱时长">
<classes>
<class name="com.kjj.cases.live.manager.TreasureTime"/>
......@@ -102,6 +107,7 @@
</classes>
</test>
<test preserve-order="true" name="助播-开启直播">
<classes>
<class name="com.kjj.cases.live.anchor.OpenLive"/>
......@@ -119,6 +125,13 @@
<class name="com.kjj.cases.live.lottery.Lottery"/>
</classes>
</test>
<test preserve-order="true" name="猜数字红包">
<classes>
<class name="com.kjj.cases.live.guess.LiveGuess"/>
</classes>
</test>
<test preserve-order="true" name="免费领福利">
<classes>
<class name="com.kjj.cases.live.FreeReward.FreeReward"/>
......@@ -171,6 +184,12 @@
</classes>
</test>
<test preserve-order="true" name="直播中时长宝箱">
<classes>
<class name="com.kjj.cases.live.lottery.TreasureTime"/>
</classes>
</test>
<test preserve-order="true" name="助播-结束直播">
<classes>
<class name="com.kjj.cases.live.anchor.CloseLive"/>
......
This diff is collapsed.
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