Commit 7965fb6c authored by 张艳玲's avatar 张艳玲

准客户需求

parent d1db4f51
This diff is collapsed.
......@@ -22,8 +22,6 @@ import static com.kjj.config.BasicConfig.*;
public class Agent implements Authorization {
@BeforeClass
public void setUp() { agentAuth(); }
public String id;
public String videoId;
public String videoTitle;
......@@ -35,14 +33,15 @@ public class Agent implements Authorization {
public String teamName;
public String sellerName;
@BeforeClass
public void setUp() { agentAuth(); }
@Test(description="获取用户信息判断是否是代理人",priority = 1)
public void 获取用户信息判断是否是代理人() {
Map<String, Object> params = new HashMap<String, Object>();
Response response = network.getResponse(params, BasicConfig.MOBILE_userInfo1);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
System.out.println(response.body().asString());
Object jobNumber = response.jsonPath().getJsonObject("data.jobNumber");
System.out.println(jobNumber);
Assert.assertNotNull(jobNumber, network.message(params, BasicConfig.MOBILE_userInfo1, "用户非代理人", response.body().asString()));
}
......@@ -52,8 +51,8 @@ public class Agent implements Authorization {
Map<String, Object> params = new HashMap<String, Object>();
params.put("appid","wx4d7276f866bd24c8");
Response response = network.getResponse(params, BasicConfig.MOBILE_isForbidden);
System.out.println(response.body().asString());
Boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertFalse(data, network.message(params, BasicConfig.MOBILE_isForbidden, "禁止分享", response.body().asString()));
}
......
......@@ -17,11 +17,11 @@ import java.util.List;
import java.util.Map;
public class LiveLater implements Authorization {
public String pageSize;
public List<LiveUserList> liveUserId;
@BeforeClass
public void setUp() { agentAuth(); }
public String pageSize;
public List<LiveUserList> liveUserId;
//获取回收成功案例
......
package com.kjj.cases.live.agent;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.HashMap;
import java.util.Map;
public class Potential implements Authorization {
public String bizConfId;
@BeforeClass
public void setUp() { visitorAuth(); }
@Test(description = "直播间名片", priority =1)
public void 直播间名片() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.ANCHOR_card);
System.out.println(response.body().asString());
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data, network.message(Params, BasicConfig.ANCHOR_card, "未获取直播间名片信息", response.body().asString()));
}
@Test(description = "获取推送问题咨询", priority =2)
public void 获取推送问题() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.ANCHOR_questions);
System.out.println(response.body().asString());
bizConfId=response.jsonPath().getString("data[0].id");
Assert.assertNotNull(bizConfId, network.message(Params, BasicConfig.ANCHOR_questions, "为获取到问题ID", response.body().asString()));
}
@Test(description = "潜在客户提交咨询信息", priority =3)
public void 潜在客户提交信息() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("bizConfId",bizConfId);
Params.put("chanceType",1);
Response response = network.postResponse(Params, BasicConfig.ANCHOR_submit);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.ANCHOR_submit, "客户提交信息失败", response.body().asString()));
}
@Test(description = "潜在客户标记同意", priority =4)
public void 潜在客户标记同意() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("bizConfId",bizConfId);
Params.put("chanceType",1);
Params.put("agreeFlag",true);
Response response = network.postResponse(Params, BasicConfig.ANCHOR_agree);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.ANCHOR_agree, "客户未标记同意", response.body().asString()));
}
@Test(description = "获取访客已提交的问题", priority =5)
public void 获取访客已提交的问题() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.ANCHOR_questionSubmitted);
System.out.println(response.body().asString());
String id=response.jsonPath().getString("data.id");
Assert.assertEquals(id,bizConfId, network.message(Params, BasicConfig.ANCHOR_questionSubmitted, "访客已提交的问题为null", response.body().asString()));
}
@Test(description = "获取访客跟进机会同意状态", priority =6)
public void 获取访客跟进机会同意状态() {
ThreadSleepUtils.sleep(1000);
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("chanceType",1);
Params.put("bizConfId",bizConfId);
Response response = network.getResponse(Params, BasicConfig.ANCHOR_agreeStatus);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.ANCHOR_agreeStatus, "客跟进机会同意状态为false", response.body().asString()));
}
@Test(description = "获取对话模版oss地址", priority =7)
public void 获取对话模版oss地址() {
Response response = network.getResponse(BasicConfig.ANCHOR_ossDialogue);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertNotNull(data, network.message(BasicConfig.ANCHOR_ossDialogue, "未获取到对话模版oss地址", response.body().asString()));
}
}
......@@ -19,7 +19,6 @@ import java.util.Map;
public class LiveVisitors implements Authorization
{
public String confId_imageText;
public String confId_form;
public String confId_link;
......@@ -28,8 +27,6 @@ public class LiveVisitors implements Authorization
public String id;
public List<ResourcePushList>PushList;
/*助播端端权益列表*/
@Test(description = "助播端权益列表", priority = 1)
public void 助播端权益列表()
......@@ -251,9 +248,6 @@ public class LiveVisitors implements Authorization
Assert.assertTrue(data,network.message(params,BasicConfig.MOBILE_ResourceTestSubmit,"提交秒薪测试失败",response.body().asString()));
}
//********************代理人*************//
//********************代理人*************//
//********************代理人*************//
/*代理人端权益列表查询*/
@Test(description = "代理人端权益列表查询", priority = 14)
public void 代理人端权益列表查询()
......@@ -418,6 +412,7 @@ public class LiveVisitors implements Authorization
public void 获取推送列表()
{
adminAuth();
ThreadSleepUtils.sleep(1000);
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("confId", this.PushList.get(5).getConfId());
......@@ -454,9 +449,37 @@ public class LiveVisitors implements Authorization
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_pasterOff, "贴片下架失败", response.body().asString()));
}
/**
* 资料-我要咨询
*/
@Test(description = "资料咨询时客户标记同意", priority =28)
public void 资料咨询时客户标记同意() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("bizConfId",confId_link);
Params.put("chanceType",2);
Params.put("agreeFlag",true);
Response response = network.postResponse(Params, BasicConfig.ANCHOR_agree);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.ANCHOR_agree, "客户未标记同意", response.body().asString()));
}
@Test(description = "获取访客跟进机会同意状态", priority =29)
public void 获取访客跟进机会同意状态() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("chanceType",2);
Params.put("bizConfId",confId_link);
Response response = network.getResponse(Params, BasicConfig.ANCHOR_agreeStatus);
System.out.println(response.body().asString());
boolean data=response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(Params, BasicConfig.ANCHOR_agreeStatus, "客跟进机会同意状态为false", response.body().asString()));
}
}
......@@ -164,7 +164,7 @@ public class FlipCard implements Authorization {
params.put("shareType",2);
Response signRes = network.getResponse(params, BasicConfig.MOBILE_sign);
String data = signRes.jsonPath().getString("data");
this.shareSign = data;
shareSign = data;
System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(params, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
......
......@@ -97,6 +97,15 @@ public class BasicConfig {
public static final String ANCHOR_getConfDetail = MOBILE_HOST + "/conf/pre/getConfDetail";
public static final String ANCHOR_CLOSE = MOBILE_HOST + "/conf/live/close";
// *************** 准客户 ***************
public static final String ANCHOR_card = MOBILE_HOST + "/clue/agent/card";
public static final String ANCHOR_questions = MOBILE_HOST + "/kjy/live/agent/potential/questions";
public static final String ANCHOR_submit = MOBILE_HOST + "/kjy/live/agent/potential/submit";
public static final String ANCHOR_agree = MOBILE_HOST + "/kjy/live/agent/potential/agree";
public static final String ANCHOR_questionSubmitted = MOBILE_HOST + "/kjy/live/agent/potential/questionSubmitted";
public static final String ANCHOR_agreeStatus = MOBILE_HOST + "/kjy/live/agent/potential/agreeStatus";
public static final String ANCHOR_ossDialogue = MOBILE_HOST + "/kjy/live/agent/potential/ossDialogue";
// *************** 预告页配置 ***************
public static final String MANAGER_preViewWelfareList = MANAGER_HOST + "/kjy/manager/preView/conf/welfareList";
public static final String MANAGER_confMainWelfare = MANAGER_HOST + "/kjy/manager/preView/conf/confMainWelfare";
......@@ -360,15 +369,17 @@ public class BasicConfig {
//客户管理
public static final String MOBILE_potentialCount = MOBILE_HOST + "/kjy/live/agent/customer/potentialCount";
public static final String MOBILE_customerList = MOBILE_HOST + "/kjy/live/agent/customer/list";
public static final String MOBILE_count = MOBILE_HOST + "/kjy/live/agent/customer/count";
public static final String MOBILE_lastLiveList = MOBILE_HOST + "/kjy/live/agent/customer/lastLiveList";
public static final String MOBILE_basicInfo = MOBILE_HOST + "/kjy/live/agent/customer/basicInfo";
public static final String MOBILE_clueInfo = MOBILE_HOST + "/kjy/live/agent/customer/clueInfo";
public static final String MOBILE_customerUpdate = MOBILE_HOST + "/kjy/live/agent/customer/update";
public static final String MOBILE_customerDetail = MOBILE_HOST + "/kjy/live/agent/customer/detail";
public static final String MOBILE_liveInfo = MOBILE_HOST + "/kjy/live/agent/customer/liveInfo";
// public static final String MOBILE_updateRemarkName = MOBILE_HOST + "/kjy/live/agent/customer/updateRemarkName";
public static final String MOBILE_followChanceList = MOBILE_HOST + "/kjy/live/agent/customer/followChanceList";
public static final String MOBILE_customerGetReplyAdvice = MOBILE_HOST + "/kjy/live/agent/customer/getReplyAdvice";
public static final String MOBILE_followChanceDetail = MOBILE_HOST + "/kjy/live/agent/customer/followChanceDetail";
// *************** 代理人 ***************
public static final String MOBILE_recycleSuccessCase = MOBILE_HOST + "/kjy/live/agent/clue/recycleSuccessCase";
public static final String MOBILE_providerInfo = MOBILE_HOST + "/kjy/live/agent/clue/providerInfo";
......
......@@ -125,6 +125,11 @@
<class name="com.kjj.cases.live.FreeReward.FreeReward"/>
</classes>
</test>
<test preserve-order="true" name="我要咨询">
<classes>
<class name="com.kjj.cases.live.agent.Potential"/>
</classes>
</test>
<test preserve-order="true" name="访客领取资料">
<classes>
......
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