Commit 04d76684 authored by 张艳玲's avatar 张艳玲

更新直播前客户统计

parent 5d1764d4
......@@ -416,8 +416,20 @@ public class Agent implements Authorization {
/**
* 邀约
*/
@Test(description="获取代理人是否有邀请权限",priority = 26)
public void 获取代理人是否有邀请权限() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,MOBILE_hasInviteAuth);
System.out.println(response.body().asString());
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MOBILE_hasInviteAuth,"代理人没有邀请权限",response.body().asString()));
}
// 获取代理人直播海报信息;
@Test(description="获取代理人直播海报信息",priority = 26)
@Test(description="获取代理人直播海报信息",priority = 27)
public void 获取代理人直播海报信息() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -429,6 +441,7 @@ public class Agent implements Authorization {
}
}
......
......@@ -14,12 +14,25 @@ import java.util.Map;
public class LiveBefore implements Authorization {
@BeforeClass
public void setUp() {
agentAuth(); }
public void setUp() { agentAuth(); }
public String pageSize;
@Test(description="直播前客户数量统计",priority = 1)
public void 直播前客户数量统计() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_customerStat);
System.out.println(response.body().asString());
int allNum = response.jsonPath().getInt("data.allNum");
Assert.assertTrue(allNum>0, network.message(params, BasicConfig.MOBILE_customerStat, "客户总数为null", response.body().asString()));
int newCustomNum = response.jsonPath().getInt("data.newCustomNum");
Assert.assertTrue(newCustomNum>0, network.message(params, BasicConfig.MOBILE_customerStat, "新客户数量未null", response.body().asString()));
int oldCustomNum = response.jsonPath().getInt("data.oldCustomNum");
Assert.assertTrue(oldCustomNum>0, network.message(params, BasicConfig.MOBILE_customerStat, "老客户数量未null", response.body().asString()));
}
//直播前我的客户页面
// 获取直播前我的客户页面全部tab;
@Test(description="获取直播前我的客户页面全部tab数据",priority = 1)
public void 获取直播前我的客户页面全部tab数据() {
......@@ -28,9 +41,9 @@ public class LiveBefore implements Authorization {
params.put("pageIndex",1);
params.put("pageSize",30);
Response response = network.getResponse(params,BasicConfig.MOBILE_MyCustomerList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_MyCustomerList, "获取直播前全部tab下数据失败", response.body().asString()));
System.out.println(response.body().asString());
Object list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_MyCustomerList, "获取直播前全部tab下数据失败", response.body().asString()));
}
// 获取直播前我的客户页面直接邀请tab;
......@@ -42,9 +55,9 @@ public class LiveBefore implements Authorization {
params.put("pageSize",30);
params.put("directly",1);
Response response = network.getResponse(params,BasicConfig.MOBILE_MyCustomerList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_MyCustomerList, "获取直播前我的客户页面直接邀请tab数据失败", response.body().asString()));
System.out.println(response.body().asString());
Object list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_MyCustomerList, "获取直播前我的客户页面直接邀请tab数据失败", response.body().asString()));
}
// 获取直播前我的客户页面转介绍tab;
......@@ -56,9 +69,9 @@ public class LiveBefore implements Authorization {
params.put("pageSize",30);
params.put("directly",0);
Response response = network.getResponse(params,BasicConfig.MOBILE_MyCustomerList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_MyCustomerList, "获取直播前我的客户页面转介绍tab数据失败", response.body().asString()));
System.out.println(response.body().asString());
Object list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list, network.message(params, BasicConfig.MOBILE_MyCustomerList, "获取直播前我的客户页面转介绍tab数据失败", response.body().asString()));
}
......
......@@ -309,9 +309,12 @@ public class DesignatedWinner implements Authorization {
Map<String, Object> AwardInfoParam = new HashMap<>();
AwardInfoParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response AAwardInfoRes = network.getResponse(AwardInfoParam, BasicConfig.MOBILE_agentSpecifyAwardInfo);
Object data = AAwardInfoRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(AwardInfoParam, BasicConfig.MOBILE_agentSpecifyAwardInfo, "查询指定中奖信息失败", AAwardInfoRes.body().asString()));
System.out.println(AAwardInfoRes.body().asString());
boolean specifyAwardConfEnable = AAwardInfoRes.jsonPath().getBoolean("data.specifyAwardConfEnable");
Assert.assertTrue(specifyAwardConfEnable, network.message(AwardInfoParam, BasicConfig.MOBILE_agentSpecifyAwardInfo, "指定中奖配置未开启", AAwardInfoRes.body().asString()));
int agentSpecifyCount = AAwardInfoRes.jsonPath().getInt("data.agentSpecifyCount");
Assert.assertTrue(agentSpecifyCount==1, network.message(AwardInfoParam, BasicConfig.MOBILE_agentSpecifyAwardInfo, "指定数量未null", AAwardInfoRes.body().asString()));
}
......
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