Commit 40dde93e authored by 张艳玲's avatar 张艳玲

新增宝箱裂变配置

parent 97b56566
package com.kjj.bean.manager;
import lombok.Data;
@Data
public class ProvinceCityCodeList {
private Integer provinceCode;
private Integer cityCode;
}
......@@ -12,4 +12,5 @@ public class TreasureCode {
private Integer maxNum;
private Integer treasureProbability;
}
package com.kjj.bean.manager;
import lombok.Data;
@Data
public class TreasureList {
private long treasureConfId;
private Integer treasureSort;
}
......@@ -69,8 +69,7 @@ public class Agent implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
......@@ -110,8 +109,7 @@ public class Agent implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
......
......@@ -317,6 +317,7 @@ public class Lottery implements AdminAuthorization {
@Test(description = "中奖任务邀请C绑定结果和绑定凭证", priority = 22)
public void 获取访客C绑定结果和绑定凭证() {
visitorAuth3();
ThreadSleepUtils.sleep(2000);
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);
......@@ -324,15 +325,14 @@ public class Lottery implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "中奖任务邀请C根据绑定凭证发放抽奖码", priority = 23)
public void 中奖任务邀请C根据绑定凭证发放抽奖码() {
visitorAuth3();
ThreadSleepUtils.sleep(500);
ThreadSleepUtils.sleep(2000);
Map<String, Object> codeParam = new HashMap<>();
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
......@@ -380,7 +380,7 @@ public class Lottery implements AdminAuthorization {
@Test(description = "访客C抽奖码数量", priority = 27)
public void 访客C抽奖码数量() {
visitorAuth3();
ThreadSleepUtils.sleep(500);
ThreadSleepUtils.sleep(1000);
Map<String, Object> myCountParam = new HashMap<>();
myCountParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response myCountRes = network.getResponse(myCountParam, BasicConfig.USER_myCount);
......@@ -487,6 +487,7 @@ public class Lottery implements AdminAuthorization {
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 34)
public void 幸运任务邀请D绑定结果和绑定凭证() {
visitorAuth4();
ThreadSleepUtils.sleep(2000);
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);
......@@ -494,14 +495,14 @@ public class Lottery implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "幸运任务邀请D根据绑定凭证发放抽奖码", priority = 35)
public void 幸运任务邀请D根据绑定凭证发放抽奖码() {
visitorAuth4();
ThreadSleepUtils.sleep(2000);
Map<String, Object> codeParam = new HashMap<>();
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
......@@ -562,6 +563,7 @@ public class Lottery implements AdminAuthorization {
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 40)
public void 幸运任务邀请E绑定结果和绑定凭证() {
visitorAuth5();
ThreadSleepUtils.sleep(2000);
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);
......@@ -569,14 +571,14 @@ public class Lottery implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "幸运任务邀请E根据绑定凭证发放抽奖码", priority = 41)
public void 幸运任务邀请E根据绑定凭证发放抽奖码() {
visitorAuth5();
ThreadSleepUtils.sleep(2000);
Map<String, Object> codeParam = new HashMap<>();
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
......@@ -637,6 +639,7 @@ public class Lottery implements AdminAuthorization {
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 46)
public void 幸运任务邀请F绑定结果和绑定凭证() {
visitorAuth6();
ThreadSleepUtils.sleep(2000);
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);
......@@ -644,15 +647,14 @@ public class Lottery implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "幸运任务邀请F根据绑定凭证发放抽奖码", priority = 47)
public void 幸运任务邀请F根据绑定凭证发放抽奖码() {
visitorAuth6();
Map<String, Object> codeParam = new HashMap<>();
ThreadSleepUtils.sleep(500);
ThreadSleepUtils.sleep(2000);
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
Response codeRes = network.getResponse(codeParam, BasicConfig.MOBILE_Code);
......@@ -713,6 +715,7 @@ public class Lottery implements AdminAuthorization {
@Test(description = "幸运任务邀请G绑定结果和绑定凭证", priority = 52)
public void 幸运任务邀请G绑定结果和绑定凭证() {
visitorAuth7();
ThreadSleepUtils.sleep(2000);
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);
......@@ -720,15 +723,14 @@ public class Lottery implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "幸运任务邀请G根据绑定凭证发放抽奖码", priority = 53)
public void 幸运任务邀请G根据绑定凭证发放抽奖码() {
visitorAuth7();
Map<String, Object> codeParam = new HashMap<>();
ThreadSleepUtils.sleep(500);
ThreadSleepUtils.sleep(2000);
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
Response codeRes = network.getResponse(codeParam, BasicConfig.MOBILE_Code);
......@@ -941,7 +943,7 @@ public class Lottery implements AdminAuthorization {
Response hasEndRes = network.getResponse(hasEndParam, BasicConfig.USER_result);
try {
Boolean data = hasEndRes.jsonPath().getBoolean("data.lottery");
Assert.assertTrue(data, network.message(hasEndParam, BasicConfig.USER_result, "厦门访客F未中奖", hasEndRes.body().asString()));
Assert.assertFalse(data, network.message(hasEndParam, BasicConfig.USER_result, "厦门访客中奖异常", hasEndRes.body().asString()));
} catch (Exception e) {
System.out.println("result = " + JSON.toJSONString(hasEndRes.jsonPath().get()));
throw e;
......
package com.kjj.cases.live.lottery;
import com.kjj.cases.live.admin.AdminAuthorization;
public class TreasureTime implements AdminAuthorization {
}
......@@ -96,33 +96,21 @@ public class LotteryRule implements AdminAuthorization {
RuleBean save = new RuleBean();
save.setProvinceCode(110000);
save.setCityCode(null);
save.setTotalNum(40);
save.setTotalNum(50);
Rule.add(save);
RuleBean save1 = new RuleBean();
save1.setProvinceCode(350000);
save1.setProvinceCode(420000);
save1.setCityCode(null);
save1.setTotalNum(40);
save1.setTotalNum(50);
Rule.add(save1);
RuleBean save2 = new RuleBean();
save2.setProvinceCode(350000);
save2.setCityCode(350200);
save2.setTotalNum(40);
save2.setProvinceCode(420000);
save2.setCityCode(420900);
save2.setTotalNum(50);
Rule.add(save2);
RuleBean save3 = new RuleBean();
save3.setProvinceCode(420000);
save3.setCityCode(null);
save3.setTotalNum(20);
Rule.add(save3);
RuleBean save4 = new RuleBean();
save4.setProvinceCode(420000);
save4.setCityCode(420900);
save4.setTotalNum(20);
Rule.add(save4);
saveParam.put("list",Rule);
Response response = network.postResponse(saveParam, BasicConfig.MANAGER_save);
boolean data = response.jsonPath().getBoolean("data");
......
......@@ -2,6 +2,7 @@ package com.kjj.cases.live.manager;
import com.alibaba.fastjson.JSON;
import com.kjj.bean.manager.AnswerBean;
import com.kjj.bean.manager.AnswerListBean;
import com.kjj.bean.manager.ProvinceCityCodeList;
import com.kjj.bean.manager.RewardPkBean;
import com.kjj.bean.answer.*;
import com.kjj.cases.live.admin.AdminAuthorization;
......@@ -44,9 +45,26 @@ public class SaveAndUpdate implements AdminAuthorization {
saveAndUpdateParam.put("noticeTime", noticeTime);
saveAndUpdateParam.put("broadcastTime", broadcastTime);
saveAndUpdateParam.put("shareContent", "自动化直播");
saveAndUpdateParam.put("shelfStatus", "2");
saveAndUpdateParam.put("shelfStatus", 2);
saveAndUpdateParam.put("secondPoster", "https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg");
saveAndUpdateParam.put("regionType", 2);
List<ProvinceCityCodeList> provinceCityCode = new ArrayList<>();
ProvinceCityCodeList save =new ProvinceCityCodeList();
save.setProvinceCode(110000);
save.setCityCode(null);
provinceCityCode.add(save);
ProvinceCityCodeList save1 =new ProvinceCityCodeList();
save1.setProvinceCode(420000);
save1.setCityCode(420900);
provinceCityCode.add(save1);
ProvinceCityCodeList save2 =new ProvinceCityCodeList();
save2.setProvinceCode(330000);
save2.setCityCode(330100);
provinceCityCode.add(save2);
saveAndUpdateParam.put("provinceCityCodeList", provinceCityCode);
Response response = network.postResponse(saveAndUpdateParam, BasicConfig.MANAGER_SAVEANDUPDATE);
liveID = response.jsonPath().getString("data");
EncodeLiveID = IdMakeUtil.encodingId(Long.valueOf(liveID));
......
......@@ -28,9 +28,7 @@ public class Treasure implements AdminAuthorization {
public void 查询奖品列表() {
Map<String, Object> getListParam = new HashMap<>();
getListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// getListParam.put("liveId",2122 );
getListParam.put("companyId", 101);
// getListParam.put("companyId", 79);
getListParam.put("pageIndex", 1);
getListParam.put("pageSize", 20);
getListParam.put("welfareType", 6);
......
package com.kjj.cases.live.manager;
import com.kjj.bean.manager.*;
import com.kjj.cases.live.admin.AdminAuthorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.BaseUtils;
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;
public class TreasureTime implements AdminAuthorization {
@BeforeClass
public void setUp() {
BaseUtils.ssoLogin();
}
public List<TreasureList> ConfId;
public List<WelfareList> id;
@Test(description = "获取直播中停留时长宝箱列表", priority = 1)
public void 获取直播中停留时长宝箱列表() {
Map<String, Object> getListParam = new HashMap<>();
getListParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(getListParam, BasicConfig.MANAGER_list1);
Object data=response.jsonPath().getJsonObject("data");
System.out.println(data);
List<TreasureList> list = JsonUtil.parseResponseToListBean(response,TreasureList.class);
System.out.println(list);
this.ConfId = list;
Assert.assertNotNull(list, network.message(getListParam, BasicConfig.MANAGER_list1, "获取直播中停留时长宝箱列表失败", response.body().asString()));
}
@Test(description = "停留时长1分钟固定抽奖码", priority = 2)
public void 停留时长1分钟固定抽奖码() {
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("treasureConfId",this.ConfId.get(0).getTreasureConfId());
updateParam.put("boxConfType",1);
updateParam.put("openCondition",1);
TreasureCode treasureCode =new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(null);
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()));
}
@Test(description = "获取第一轮宝箱配置详情", priority = 3)
public void 获取第一轮宝箱配置详情() {
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()));
}
@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("openCondition",2);
TreasureCode treasureCode =new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(3);
treasureCode.setRuleType(2);
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()));
}
@Test(description = "获取第二轮宝箱配置详情", priority = 5)
public void 获取第二轮宝箱配置详情() {
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()));
}
@Test(description = "停留时长3分钟随机抽奖码", priority = 6)
public void 停留时长3分钟随机抽奖码() {
Map<String, Object> updateParam = new HashMap<>();
updateParam.put("treasureConfId",this.ConfId.get(2).getTreasureConfId());
updateParam.put("boxConfType",1);
updateParam.put("openCondition",3);
TreasureCode treasureCode =new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(6);
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);
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()));
}
@Test(description = "获取第三轮宝箱配置详情", priority = 7)
public void 获取第三轮宝箱配置详情() {
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("treasureConfId",this.ConfId.get(2).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()));
}
@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);
TreasureCode treasureCode =new TreasureCode();
treasureCode.setFixedNum(1);
treasureCode.setMaxNum(6);
treasureCode.setRuleType(1);
updateParam.put("treasureCode",treasureCode);
TreasureAward treasureAward =new TreasureAward();
treasureAward.setWelfareId(this.id.get(9).getId());
treasureAward.setTotalNum(-1);
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()));
}
@Test(description = "获取第四轮宝箱配置详情", priority = 10)
public void 获取第四轮宝箱配置详情() {
Map<String, Object> detailParam = new HashMap<>();
detailParam.put("treasureConfId",this.ConfId.get(3).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()));
}
}
......@@ -33,6 +33,7 @@ public class User implements AdminAuthorization {
@Test(description = "获取绑定结果和绑定凭证", priority = 2)
public void 获取绑定结果和绑定凭证() {
ThreadSleepUtils.sleep(2000);
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);
......@@ -40,14 +41,13 @@ public class User implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "根据绑定凭证发放抽奖码", priority = 3)
public void 根据绑定凭证发放抽奖码() {
ThreadSleepUtils.sleep(500);
ThreadSleepUtils.sleep(2000);
Map<String, Object> codeParam = new HashMap<>();
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
......@@ -168,6 +168,7 @@ public class User implements AdminAuthorization {
@Test(description = "访客获取绑定结果和绑定凭证", priority = 12)
public void 访客获取绑定结果和绑定凭证() {
visitorAuth2();
ThreadSleepUtils.sleep(2000);
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);
......@@ -175,14 +176,13 @@ public class User implements AdminAuthorization {
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()));
Assert.assertNotNull(this.token, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客根据绑定凭证发放抽奖码", priority = 13)
public void 访客根据绑定凭证发放抽奖码() {
visitorAuth2();
ThreadSleepUtils.sleep(500);
ThreadSleepUtils.sleep(2000);
Map<String, Object> codeParam = new HashMap<>();
codeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
codeParam.put("token", token);
......
......@@ -72,6 +72,11 @@ public class BasicConfig {
public static final String MANAGER_confDetail = MANAGER_HOST + "/kjy/manager/live/treasure/confDetail";
public static final String MANAGER_switchStatus = MANAGER_HOST + "/kjy/manager/live/treasure/switchStatus";
// *************** 宝箱停留时长 ***************
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_getSpecifyAwardConf = MOBILE_HOST + "/conf/pre/specifyAward/getSpecifyAwardConf";
......
......@@ -25,6 +25,13 @@
</classes>
</test>
<test preserve-order="true" name="宝箱时长">
<classes>
<class name="com.kjj.cases.live.manager.TreasureTime"/>
</classes>
</test>
<test preserve-order="true" name="有奖答题配置">
<classes>
<class name="com.kjj.cases.live.manager.QuesReward.Add"/>
......
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