Commit ccd2e2db authored by xiamengchen's avatar xiamengchen

0916直播接口报错fix

parent caf6e3c8
......@@ -177,6 +177,7 @@ public class FlipCard implements Authorization {
}
/*
@Test(description = "已登录查询分享人头像昵称", priority = 11)
public void 已登录查询分享人头像昵称() {
......@@ -201,7 +202,6 @@ public class FlipCard implements Authorization {
}
/*
@Test(description = "访客H获得助力", priority = 12)
public void 访客H获得助力() {
......
......@@ -1886,6 +1886,7 @@ public class SaveLive implements Authorization {
Params.put("redAmount",30);
Params.put("redProbability",100);
Params.put("ruleType",1);
Params.put("showType", 0); // 取消红包封面最高66元标签展示
Response response = network.postResponse(Params, BasicConfig.MANAGER_redSaveOrUpdate);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
......
......@@ -361,9 +361,8 @@ public class Lottery implements Authorization {
Assert.assertTrue(firstGet, network.message(Params, BasicConfig.ANCHOR_getRed, "非第1次获取好运红包", response.body().asString()));
int redNum = response.jsonPath().getInt("data.redNum");
Assert.assertTrue(redNum>1, network.message(Params, BasicConfig.ANCHOR_getRed, "红包个数不对", response.body().asString()));
int showtype = response.jsonPath().getInt("data.showType");
Assert.assertEquals(showtype, 0, network.message(Params, BasicConfig.ANCHOR_getRed, "红包封面图标签展示状态不对", response.body().asString()));
}
@Test(description = "访客A分享好运红包给访客B", priority = 27)
......
......@@ -205,7 +205,7 @@ public class SecondKill implements Authorization {
Response downgradeGoodsRes = network.getResponse(downgradeGoodsPar, BasicConfig.MOBILE_secondKill_downgradeGoodsFirst);
try {
String confId = downgradeGoodsRes.jsonPath().getString("data.confId");
Assert.assertEquals(confId, ConfSecondKill.skIdFirst, network.message(downgradeGoodsPar, BasicConfig.MOBILE_secondKill_goodsFirst, "当前秒杀商品配置ID错误", downgradeGoodsRes.body().asString()));
Assert.assertEquals(confId, ConfSecondKill.skIdSecond, network.message(downgradeGoodsPar, BasicConfig.MOBILE_secondKill_goodsFirst, "当前秒杀商品配置ID错误", downgradeGoodsRes.body().asString()));
}catch (NullPointerException e){
e.printStackTrace();
Assert.fail(network.message(downgradeGoodsPar, BasicConfig.MOBILE_secondKill_goodsFirst, "未获取到数据", downgradeGoodsRes.body().asString()));
......
......@@ -99,7 +99,7 @@ public class Treasure implements Authorization {
Map<String, Object> confDetailParam = new HashMap<>();
confDetailParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Response response = network.getResponse(confDetailParam, BasicConfig.MANAGER_confDetail);
System.out.println(response);
System.out.println(response.body().asString());
Integer openCondition = response.jsonPath().getInt("data.openCondition");
System.out.println(openCondition);
Assert.assertTrue(openCondition > 0, network.message(confDetailParam, BasicConfig.MANAGER_confDetail, "查询宝箱配置详情失败", response.body().asString()));
......@@ -146,7 +146,6 @@ public class Treasure implements Authorization {
}
@Test(description = "选择宝箱", priority = 7)
public void 选择宝箱() {
visitorAuth9();
......@@ -183,6 +182,7 @@ public class Treasure implements Authorization {
infoParam.put("shareType",7);
infoParam.put("userType","A");
Response response = network.getResponse(infoParam, BasicConfig.MOBILE_helpInfo);
System.out.println(response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(infoParam, BasicConfig.MOBILE_helpInfo, "根据分享类型获取分享内容", response.body().asString()));
......@@ -647,6 +647,7 @@ public class Treasure implements Authorization {
JSONObject treasureAward = treasureConf.getJSONObject("treasureAward");
treasureAward.put("winLimitCount",-1);//-1无限制,1限制1次
Response response = network.postResponse(treasureConf, BasicConfig.MANAGER_saveTreasureConf);
System.out.println(response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(treasureConf, BasicConfig.MANAGER_saveTreasureConf, "新增宝箱裂变配置失败", response.body().asString()));
......@@ -876,8 +877,60 @@ public class Treasure implements Authorization {
}
@Test(description = "宝箱开启后可增加实物奖励数量", priority = 57)
public void 宝箱开启后可增加实物奖励数量() {
JSONObject treasureAward = treasureConf.getJSONObject("treasureAward");
treasureAward.put("totalNum", 4); // 增加实物奖励数量
Response response = network.postResponse(treasureConf, BasicConfig.MANAGER_saveTreasureConf);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(treasureConf, BasicConfig.MANAGER_saveTreasureConf, "增加实物奖励数量失败", response.body().asString()));
}
@Test(description = "宝箱开启后不可减少奖品数量", priority = 58)
public void 宝箱开启后不可减少奖品数量() {
JSONObject treasureAward = treasureConf.getJSONObject("treasureAward");
treasureAward.put("totalNum", 2); // 减少实物奖励数量
Response response = network.postResponse(treasureConf, BasicConfig.MANAGER_saveTreasureConf);
System.out.println(response.body().asString());
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertFalse(success, network.message(treasureConf, BasicConfig.MANAGER_saveTreasureConf, "减少实物奖励数量成功", response.body().asString()));
treasureAward.put("totalNum", 4); // 还原treasureConf配置
}
@Test(description = "宝箱开启后可设置实物奖励数量无上限", priority = 59)
public void 宝箱开启后可设置实物奖励数量无上限() {
JSONObject treasureAward = treasureConf.getJSONObject("treasureAward");
treasureAward.put("ruleType", 2); // 设置实物奖励数量无上限
treasureAward.put("totalNum", -1);
Response response = network.postResponse(treasureConf, BasicConfig.MANAGER_saveTreasureConf);
System.out.println(response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(treasureConf, BasicConfig.MANAGER_saveTreasureConf, "设置实物奖励数量无上限失败", response.body().asString()));
}
@Test(description = "宝箱开启后不可将实物奖励数量由无上限变为有上限", priority = 60)
public void 宝箱开启后不可将实物奖励数量由无上限变为有上限() {
JSONObject treasureAward = treasureConf.getJSONObject("treasureAward");
treasureAward.put("ruleType", 1); // 设置实物奖励数量有上限
treasureAward.put("totalNum", 3);
Response response = network.postResponse(treasureConf, BasicConfig.MANAGER_saveTreasureConf);
System.out.println(response.body().asString());
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertFalse(success, network.message(treasureConf, BasicConfig.MANAGER_saveTreasureConf, "设置实物奖励数量有上限成功", response.body().asString()));
@Test(description = "宝箱红包限制1次", priority = 57)
treasureAward.put("ruleType", 2);
treasureAward.put("totalNum", -1); // 还原treasureConf配置
}
@Test(description = "宝箱红包限制1次", priority = 61)
public void 宝箱红包限制1() {
JSONObject treasureRed = treasureConf.getJSONObject("treasureRed");
......@@ -885,6 +938,7 @@ public class Treasure implements Authorization {
JSONObject treasureAward = treasureConf.getJSONObject("treasureAward");
treasureAward.put("treasureProbability","0");
Response response = network.postResponse(treasureConf, BasicConfig.MANAGER_saveTreasureConf);
System.out.println(response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(treasureConf, BasicConfig.MANAGER_saveTreasureConf, "修改宝箱裂变配置失败", response.body().asString()));
......@@ -892,7 +946,7 @@ public class Treasure implements Authorization {
}
//访客A领取红包
@Test(description = "访客H第5次参与详情的进度显示", priority = 58)
@Test(description = "访客H第5次参与详情的进度显示", priority = 62)
public void 访客H5次参与详情的进度显示() {
visitorAuth9();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -904,7 +958,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(invitationNum>0, network.message(InfoParam, BasicConfig.MANAGER_treasureUserInfo, "查询第5次参与详情进度失败", response.body().asString()));
}
@Test(description = "访客H开启第5次宝箱获得红包", priority = 59)
@Test(description = "访客H开启第5次宝箱获得红包", priority = 63)
public void 访客H开启第5次宝箱获得红包() {
visitorAuth9();
ThreadSleepUtils.sleep(15000);
......@@ -920,7 +974,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第5轮开宝箱参与详情", priority = 60)
@Test(description = "访客H第5轮开宝箱参与详情", priority = 64)
public void 访客H5轮开宝箱参与详情() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -940,7 +994,7 @@ public class Treasure implements Authorization {
//访客A降级抽奖码
@Test(description = "访客H第6次参与详情的进度显示", priority = 61)
@Test(description = "访客H第6次参与详情的进度显示", priority = 65)
public void 访客H6次参与详情的进度显示() {
visitorAuth9();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -952,7 +1006,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(invitationNum>0, network.message(InfoParam, BasicConfig.MANAGER_treasureUserInfo, "查询第6次参与详情进度失败", response.body().asString()));
}
@Test(description = "访客H开启第6次宝箱降级抽奖码", priority = 62)
@Test(description = "访客H开启第6次宝箱降级抽奖码", priority = 66)
public void 访客H开启第6次宝箱降级抽奖码() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -967,7 +1021,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H第6轮开宝箱参与详情", priority = 63)
@Test(description = "访客H第6轮开宝箱参与详情", priority = 67)
public void 访客H6轮开宝箱参与详情() {
visitorAuth9();
ThreadSleepUtils.sleep(2000);
......@@ -986,7 +1040,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客N获取分享加密串", priority = 64)
@Test(description = "访客N获取分享加密串", priority = 68)
public void 访客N获取分享加密串() {
visitorAuth14();
Map<String, Object> signParam = new HashMap<>();
......@@ -1000,7 +1054,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客N与访客O邀请关系绑定", priority = 65)
@Test(description = "访客N与访客O邀请关系绑定", priority = 69)
public void 访客N与访客O邀请关系绑定() {
visitorAuth15();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -1012,7 +1066,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客O获取绑定结果和绑定凭证", priority = 66)
@Test(description = "访客O获取绑定结果和绑定凭证", priority = 70)
public void 访客O获取绑定结果和绑定凭证() {
visitorAuth15();
ThreadSleepUtils.sleep(2000);
......@@ -1024,7 +1078,7 @@ public class Treasure implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客O给访客N助力", priority = 67)
@Test(description = "访客O给访客N助力", priority = 71)
public void 访客O给访客N助力() {
visitorAuth15();
Map<String, Object> infoParam = new HashMap<>();
......@@ -1041,7 +1095,7 @@ public class Treasure implements Authorization {
//访客M和N同时抢红包
@Test(description = "访客M参与详情的进度显示", priority = 68)
@Test(description = "访客M参与详情的进度显示", priority = 72)
public void 访客M参与详情的进度显示() {
visitorAuth13();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -1054,7 +1108,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客N参与详情的进度显示", priority = 69)
@Test(description = "访客N参与详情的进度显示", priority = 73)
public void 访客N参与详情的进度显示() {
visitorAuth14();
Map<String, Object> InfoParam = new HashMap<>();
......@@ -1068,7 +1122,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客M和访客N同时开启宝箱验证红包是否超发", priority = 70)
@Test(description = "访客M和访客N同时开启宝箱验证红包是否超发", priority = 74)
public void 访客M和访客N同时开启宝箱验证红包是否超发() {
Map<String, Object> openParam = new HashMap<>();
openParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -1092,7 +1146,7 @@ public class Treasure implements Authorization {
@Test(description = "访客M和访客N第7轮开宝箱参与详情", priority = 71)
@Test(description = "访客M和访客N第7轮开宝箱参与详情", priority = 75)
public void 访客M和访客N7轮开宝箱参与详情() {
ThreadSleepUtils.sleep(3000);
Map<String, Object> infoParam = new HashMap<>();
......@@ -1123,7 +1177,7 @@ public class Treasure implements Authorization {
}
@Test(description = "访客H宝箱领取记录", priority = 72)
@Test(description = "访客H宝箱领取记录", priority = 76)
public void 访客H宝箱领取记录() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
......@@ -1140,7 +1194,7 @@ public class Treasure implements Authorization {
/**
* 添加代理人绑定关系
*/
@Test(description = "代理人绑定", priority = 73)
@Test(description = "代理人绑定", priority = 77)
public void 代理人绑定() {
agentAuth();
Map<String, Object> bindingParam = new HashMap<>();
......
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