Commit 1ad5c133 authored by 张艳玲's avatar 张艳玲

update

parent a8a03444
......@@ -1411,63 +1411,63 @@ public class SaveLive implements Authorization {
* 翻牌活动配置
*/
@Test(description = "保存翻牌配置", priority = 69)
public void 保存翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("withdrawalAmount", 100);
Params.put("withdrawalCondition", 1);
Params.put("withdrawalNum", 1);
Params.put("invitePresentNum", 1);
Params.put("initPresentNum", 10);
Params.put("imgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
Params.put("secondImgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
Response response = network.postResponse(Params, BasicConfig.MANAGER_card);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_card, "保存翻牌配置失败", response.body().asString()));
}
@Test(description = "查看直播翻牌配置详情", priority = 70)
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_cardDetail);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_cardDetail, "查看直播翻牌配置详情失败", response.body().asString()));
}
@Test(description = "开启翻牌配置", priority = 71)
public void 开启翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("confStatus", 1);
Response response = network.postResponse(Params, BasicConfig.MANAGER_switch);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switch, "开启翻牌配置失败", response.body().asString()));
}
@Test(description = "查看直播配置", priority = 72)
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);
boolean cardConfBuildStatus = response.jsonPath().getBoolean("data.cardConfBuildStatus");
System.out.println(cardConfBuildStatus);
Assert.assertTrue(cardConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
boolean cardConfStatus = response.jsonPath().getBoolean("data.cardConfStatus");
System.out.println(cardConfStatus);
Assert.assertTrue(cardConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
}
// @Test(description = "保存翻牌配置", priority = 69)
// public void 保存翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("withdrawalAmount", 100);
// Params.put("withdrawalCondition", 1);
// Params.put("withdrawalNum", 1);
// Params.put("invitePresentNum", 1);
// Params.put("initPresentNum", 10);
// Params.put("imgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Params.put("secondImgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Response response = network.postResponse(Params, BasicConfig.MANAGER_card);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_card, "保存翻牌配置失败", response.body().asString()));
//
// }
//
// @Test(description = "查看直播翻牌配置详情", priority = 70)
// 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_cardDetail);
// Object data = response.jsonPath().getJsonObject("data");
// System.out.println(data);
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_cardDetail, "查看直播翻牌配置详情失败", response.body().asString()));
//
// }
//
//
// @Test(description = "开启翻牌配置", priority = 71)
// public void 开启翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("confStatus", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_switch);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switch, "开启翻牌配置失败", response.body().asString()));
//
// }
//
// @Test(description = "查看直播配置", priority = 72)
// 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);
// boolean cardConfBuildStatus = response.jsonPath().getBoolean("data.cardConfBuildStatus");
// System.out.println(cardConfBuildStatus);
// Assert.assertTrue(cardConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
//
// boolean cardConfStatus = response.jsonPath().getBoolean("data.cardConfStatus");
// System.out.println(cardConfStatus);
// Assert.assertTrue(cardConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
//
//
// }
/**
* 直播中过渡视频
......@@ -1920,7 +1920,141 @@ public class SaveLive implements Authorization {
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_switchOpen, "获取红包配置详情失败", response.body().asString()));
}
/**
* 预告页配置
*/
public List<WelfareList> welfareId;
@Test(description = "查询福利列表", priority = 102)
public void 查询福利列表() {
Map<String, Object> Params = new HashMap<>();
Params.put("companyId", 101);
Params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("pageIndex", 1);
Params.put("pageSize", 50);
Response response = network.getResponse(Params, BasicConfig.MANAGER_preViewWelfareList);
System.out.println(response.body().asString());
List<WelfareList> welfareLists=JsonUtil.parseResponseToListBean(response,WelfareList.class);
this.welfareId=welfareLists;
Assert.assertNotNull(welfareLists, network.message(Params, BasicConfig.MANAGER_preViewWelfareList, "查询福利列表失败", response.body().asString()));
}
@Test(description = "配置预告页的主奖品", priority = 103)
public void 配置预告页的主奖品() {
Map<String, Object> Params = new HashMap<>();
Params.put("welfareId", this.welfareId.get(0).getId());
Params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("openState",3);
Response response = network.postResponse(Params, BasicConfig.MANAGER_confMainWelfare);
System.out.println(response.body().asString());
boolean success=response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(Params, BasicConfig.MANAGER_confMainWelfare, "预告页主奖品配置失败", response.body().asString()));
}
@Test(description = "查询预告页配置的主奖品", priority = 104)
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_getMainWelfare);
System.out.println(response.body().asString());
int openState=response.jsonPath().getInt("data.openState");
Assert.assertTrue(openState==3, network.message(Params, BasicConfig.MANAGER_getMainWelfare, "预告页开启状态不匹配", response.body().asString()));
long welfareId=response.jsonPath().getLong("data.welfareId");
Assert.assertEquals(welfareId,this.welfareId.get(0).getId(), network.message(Params, BasicConfig.MANAGER_getMainWelfare, "选中的福利ID不匹配", response.body().asString()));
}
/**
* 好运红包
*/
@Test(description = "新增好运红包配置", priority = 105)
public void 新增好运红包配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("amount",30);
Params.put("drawProbability",0);
Params.put("num",1);
Params.put("redAmount",30);
Params.put("redProbability",100);
Params.put("ruleType",1);
Response response = network.postResponse(Params, BasicConfig.MANAGER_redSaveOrUpdate);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_redSaveOrUpdate, "好运红包配置失败", response.body().asString()));
}
@Test(description = "获取好运红包配置详情", priority = 106)
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_redConfDetail);
System.out.println(response.body().asString());
int amount=response.jsonPath().getInt("data.amount");
Assert.assertTrue(amount==30, network.message(Params, BasicConfig.MANAGER_redConfDetail, "好运红包配置金额不对", response.body().asString()));
int num=response.jsonPath().getInt("data.num");
Assert.assertTrue(num==1, network.message(Params, BasicConfig.MANAGER_redConfDetail, "好运红包配置总数不对", response.body().asString()));
}
@Test(description = "开启好运配置开关", priority = 107)
public void 开启好运配置开关() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("confStatus", 1);
Response response = network.postResponse(Params, BasicConfig.MANAGER_redSwitch);
System.out.println(response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_redSwitch, "好运红包配置开启失败", response.body().asString()));
}
}
/**
* 直播预告页弹窗
*/
@Test(description = "直播预告页弹窗配置", priority = 108)
public void 直播预告页弹窗配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("appointmentImg","https://yun.dui88.com/kjy/image/20210715/1626339172280.png");
Params.put("baseInfoImg","https://yun.dui88.com/kjy/image/20210715/1626339160430.png");
Params.put("helpImg","https://yun.dui88.com/kjy/image/20210715/1626339153289.png");
Params.put("phoneImg","https://yun.dui88.com/kjy/image/20210715/1626339166395.png");
Response response = network.postResponse(Params, BasicConfig.MANAGER_insertOrUpdate);
System.out.println(response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_insertOrUpdate, "直播预告页弹窗配置失败", response.body().asString()));
}
@Test(description = "预告页弹窗详情", priority = 109)
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_preLayer);
System.out.println(response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_preLayer, "预告页弹窗详情获取失败", response.body().asString()));
}
@Test(description = "开启预告页弹窗", priority = 110)
public void 开启预告页弹窗() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("open",true);
Response response = network.postResponse(Params, BasicConfig.MANAGER_openPreLayer);
System.out.println(response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_openPreLayer, "预告页弹窗开启失败", response.body().asString()));
}
}
......@@ -89,6 +89,21 @@ public class BasicConfig {
public static final String ANCHOR_getConfDetail = MOBILE_HOST + "/conf/pre/getConfDetail";
public static final String ANCHOR_CLOSE = MOBILE_HOST + "/conf/live/close";
// *************** 预告页配置 ***************
public static final String MANAGER_preViewWelfareList = MANAGER_HOST + "/kjy/manager/preView/conf/welfareList";
public static final String MANAGER_confMainWelfare = MANAGER_HOST + "/kjy/manager/preView/conf/confMainWelfare";
public static final String MANAGER_getMainWelfare = MANAGER_HOST + "/kjy/manager/preView/conf/getMainWelfare";
// *************** 好运红包 ***************
public static final String MANAGER_redSaveOrUpdate = MANAGER_HOST + "/kjy/manager/live/fortune/red/saveOrUpdate";
public static final String MANAGER_redConfDetail = MANAGER_HOST + "/kjy/manager/live/fortune/red/confDetail";
public static final String MANAGER_redSwitch = MANAGER_HOST + "/kjy/manager/live/fortune/red/status/switch";
public static final String MANAGER_insertOrUpdate = MANAGER_HOST + "/kjy/manager/live/pre/conf/insertOrUpdate";
public static final String MANAGER_preLayer = MANAGER_HOST + "/kjy/manager/live/pre/conf/preLayer";
public static final String MANAGER_openPreLayer = MANAGER_HOST + "/kjy/manager/live/pre/conf/openPreLayer";
// *************** 闯关答题 ***************
public static final String MANAGER_addOrUpdateQues = MANAGER_HOST + "/kjy/manager/pass/ques/addOrUpdateQues";
public static final String MANAGER_deleteQues = MANAGER_HOST + "/kjy/manager/pass/ques/deleteQues";
......
......@@ -57,11 +57,11 @@
</classes>
</test>
<test preserve-order="true" name="翻牌红包">
<classes>
<class name="com.kjj.cases.live.flipCard.FlipCard"/>
</classes>
</test>
<!-- <test preserve-order="false" name="翻牌红包">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.flipCard.FlipCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="中奖规则配置">
<classes>
......
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