Commit dd82d44a authored by 张艳玲's avatar 张艳玲

Merge branch 'Feature/20210325_zz' into 'master'

新增代理人排行榜及我的客户列表

See merge request test-group/kejiji!36
parents 8cd685e7 04bde0f0
package com.kjj.cases.live;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import static com.kjj.config.BasicConfig.*;
public class LiveAgent implements AdminAuthorization {
@BeforeClass
public void setUp() {
agentAuth(); }
public String liveid;
public String pageIndex;
public String pageSize;
public String agentId;
//代理人直播排行榜;
// 获取个人榜;
@Test(description="获取排行榜页面个人榜单",priority = 1)
public void 获取排行榜页面个人榜单() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageIndex",1);
params.put("pageSize",20);
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_AgentPersonalCharts);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_AgentPersonalCharts, "获取个人榜单失败", response.body().asString()));
}
// 获取团队榜;
@Test(description="获取排行榜页面团队榜单",priority = 2)
public void 获取排行榜页面团队榜单() throws IOException{
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageIndex",1);
params.put("pageSize",20);
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_TeamTeamCharts);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params,BasicConfig.MOBILE_TeamTeamCharts,"获取团队榜单失败",response.body().asString()));
}
// 获取队内榜;
@Test(description="获取排行榜页面队内榜单",priority = 3)
public void 获取排行榜页面队内榜单() throws IOException{
Map<String, Object> params = new HashMap<String, Object>();
params.put("pageIndex",1);
params.put("pageSize",20);
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_AgentPersonalTeamCharts);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params,BasicConfig.MOBILE_AgentPersonalTeamCharts,"获取队内榜单失败",response.body().asString()));
}
// 获取代理人直播海报信息;
@Test(description="获取代理人直播海报信息",priority = 4)
public void 获取代理人直播海报信息() throws IOException{
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,MOBILE_GetAgentPosterInfo);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(params,BasicConfig.MOBILE_GetAgentPosterInfo,"获取队内榜单失败",response.body().asString()));
}
//代理人我的客户列表;
// 获取代理人各线索等级的线索数;
@Test(description="获取线索等级的线索数",priority = 5)
public void 获取线索等级的线索数() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueNum);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueNum, "获取线索数失败", response.body().asString()));
}
// 获取直播中直播结束线索列表;
@Test(description="获取线索列表",priority = 6)
public void 获取线索列表() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",2);
params.put("pageSize",30);
params.put("actionTypeList",20);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取线索列表失败", response.body().asString()));
}
// 获取线索列表全部tab;
@Test(description="获取线索列表全部tab数据",priority = 7)
public void 获取线索列表全部tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取全部tab下数据失败", response.body().asString()));
}
// 获取线索列表新客户tab;
@Test(description="获取线索列表新客户tab数据",priority = 8)
public void 获取线索列表新客户tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",22);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取新客户tab下数据失败", response.body().asString()));
}
// 获取线索列表老客户tab;
@Test(description="获取线索列表老客户tab数据",priority = 9)
public void 获取线索列表老客户tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",26);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取老客户tab下数据失败", response.body().asString()));
}
// 获取线索列表未观看tab;
@Test(description="获取线索列表未观看tab数据",priority = 10)
public void 获取线索列表未观看tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",24);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取未观看tab下数据失败", response.body().asString()));
}
// 获取线索列表中奖tab;
@Test(description="获取线索列表中奖tab数据",priority = 11)
public void 获取线索列表中奖tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",17);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取中奖tab下数据失败", response.body().asString()));
}
// 获取线索列表报名tab;
@Test(description="获取线索列表报名tab数据",priority = 12)
public void 获取线索列表报名tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("liveId",liveID);
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",20);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取报名tab下数据失败", response.body().asString()));
}
}
\ No newline at end of file
...@@ -31,7 +31,11 @@ ...@@ -31,7 +31,11 @@
<class name="com.kjj.cases.live.OpenLive"/> <class name="com.kjj.cases.live.OpenLive"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="获取代理人排行榜及客户信息">
<classes>
<class name="com.kjj.cases.live.LiveAgent"/>
</classes>
</test>
<test preserve-order="true" name="助播-结束直播"> <test preserve-order="true" name="助播-结束直播">
<classes> <classes>
<class name="com.kjj.cases.live.CloseLive"/> <class name="com.kjj.cases.live.CloseLive"/>
......
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