Commit b8f87874 authored by 郭姣's avatar 郭姣

删除首页公司专区的ID变更

parent c69e1157
package com.kjj.bean.manager;
import lombok.Data;
@Data
public class RedLevelBean {
private int amount;
private int num;
}
package com.kjj.cases.live.flipCard;
import com.kjj.bean.manager.RedLevelBean;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
......@@ -108,6 +109,99 @@ public class FlipCard implements Authorization {
}
*/
@Test(description = "保存翻牌配置", priority = 1)
public void 保存翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//Params.put("liveId",6441);
Params.put("freeNum",3);
Params.put("helpNum",1);
List<RedLevelBean> RedLevels = new ArrayList<>();
RedLevelBean redLevel1 = new RedLevelBean();
redLevel1.setAmount(30); //红包金额为0.3
redLevel1.setNum(1); //红包数量
RedLevels.add(redLevel1); //红包等级I
RedLevelBean redLevel2 = new RedLevelBean();
redLevel2.setAmount(40); //红包金额为0.4
redLevel2.setNum(1); //红包数量
RedLevels.add(redLevel2); //红包等级II
Params.put("stepReds",RedLevels);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveOrUpdateV2);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveOrUpdateV2, "保存翻牌配置失败", response.body().asString()));
}
@Test(description = "开启翻牌配置", priority = 2)
public void 开启翻牌配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//Params.put("liveId",6441);
Params.put("confStatus",2);
Response response = network.postResponse(Params, BasicConfig.MANAGER_wordSwitchStatus);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_wordSwitchStatus, "开启翻牌配置失败", response.body().asString()));
}
@Test(description = "编辑红包等级",priority = 3)
public void 编辑红包等级(){
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//Params.put("liveId",6451);
Params.put("freeNum",3);
Params.put("helpNum",1);
List<RedLevelBean> RedLevels = new ArrayList<>();
RedLevelBean redLevel1 = new RedLevelBean();
redLevel1.setAmount(50); //红包金额为0.5
redLevel1.setNum(1); //红包数量
RedLevels.add(redLevel1); //红包等级III
Params.put("stepReds",RedLevels);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveOrUpdateV2);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_saveOrUpdateV2, "编辑翻牌红包等级失败", response.body().asString()));
}
@Test(description = "查看直播翻牌配置详情", priority = 4)
public void 查看直播翻牌配置详情() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//Params.put("liveId",6439);
Response response = network.getResponse(Params, BasicConfig.MANAGER_detailV2);
Object data = response.jsonPath().getJsonObject("data");
redConfId = response.jsonPath().getString("data.stepReds.get(2).redConfId");
System.out.println(data);
System.out.println(redConfId);
Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_detailV2, "查看直播翻牌配置详情失败", response.body().asString()));
}
@Test(description = "删除红包等级",priority = 5)
public void 删除红包等级(){
Map<String,Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//Params.put("liveId",6439);
Params.put("redConfId",redConfId);
//Params.put("redConfId",28877);
Response response = network.postResponse(Params,BasicConfig.MANAGER_wordDelete);
boolean data = response.jsonPath().getBoolean("data");
String desc = response.jsonPath().getString("desc");
Assert.assertTrue(data, network.message(Params,BasicConfig.MANAGER_wordDelete,"删除红包等级失败",response.body().asString()));
Assert.assertEquals(desc,"OK",network.message(Params,BasicConfig.MANAGER_wordDelete,"删除红包等级失败",response.body().asString()));
}
@Test(description = "查看直播配置", priority = 6)
public void 查看直播配置() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
//Params.put("liveId",6439);
Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
boolean flipWordConfBuildStatus = response.jsonPath().getBoolean("data.flipWordConfBuildStatus");
System.out.println(flipWordConfBuildStatus);
Assert.assertTrue(flipWordConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
boolean flipWordConfStatus = response.jsonPath().getBoolean("data.flipWordConfStatus");
System.out.println(flipWordConfStatus);
Assert.assertTrue(flipWordConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
}
//用户任务完成
@Test(description = "访客H分享直播间", priority = 7)
public void 访客H分享直播间() {
......@@ -177,7 +271,7 @@ public class FlipCard implements Authorization {
}
/*
@Test(description = "已登录查询分享人头像昵称", priority = 11)
public void 已登录查询分享人头像昵称() {
......@@ -293,7 +387,7 @@ public class FlipCard implements Authorization {
}
*/
//预约
@Test(description = "翻牌集字_预约", priority = 16)
......@@ -320,7 +414,7 @@ public class FlipCard implements Authorization {
}
/*
@Test(description = "用户完成任务情况", priority = 17)
public void 用户完成任务情况() {
......@@ -550,5 +644,5 @@ public class FlipCard implements Authorization {
}
*/
}
......@@ -252,6 +252,9 @@ public class BasicConfig {
public static final String MANAGER_flipWord = MANAGER_HOST + "/kjy/manager/flip/word/saveOrUpdate";
public static final String MANAGER_wordSwitchStatus = MANAGER_HOST + "/kjy/manager/flip/word/switchStatus";
public static final String MANAGER_wordDetail = MANAGER_HOST + "/kjy/manager/flip/word/detail";
public static final String MANAGER_saveOrUpdateV2 = MANAGER_HOST +"/kjy/manager/flip/word/saveOrUpdate/v2";
public static final String MANAGER_detailV2 = MANAGER_HOST +"/kjy/manager/flip/word/detail/v2";
public static final String MANAGER_wordDelete = MANAGER_HOST +"/kjy/manager/flip/word/delete";
public static final String MOBILE_status = MOBILE_HOST + "/kjy/live/flip/word/status";
public static final String MOBILE_wordConf= MOBILE_HOST + "/kjy/live/flip/word/conf";
......@@ -267,6 +270,7 @@ public class BasicConfig {
public static final String MOBILE_record= MOBILE_HOST + "/kjy/live/flip/word/user/record";
public static final String MOBILE_turn= MOBILE_HOST + "/kjy/live/flip/word/turn";
public static final String MOBILE_turnState= MOBILE_HOST + "/kjy/live/flip/word/turn/state";
public static final String MOBILE_confV2= MOBILE_HOST +"/kjy/live/flip/word/conf/v2";
// *************** 直播间过渡视频 ***************
public static final String MANAGER_confCaveOrUpdate = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/saveOrUpdate";
public static final String MANAGER_videoSwitch = MANAGER_HOST + "/kjy/manager/live/trans/video/conf/status/switch";
......
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