Commit 2801f097 authored by 龚小红's avatar 龚小红

合并绑定关系

parent 42f1df2e
......@@ -145,7 +145,6 @@ public class LiveGuess implements Authorization {
userDetailParam.put("confId",ConfId);
Response response = network.postResponse(userDetailParam, BasicConfig.MOBILE_guess);
HashMap data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(userDetailParam, BasicConfig.MOBILE_guess, "访客H第1次参与猜数字红包失败", response.body().asString()));
this.guessMaxNum=(Integer) data.get("guessMaxNum");
this.guessMinNum = (Integer) data.get("guessMinNum");
......
......@@ -29,7 +29,26 @@ public class LiveBinding implements Authorization {
public String shareSign;
@Test(description = "代理人A分享直播间", priority = 1)
/**
* 添加代理人绑定关系
*/
@Test(description = "代理人绑定", priority = 1)
public void 代理人绑定() {
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
agentAuth();
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
agentAuth1();
bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "代理人A分享直播间", priority = 2)
public void 代理人A分享直播间() {
agentAuth();
Map<String, Object> signParam = new HashMap<>();
......@@ -42,86 +61,52 @@ public class LiveBinding implements Authorization {
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "代理人A与访客A邀请关系绑定", priority = 2)
@Test(description = "代理人A与访客A邀请关系绑定", priority = 3)
public void 代理人A与访客A邀请关系绑定() {
visitorAuth();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign",shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客A获取绑定结果和绑定凭证", priority = 3)
public void 访客A获取绑定结果和绑定凭证() {
visitorAuth();
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客H关系绑定", priority = 8)
public void 访客H关系绑定() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客H绑定结果和绑定凭证", priority = 9)
public void 访客H绑定结果和绑定凭证() {
visitorAuth9();
ThreadSleepUtils.sleep(1000);
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type == 3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
@Test(description = "访客J关系绑定", priority = 13)
public void 访客J关系绑定() {
visitorAuth10();
ThreadSleepUtils.sleep(1000);
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "中奖任务邀请J绑定结果和绑定凭证", priority = 14)
public void 获取访客J绑定结果和绑定凭证() {
visitorAuth10();
ThreadSleepUtils.sleep(1000);
@Test(description = "访客A获取绑定结果和绑定凭证", priority = 4)
public void 访客A获取绑定结果和绑定凭证() {
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth();
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
visitorAuth9();
tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
type = tokenRes.jsonPath().getInt("data.type");
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
visitorAuth10();
tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
type = tokenRes.jsonPath().getInt("data.type");
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
//不同团队代理人绑定邀请关系
@Test(description = "代理人B分享直播间", priority = 15)
@Test(description = "代理人B分享直播间", priority = 5)
public void 代理人B分享直播间() {
agentAuth1();
ThreadSleepUtils.sleep(500);
......@@ -136,7 +121,7 @@ public class LiveBinding implements Authorization {
}
@Test(description = "访客I关系绑定", priority = 16)
@Test(description = "访客I关系绑定", priority = 6)
public void 访客I关系绑定() {
visitorAuth8();
ThreadSleepUtils.sleep(1000);
......@@ -148,7 +133,7 @@ public class LiveBinding implements Authorization {
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "邀请I绑定结果和绑定凭证", priority = 17)
@Test(description = "邀请I绑定结果和绑定凭证", priority = 7)
public void 访客I绑定结果和绑定凭证() {
visitorAuth8();
ThreadSleepUtils.sleep(1000);
......@@ -161,7 +146,7 @@ public class LiveBinding implements Authorization {
}
//用户任务完成
@Test(description = "访客H分享直播间", priority = 7)
@Test(description = "访客H分享直播间", priority = 8)
public void 访客H分享直播间() {
visitorAuth9();
Map<String, Object> params = new HashMap<>();
......@@ -315,7 +300,7 @@ public class LiveBinding implements Authorization {
}
@Test(description = "访客J_分享直播间", priority = 5)
@Test(description = "访客J_分享直播间", priority = 11)
public void 访客J_分享直播间() {
sleep(1000);
Map<String, Object> signParam = new HashMap<>();
......@@ -328,7 +313,7 @@ public class LiveBinding implements Authorization {
Assert.assertNotNull(shareSign, network.message(signParam, MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "邀请Xmz关系绑定", priority = 9)
@Test(description = "邀请Xmz关系绑定", priority = 12)
public void 邀请Xmz关系绑定() {
visitorAuth26();
Map<String, Object> bindingParam = new HashMap<>();
......@@ -340,7 +325,7 @@ public class LiveBinding implements Authorization {
}
@Test(description = "查询访客Xmz绑定结果和绑定凭证", priority = 10)
@Test(description = "查询访客Xmz绑定结果和绑定凭证", priority = 13)
public void 查询访客Xmz绑定结果和绑定凭证() {
visitorAuth26();
sleep(2000);
......@@ -353,8 +338,117 @@ public class LiveBinding implements Authorization {
}
//B 用户邀请
@Test(description = "访客M获取分享加密串", priority = 46)
@Test(description = "访客A_分享直播间", priority = 14)
public void 访客A_分享直播间() {
visitorAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> signParam = new HashMap<>();
signParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
signParam.put("shareType", 2);
Response signRes = network.getResponse(signParam, BasicConfig.MOBILE_sign);
String data = signRes.jsonPath().getString("data");
this.shareSign = data;
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "邀请C关系绑定", priority = 15)
public void 邀请C关系绑定() {
visitorAuth3();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "邀请C绑定结果和绑定凭证", priority = 16)
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客B直播中分享直播间", priority = 17)
public void 访客B直播中分享直播间() {
visitorAuth2();
Map<String, Object> signParam = new HashMap<>();
signParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
signParam.put("shareType", 2);
Response signRes = network.getResponse(signParam, BasicConfig.MOBILE_sign);
String data = signRes.jsonPath().getString("data");
this.shareSign = data;
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "幸运任务邀请D关系绑定", priority = 18)
public void 幸运任务邀请D关系绑定() {
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
visitorAuth4();
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
visitorAuth5();
bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
visitorAuth6();
bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
visitorAuth7();
bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
success = bindingRes.jsonPath().getJsonObject("success");
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 19)
public void 幸运任务邀请D绑定结果和绑定凭证() {
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
visitorAuth4();
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
visitorAuth5();
tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
type = tokenRes.jsonPath().getInt("data.type");
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
visitorAuth6();
tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
type = tokenRes.jsonPath().getInt("data.type");
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
visitorAuth7();
tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
type = tokenRes.jsonPath().getInt("data.type");
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客M获取分享加密串", priority = 20)
public void 访客M获取分享加密串() {
visitorAuth13();
Map<String, Object> signParam = new HashMap<>();
......@@ -367,7 +461,7 @@ public class LiveBinding implements Authorization {
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "访客M与访客N邀请关系绑定", priority = 47)
@Test(description = "访客M与访客N邀请关系绑定", priority = 21)
public void 访客M与访客N邀请关系绑定() {
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -384,7 +478,7 @@ public class LiveBinding implements Authorization {
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客N获取绑定结果和绑定凭证", priority = 48)
@Test(description = "访客N获取绑定结果和绑定凭证", priority = 22)
public void 访客N获取绑定结果和绑定凭证() {
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -402,4 +496,41 @@ public class LiveBinding implements Authorization {
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客N获取分享加密串", priority = 23)
public void 访客N获取分享加密串() {
visitorAuth14();
Map<String, Object> signParam = new HashMap<>();
signParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
signParam.put("shareType", 2);
Response signRes = network.getResponse(signParam, BasicConfig.MOBILE_sign);
String data = signRes.jsonPath().getString("data");
this.shareSign = data;
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "访客N与访客O邀请关系绑定", priority = 24)
public void 访客N与访客O邀请关系绑定() {
visitorAuth15();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign",shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客O获取绑定结果和绑定凭证", priority = 25)
public void 访客O获取绑定结果和绑定凭证() {
visitorAuth15();
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
}
......@@ -282,33 +282,6 @@ public class Lottery implements Authorization {
this.shareSign = data;
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "邀请C关系绑定", priority = 20)
public void 邀请C关系绑定() {
visitorAuth3();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
......@@ -510,32 +483,6 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请D关系绑定", priority = 36)
public void 幸运任务邀请D关系绑定() {
visitorAuth4();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 37)
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客D给访客B助力", priority = 38)
public void 访客D给访客B助力() {
visitorAuth4();
......@@ -594,32 +541,6 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString()));
}
@Test(description = "幸运任务邀请E关系绑定", priority = 42)
public void 幸运任务邀请E关系绑定() {
visitorAuth5();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 43)
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客E给访客B助力", priority = 44)
public void 访客E给访客B助力() {
visitorAuth5();
......@@ -670,31 +591,6 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请F关系绑定", priority = 48)
public void 幸运任务邀请F关系绑定() {
visitorAuth6();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 49)
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客F给访客B助力", priority = 50)
public void 访客F给访客B助力() {
visitorAuth6();
......@@ -753,32 +649,6 @@ public class Lottery implements Authorization {
}
@Test(description = "幸运任务邀请G关系绑定", priority = 54)
public void 幸运任务邀请G关系绑定() {
visitorAuth7();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请G绑定结果和绑定凭证", priority = 55)
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客G给访客B助力", priority = 56)
public void 访客G给访客B助力() {
visitorAuth7();
......
......@@ -203,7 +203,7 @@ public class SecondKill implements Authorization {
@Test(description = "查看当前秒杀商品", priority = 11)
public void 查看当前秒杀商品() {
visitorAuth();
sleep(3000);
sleep(10000);
Map<String, Object> goodsFirstPar = new HashMap<>();
goodsFirstPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response goodsFirstRes = network.getResponse(goodsFirstPar, BasicConfig.MOBILE_secondKill_goodsFirst);
......
......@@ -852,31 +852,6 @@ public class Treasure implements Authorization {
this.shareSign = data;
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "访客N与访客O邀请关系绑定", priority = 69)
public void 访客N与访客O邀请关系绑定() {
visitorAuth15();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign",shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客O获取绑定结果和绑定凭证", priority = 70)
public void 访客O获取绑定结果和绑定凭证() {
visitorAuth15();
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);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客O给访客N助力", priority = 71)
......@@ -991,18 +966,4 @@ public class Treasure implements Authorization {
Assert.assertTrue(dataList.size()==6, network.message(openParam, BasicConfig.MANAGER_participateList, "查询领取列表失败", response.body().asString()));
}
/**
* 添加代理人绑定关系
*/
@Test(description = "代理人绑定", priority = 77)
public void 代理人绑定() {
agentAuth();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
}
......@@ -24,17 +24,23 @@
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="创建直播">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.SaveLive"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="创建直播">
<classes>
<class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes>
</test>
<!-- <test preserve-order="true" name="配置秒杀轮次及秒杀预告">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.secondKill.ConfSecondKill"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="配置秒杀轮次及秒杀预告">
<classes>
<class name="com.kjj.cases.live.secondKill.ConfSecondKill"/>
</classes>
</test>
<test preserve-order="true" name="绑定关系绑定">
<classes>
<class name="com.kjj.cases.live.liveConfig.LiveBinding"/>
</classes>
</test>
<!-- <test preserve-order="true" name="配置代理人邀约奖励">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.inviteReward.ManagerRewardConf"/>-->
......@@ -115,11 +121,11 @@
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="助播-开启直播">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.anchor.OpenLive"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="助播-开启直播">
<classes>
<class name="com.kjj.cases.live.anchor.OpenLive"/>
</classes>
</test>
<!-- <test preserve-order="true" name="评论及回复">-->
<!-- <classes>-->
......@@ -143,17 +149,17 @@
<!-- <class name="com.kjj.cases.live.lottery.Lottery"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="秒杀互动">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.secondKill.SecondKill"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="秒杀互动">
<classes>
<class name="com.kjj.cases.live.secondKill.SecondKill"/>
</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.guess.LiveGuess"/>
</classes>
</test>
<!-- <test preserve-order="true" name="看直播攒现金">-->
<!-- <classes>-->
......@@ -184,11 +190,11 @@
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="有奖答题">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.answer.Answer"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="有奖答题">
<classes>
<class name="com.kjj.cases.live.answer.Answer"/>
</classes>
</test>
<!-- <test preserve-order="true" name="投票">-->
<!-- <classes>-->
......@@ -261,11 +267,11 @@
<!-- <class name="com.kjj.cases.live.customer.PersonalPage" />-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="创建简易直播">
<classes>
<class name="com.kjj.cases.live.liveConfig.SimpleLiveConfig" />
</classes>
</test>
<!-- <test preserve-order="true" name="创建简易直播">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.SimpleLiveConfig" />-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="砸金蛋">
<classes>
<class name="com.kjj.cases.live.treasure.GoldenEgg" />
......
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