Commit 73df322d authored by 郭姣's avatar 郭姣

客户线索也增加准客户接口用例

parent ad6eb8bf
...@@ -89,7 +89,19 @@ public class LiveAgent implements Authorization { ...@@ -89,7 +89,19 @@ public class LiveAgent implements Authorization {
} }
@Test(description="获取直播间线索数统计",priority = 6) @Test(description = "获取直播间准客户线索",priority = 6)
public void 获取直播间准客户线索(){
Map<String,Object> params = new HashMap<>();
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);
System.out.println(response.body().asString());
boolean success=response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.MOBILE_clueList, "直播中准客户线索为null", response.body().asString()));
}
@Test(description="获取直播间线索数统计",priority = 7)
public void 获取直播间线索数统计() { public void 获取直播间线索数统计() {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......
...@@ -105,6 +105,9 @@ public class LiveLater implements Authorization { ...@@ -105,6 +105,9 @@ public class LiveLater implements Authorization {
long totalCount =response.jsonPath().getLong("data.totalCount"); long totalCount =response.jsonPath().getLong("data.totalCount");
Assert.assertTrue(totalCount>18, network.message(params, BasicConfig.MOBILE_ClueList, "线索数量不对", response.body().asString())); Assert.assertTrue(totalCount>18, network.message(params, BasicConfig.MOBILE_ClueList, "线索数量不对", response.body().asString()));
Object customerType = response.jsonPath().getJsonObject("data.list.get(0).customerType");
System.out.println(customerType);
Assert.assertEquals(customerType,1,network.message(params,BasicConfig.MOBILE_ClueList,"准客户标签错误",response.body().asString()));
} }
...@@ -228,6 +231,8 @@ public class LiveLater implements Authorization { ...@@ -228,6 +231,8 @@ public class LiveLater implements Authorization {
Assert.assertNotNull(choiceQuestions, network.message(params, BasicConfig.MOBILE_getClueDetail, "投票列表为null", response.body().asString())); Assert.assertNotNull(choiceQuestions, network.message(params, BasicConfig.MOBILE_getClueDetail, "投票列表为null", response.body().asString()));
Object testResources=response.jsonPath().getJsonObject("data.testResources"); Object testResources=response.jsonPath().getJsonObject("data.testResources");
Assert.assertNotNull(testResources, network.message(params, BasicConfig.MOBILE_getClueDetail, "用户提交测试资源报告为null", response.body().asString())); Assert.assertNotNull(testResources, network.message(params, BasicConfig.MOBILE_getClueDetail, "用户提交测试资源报告为null", response.body().asString()));
int customerType = response.jsonPath().getInt("data.customerType");
Assert.assertEquals(customerType,1,network.message(params,BasicConfig.MOBILE_getClueDetail,"准客户标记错误",response.body().asString()));
List<GrabWelfares>list=JsonUtil.parseResponseToListBean(response,GrabWelfares.class,"grabWelfares"); List<GrabWelfares>list=JsonUtil.parseResponseToListBean(response,GrabWelfares.class,"grabWelfares");
Boolean specifyAward =list.get(0).getSpecifyAward(); Boolean specifyAward =list.get(0).getSpecifyAward();
Assert.assertTrue(specifyAward,network.message(params, BasicConfig.MOBILE_getClueDetail, "指定中奖为null", response.body().asString())); Assert.assertTrue(specifyAward,network.message(params, BasicConfig.MOBILE_getClueDetail, "指定中奖为null", response.body().asString()));
...@@ -264,8 +269,7 @@ public class LiveLater implements Authorization { ...@@ -264,8 +269,7 @@ public class LiveLater implements Authorization {
//需要校验返回结果 //需要校验返回结果
@Test(description="访客邀请列表",priority = 15) @Test(description="访客邀请列表",priority = 15)
public void public void 访客邀请列表() {
访客邀请列表() {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// params.put("liveId","Kj21MzYyNjM"); // params.put("liveId","Kj21MzYyNjM");
...@@ -311,5 +315,16 @@ public class LiveLater implements Authorization { ...@@ -311,5 +315,16 @@ public class LiveLater implements Authorization {
} }
@Test(description = "查看客户A跟进机会",priority = 18)
public void 查看客户A跟进机会(){
Map<String,Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("liveVisitorId",this.liveUserId.get(0).getLiveUserId());
params.put("pageIndex",1);
params.put("pageSize",5);
Response response = network.getResponse(params,BasicConfig.MOBILE_clueChanceList);
Object clueList = response.jsonPath().getJsonObject("data.list");
System.out.println(clueList);
Assert.assertNotNull(clueList,network.message(params,BasicConfig.MOBILE_clueChanceList,"跟进机会获取失败",response.body().asString()));
}
} }
...@@ -12,7 +12,7 @@ public class BasicConfig { ...@@ -12,7 +12,7 @@ public class BasicConfig {
public static String ADMIN_KEY="zFNkBc7JtvLPL6ifAfXbcgXf7k8AofD7jRHCDreREzhP8iW4bahfqRFePosTb9G6ESGPwScVFCQyuZBcc4brtRfaNz"; public static String ADMIN_KEY="zFNkBc7JtvLPL6ifAfXbcgXf7k8AofD7jRHCDreREzhP8iW4bahfqRFePosTb9G6ESGPwScVFCQyuZBcc4brtRfaNz";
// 直播代理人 (艳玲)ID:826 // 直播代理人 (艳玲)ID:826
public static String AUTH_KEY ="LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRCuzyKj3hQkSYMpkYma5RmZHQAbv8fiPzFX5BgoJgjF2gUVz175wz3dY"; public static String AUTH_KEY ="LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRCuzyKj3hQkSYMpkYma5RmZHQAbv8fiPzFX5BgoJgjF2gUVz175wz3dY";
// 直播代理人 (小疙瘩)ID:995 // 直播代理人 (小疙瘩)ID:995
public static String agentAuth ="LEH7epeHVDJWzhZ6DiexTHnsaP1faXTzcymSLsZVqAY5WqZQrdzjC38jMagiDc4FuL29DuBPCvuyHwDfmewFfwyW7rFLZ"; public static String agentAuth ="LEH7epeHVDJWzhZ6DiexTHnsaP1faXTzcymSLsZVqAY5WqZQrdzjC38jMagiDc4FuL29DuBPCvuyHwDfmewFfwyW7rFLZ";
//直播访客 (志勇)ID:107 //直播访客 (志勇)ID:107
public static String visitorAuth="LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRL1y3zwSbNpp1aULAhVJCVAEKsjT2ZbJ5DZhH3ZjeaCEGLsecXdXZW6n"; public static String visitorAuth="LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRL1y3zwSbNpp1aULAhVJCVAEKsjT2ZbJ5DZhH3ZjeaCEGLsecXdXZW6n";
...@@ -399,6 +399,7 @@ public class BasicConfig { ...@@ -399,6 +399,7 @@ public class BasicConfig {
public static final String MOBILE_RewardAgentList = MOBILE_HOST + "/kjy/live/reward/agent/list"; public static final String MOBILE_RewardAgentList = MOBILE_HOST + "/kjy/live/reward/agent/list";
public static final String MOBILE_signInfo= MOBILE_HOST + "/kjy/live/reward/agent/signInfo"; public static final String MOBILE_signInfo= MOBILE_HOST + "/kjy/live/reward/agent/signInfo";
public static final String MOBILE_getDeliveryWay= MOBILE_HOST + "/kjy/live/getDeliveryWay"; public static final String MOBILE_getDeliveryWay= MOBILE_HOST + "/kjy/live/getDeliveryWay";
public static final String MOBILE_clueChanceList = MOBILE_HOST + "/kjy/live/agent/clue/followChanceList";
public static final String MOBILE_Procurator = MOBILE_HOST + "/kjy/live/agent/liveList"; public static final String MOBILE_Procurator = MOBILE_HOST + "/kjy/live/agent/liveList";
......
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