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

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

完善代理人我的客户、中奖名单、精彩视频逻辑;

See merge request test-group/kejiji!50
parents 73f3bd25 2630f8f1
package com.kjj.cases.live.agent;
import com.kjj.cases.live.admin.AdminAuthorization;
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 LiveBefore implements AdminAuthorization {
@BeforeClass
public void setUp() {
agentAuth(); }
public String pageSize;
//直播前我的客户页面
// 获取直播前我的客户页面全部tab;
@Test(description="获取直播前我的客户页面全部tab数据",priority = 1)
public void 获取直播前我的客户页面全部tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
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_MyCustomerList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_MyCustomerList, "获取直播前全部tab下数据失败", response.body().asString()));
}
// 获取直播前我的客户页面直接邀请tab;
@Test(description="获取直播前我的客户页面直接邀请tab数据",priority = 2)
public void 获取直播前我的客户页面直接邀请tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
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()));
}
// 获取直播前我的客户页面转介绍tab;
@Test(description="获取直播前我的客户页面转介绍tab数据",priority = 3)
public void 获取直播前我的客户页面转介绍tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
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()));
}
}
package com.kjj.cases.live.agent;
import com.kjj.cases.live.admin.AdminAuthorization;
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 LiveLater implements AdminAuthorization {
@BeforeClass
public void setUp() {
agentAuth(); }
public String pageSize;
public String invitationNum;
public String allNum;
public String moreThan20MinNum;
public String sellerName;
public String phoneNumber;
public String jobNumber;
public String teamName;
//直播结束我的客户页面
// 获取直播结束我的客户页面全部tab;
@Test(description="获取直播结束我的客户页面全部tab数据",priority = 1)
public void 获取直播结束我的客户页面全部tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
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");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播结束后全部tab下数据失败", response.body().asString()));
}
// 获取直播结束我的客户页面直接邀请tab;
@Test(description="获取直播结束我的客户页面直接邀请tab数据",priority = 2)
public void 获取直播结束我的客户页面直接邀请tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
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");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播结束我的客户页面直接邀请tab数据失败", response.body().asString()));
}
// 获取直播结束我的客户页面转介绍tab;
@Test(description="获取直播结束我的客户页面转介绍tab数据",priority = 3)
public void 获取直播结束我的客户页面转介绍tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
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");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播结束我的客户页面转介绍tab数据失败", response.body().asString()));
}
// 获取直播结束我的客户页面中奖tab;
@Test(description="获取直播结束我的客户页面中奖tab数据",priority = 4)
public void 获取直播结束我的客户页面中奖tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
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");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播结束我的客户页面中奖tab数据失败", response.body().asString()));
}
// 获取直播结束我的客户页面报名tab;
@Test(description="获取直播结束我的客户页面报名tab数据",priority = 5)
public void 获取直播结束我的客户页面报名tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
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");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播结束我的客户页面报名tab数据失败", response.body().asString()));
}
// 获取直播结束我的客户页面观看20分钟+tab;
@Test(description="获取直播结束我的客户页面观看20分钟+tab数据",priority = 6)
public void 获取直播结束我的客户页面观看20分钟以上tab数据() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("pageIndex",1);
params.put("pageSize",30);
params.put("actionTypeList",4);
Response response = network.getResponse(params,BasicConfig.MOBILE_ClueList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_ClueList, "获取直播结束我的客户页面观看20分钟以上tab数据失败", response.body().asString()));
}
//直播结束后中奖名单查询
// 获取直播结束中奖名单;
@Test(description="获取直播结束中奖名单",priority = 7)
public void 获取直播结束中奖名单() throws IOException {
Map<String, Object> params = new HashMap<String, Object>();
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_RewardAgentList);
boolean success = response.jsonPath().getBoolean("success");
System.out.println(success);
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_RewardAgentList, "获取直播结束中奖名单失败", response.body().asString()));
}
}
...@@ -3,7 +3,7 @@ package com.kjj.config; ...@@ -3,7 +3,7 @@ package com.kjj.config;
public class BasicConfig { public class BasicConfig {
public static int apiCount; //接口数量统计 public static int apiCount; //接口数量统计
// 是否开启钉钉机器人推送 // 是否开启钉钉机器人推送
public static final boolean isPushReport =true; //true public static final boolean isPushReport =false; //true
// 代理人微信昵称 // 代理人微信昵称
public static final String WECHAT_NAME = "嘿保险"; //true public static final String WECHAT_NAME = "嘿保险"; //true
// 代理人的openid(固定) // 代理人的openid(固定)
...@@ -134,6 +134,11 @@ public class BasicConfig { ...@@ -134,6 +134,11 @@ public class BasicConfig {
public static final String MOBILE_TeamTeamCharts = MOBILE_HOST + "/kjy/live/team/teamCharts"; public static final String MOBILE_TeamTeamCharts = MOBILE_HOST + "/kjy/live/team/teamCharts";
public static final String MOBILE_AgentPersonalTeamCharts = MOBILE_HOST + "/kjy/live/agent/personalTeamCharts"; public static final String MOBILE_AgentPersonalTeamCharts = MOBILE_HOST + "/kjy/live/agent/personalTeamCharts";
public static final String MOBILE_AgentOwnCharts = MOBILE_HOST + "/kjy/live/agent/ownCharts"; public static final String MOBILE_AgentOwnCharts = MOBILE_HOST + "/kjy/live/agent/ownCharts";
public static final String MOBILE_ClueNum = MOBILE_HOST + "/kjy/live/agent/clue/clueNum";
public static final String MOBILE_ClueList = MOBILE_HOST + "/kjy/live/agent/clue/list";
public static final String MOBILE_MyCustomerList = MOBILE_HOST + "/kjy/live/agent/clue/myCustomerList";
public static final String MOBILE_RewardAgentList = MOBILE_HOST + "/kjy/live/reward/agent/list";
//查询资料列表// //查询资料列表//
public static final String MOBILE_Resource = MOBILE_HOST + "/clue/resource/list"; public static final String MOBILE_Resource = MOBILE_HOST + "/clue/resource/list";
...@@ -151,8 +156,6 @@ public class BasicConfig { ...@@ -151,8 +156,6 @@ public class BasicConfig {
public static final String MOBILE_ResourceTestParticipate = MOBILE_HOST + "/clue/resource/test/participate"; public static final String MOBILE_ResourceTestParticipate = MOBILE_HOST + "/clue/resource/test/participate";
public static final String MOBILE_ResourceTestSubmit = MOBILE_HOST + "/clue/resource/test/submit"; public static final String MOBILE_ResourceTestSubmit = MOBILE_HOST + "/clue/resource/test/submit";
public static final String MOBILE_GetAgentPosterInfo = MOBILE_HOST + "/kjy/live/share/getAgentPosterInfo"; public static final String MOBILE_GetAgentPosterInfo = MOBILE_HOST + "/kjy/live/share/getAgentPosterInfo";
public static final String MOBILE_ClueNum = MOBILE_HOST + "/kjy/live/agent/clue/clueNum";
public static final String MOBILE_ClueList = MOBILE_HOST + "/kjy/live/agent/clue/list";
public static final String MOBILE_GETSHARESIGN = MOBILE_HOST + "/kjy/live/getShareSign"; public static final String MOBILE_GETSHARESIGN = MOBILE_HOST + "/kjy/live/getShareSign";
public static final String MOBILE_binding = MOBILE_HOST + "/clue/invitation/binding"; public static final String MOBILE_binding = MOBILE_HOST + "/clue/invitation/binding";
public static final String MOBILE_Token = MOBILE_HOST + "/clue/invitation/token"; public static final String MOBILE_Token = MOBILE_HOST + "/clue/invitation/token";
...@@ -380,6 +383,13 @@ public class BasicConfig { ...@@ -380,6 +383,13 @@ public class BasicConfig {
public static final String MANAGER_PROMOTIONCODELIST = MANAGER_HOST + "/kjy/manager/promotionCode/codeList"; public static final String MANAGER_PROMOTIONCODELIST = MANAGER_HOST + "/kjy/manager/promotionCode/codeList";
public static final String MANAGER_PROMOTIONBATCHMODIFY = MANAGER_HOST + "/kjy/manager/promotionCode/batchModify"; public static final String MANAGER_PROMOTIONBATCHMODIFY = MANAGER_HOST + "/kjy/manager/promotionCode/batchModify";
public static final String MANAGER_PROMOTIONCODEBATCHDETAIL = MANAGER_HOST + "/kjy/manager/promotionCode/batchDetail"; public static final String MANAGER_PROMOTIONCODEBATCHDETAIL = MANAGER_HOST + "/kjy/manager/promotionCode/batchDetail";
public static final String MANAGER_CompanyVideoList = MANAGER_HOST + "/kjy/manager/live/company/video/list";
public static final String MANAGER_SaveOrUpdate = MANAGER_HOST + "/kjy/manager/live/company/video/saveOrUpdate";
public static final String MANAGER_CompanyVideoTop = MANAGER_HOST + "/kjy/manager/live/company/video/top";
public static final String MANAGER_CompanyVideoCancelTopt = MANAGER_HOST + "/kjy/manager/live/company/video/cancelTop";
public static final String MANAGER_CompanyVideoUp = MANAGER_HOST + "/kjy/manager/live/company/video/up";
public static final String MANAGER_CompanyVideoDown = MANAGER_HOST + "/kjy/manager/live/company/video/down";
public static final String MANAGER_CompanyVideoDelete = MANAGER_HOST + "/kjy/manager/live/company/video/delete";
} }
...@@ -36,6 +36,11 @@ ...@@ -36,6 +36,11 @@
<classes> <classes>
<class name="com.kjj.cases.live.lottery.DesignatedWinner"/> <class name="com.kjj.cases.live.lottery.DesignatedWinner"/>
</classes> </classes>
</test>
<test preserve-order="true" name="直播前-我的客户页">
<classes>
<class name="com.kjj.cases.live.agent.LiveBefore"/>
</classes>
</test> </test>
<test preserve-order="true" name="助播-开启直播"> <test preserve-order="true" name="助播-开启直播">
<classes> <classes>
...@@ -73,5 +78,10 @@ ...@@ -73,5 +78,10 @@
<class name="com.kjj.cases.live.anchor.CloseLive"/> <class name="com.kjj.cases.live.anchor.CloseLive"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="直播结束-我的客户页">
<classes>
<class name="com.kjj.cases.live.agent.LiveLater"/>
</classes>
</test>
</suite> </suite>
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