Commit d8d3a7f0 authored by 龚小红's avatar 龚小红

增加新客户列表和投放池列表及认领

parent 077dc6e8
......@@ -21,6 +21,7 @@ public class Work implements Authorization {
private static final NetworkUtils network = NetworkUtils.getInstance();
public int tagId; //标签ID
public int custId; //客户ID
public int collectCustId = 2011; //客户ID
public String name; //客户手机号
public String phone; //客户手机号
public int followTimes; //跟进次数
......@@ -141,11 +142,15 @@ public class Work implements Authorization {
public void 工作台_通知栏(){
Response response = network.getResponse(BasicConfig.WORK_notifyList);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,0,network.message(BasicConfig.WORK_notifyList,"通知栏不为空",response.body().asString()));
Assert.assertEquals(size,1,network.message(BasicConfig.WORK_notifyList,"通知栏不为空",response.body().asString()));
int notifyType = response.jsonPath().getInt("data[0].notifyType");
int custCount = response.jsonPath().getInt("data[0].custCount");
Assert.assertEquals(custCount,1,network.message(BasicConfig.WORK_notifyList,"通知栏不为空",response.body().asString()));
Assert.assertEquals(notifyType,2,network.message(BasicConfig.WORK_notifyList,"通知栏不为空",response.body().asString()));
}
@Test(description = "客户分类_数量总览",priority = 9)
public void 客户分类_数量总览(){
@Test(description = "客户状态分类_数量总览",priority = 9)
public void 客户状态分类_数量总览(){
Response response = network.getResponse(BasicConfig.WORK_staticHeader);
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data,network.message(BasicConfig.WORK_staticHeader,"数量总览数据为空",response.body().asString()));
......@@ -161,8 +166,8 @@ public class Work implements Authorization {
header.put("unRedialNum",unRedialNum);
}
@Test(description = "客户分类_表格总览",priority = 10)
public void 客户分类_表格总览(){
@Test(description = "客户跟进分类_表格总览",priority = 10)
public void 客户跟进分类_表格总览(){
Response response = network.getResponse(BasicConfig.WORK_staticChart);
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data,network.message(BasicConfig.WORK_staticChart,"跟进表格数量为空",response.body().asString()));
......@@ -275,15 +280,21 @@ public class Work implements Authorization {
Response response = network.postResponse(params,BasicConfig.WORK_star);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_star,"标记星标客户失败",response.body().asString()));
params.put("custId", collectCustId);
response = network.postResponse(params,BasicConfig.WORK_star);
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_star,"标记星标客户失败",response.body().asString()));
}
@Test(description = "查询星标客户更新",priority = 21)
public void 查询星标客户更新(){
sleep(1000);
Response response = network.getResponse(BasicConfig.WORK_staticHeader);
int unContactNum = response.jsonPath().getInt("data.unContactNum");
int starNum = response.jsonPath().getInt("data.starNum");
Assert.assertEquals(unContactNum,header.get("unContactNum")-1,network.message(BasicConfig.WORK_staticHeader,"需要联系客户数量未减1",response.body().asString()));
Assert.assertEquals(starNum, header.get("starNum")+1,network.message(BasicConfig.WORK_staticHeader,"星标客户数量未加1",response.body().asString()));
Assert.assertEquals(starNum, header.get("starNum")+2,network.message(BasicConfig.WORK_staticHeader,"星标客户数量未加2",response.body().asString()));
}
@Test(description = "取消星标用户",priority = 22)
......@@ -294,13 +305,13 @@ public class Work implements Authorization {
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_star,"取消客户星标失败",response.body().asString()));
sleep(1000);
response = network.getResponse(BasicConfig.WORK_staticHeader);
int unContactNum = response.jsonPath().getInt("data.unContactNum");
int starNum = response.jsonPath().getInt("data.starNum");
int num1= header.get("starNum");
int num2= header.get("unContactNum");
Assert.assertEquals(starNum, num1,network.message(BasicConfig.WORK_staticHeader,"需要联系客户数量未加1",response.body().asString()));
Assert.assertEquals(unContactNum, num2,network.message(BasicConfig.WORK_staticHeader,"星标客户数量未减1",response.body().asString()));
int num= header.get("unContactNum");
Assert.assertEquals(starNum, header.get("starNum")+1,network.message(BasicConfig.WORK_staticHeader,"星标客户数量未减1",response.body().asString()));
Assert.assertEquals(unContactNum, num,network.message(BasicConfig.WORK_staticHeader,"需要联系客户数量未加1",response.body().asString()));
}
@Test(description = "修改客户价值",priority = 23)
......@@ -426,6 +437,7 @@ public class Work implements Authorization {
@Test(description = "客户状态见面为待计划",priority = 31)
public void 客户状态见面为待计划(){
sleep(1000);
Response response = network.getResponse(BasicConfig.WORK_staticHeader);
int unContactNum = response.jsonPath().getInt("data.unContactNum");
int unMeetNum = response.jsonPath().getInt("data.unMeetNum");
......@@ -470,12 +482,6 @@ public class Work implements Authorization {
Assert.assertTrue(todayMeetFlag,network.message(params,BasicConfig.WORK_info,"今日见面状态错误:为未见面",response.body().asString()));
Assert.assertTrue(orderVisitFlag,network.message(params,BasicConfig.WORK_info,"预约参观状态错误:为未预约",response.body().asString()));
Assert.assertNotNull(orderVisitDate,network.message(params,BasicConfig.WORK_info,"预约时间为空",response.body().asString()));
response = network.getResponse(BasicConfig.WORK_notifyList);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,1,network.message(BasicConfig.WORK_notifyList,"通知栏不为空",response.body().asString()));
int notifyType = response.jsonPath().getInt("data[0].notifyType");
Assert.assertEquals(size,1,network.message(BasicConfig.WORK_notifyList,"通知栏不为空",response.body().asString()));
}
@Test(description = "上传参观详情",priority = 34)
......@@ -545,6 +551,7 @@ public class Work implements Authorization {
@Test(description = "客户状态见面为已成单",priority = 38)
public void 客户状态见面为已成单(){
sleep(1000);
Response response = network.getResponse(BasicConfig.WORK_staticChart);
int toFacilitate = response.jsonPath().getInt("data[3].custNum");
int completedOrder = response.jsonPath().getInt("data[4].custNum");
......@@ -569,7 +576,7 @@ public class Work implements Authorization {
params.put("custName", "自动化");
Response response = network.getResponse(params,BasicConfig.WORK_fuzzyCustName);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,1,network.message(params,BasicConfig.WORK_fuzzyCustName,"客户动态条数错误",response.body().asString()));
Assert.assertEquals(size,2,network.message(params,BasicConfig.WORK_fuzzyCustName,"客户动态条数错误",response.body().asString()));
}
@Test(description = "公域引流_删除标签",priority = 41)
......@@ -662,9 +669,78 @@ public class Work implements Authorization {
Assert.assertTrue(answer>0,network.message(params,BasicConfig.MANAGER_oto_customerPhone,"问题详情为空",response.body().asString()));
}
@Test(description = "回收2C星标客户",priority = 48)
public void 回收2C客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", collectCustId);
params.put("commitPlanFlag", 0);
params.put("custValue", 202);
params.put("followWeight", 3);
params.put("giveUpReason", 2);
params.put("giveUpRemark", "因自己原因我不想跟了");
params.put("meetRemark", "今日见面的备注"+new Date());
Response response = network.postResponse(params,BasicConfig.WORK_meet);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_meet,"完成今日见面失败",response.body().asString()));
}
@Test(description = "查询投放池刷新配置",priority = 49)
public void 查询投放池刷新配置(){
Response response = network.getResponse(BasicConfig.WORK_leadsConfig);
int dayAssignLimit = response.jsonPath().getInt("data.dayAssignLimit");
Assert.assertNotNull(dayAssignLimit,network.message(BasicConfig.WORK_leadsConfig,"查询投放池刷新配置失败",response.body().asString()));
}
@Test(description = "查看投放池客户列表",priority = 50)
public void 查看投放池客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 20);
Response response = network.getResponse(params,BasicConfig.WORK_freshList);
Object list = response.jsonPath().getJsonObject("data.list");
Assert.assertNotNull(list,network.message(params,BasicConfig.WORK_freshList,"查看投放池客户不为空",response.body().asString()));
}
@Test(description = "查看回收池客户列表",priority = 51)
public void 查看回收池客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 20);
Response response = network.getResponse(params,BasicConfig.WORK_recycleList);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.WORK_recycleList,"查看回收池客户列表为空",response.body().asString()));
int result = response.jsonPath().getInt("data.list[0].custId");
Assert.assertEquals(result,collectCustId,network.message(params,BasicConfig.WORK_recycleList,"回收池客户列表不包含刚刚的回收客户",response.body().asString()));
}
@Test(description = "认领回收池客户",priority = 52)
public void 认领回收池客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", collectCustId);
Response response = network.postResponse(params,BasicConfig.WORK_claim);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_claim,"删除客户失败",response.body().asString()));
}
@Test(description = "客户总数更新",priority = 53)
public void 客户总数更新(){
sleep(1000);
Response response = network.getResponse(BasicConfig.WORK_staticHeader);
int totalNum = response.jsonPath().getInt("data.totalNum");
int num = header.get("totalNum");
Assert.assertEquals(totalNum, num,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString()));
}
@Test(description = "查询认领客户评价清空",priority = 54)
public void 查询认领客户评价清空(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", collectCustId);
Response response = network.getResponse(params,BasicConfig.WORK_header);
Object custValue = response.jsonPath().getJsonObject("data.custValue");
Object followWeight = response.jsonPath().getJsonObject("data.followWeight");
Assert.assertNull(custValue,network.message(params,BasicConfig.WORK_header,"客户价值未清空",response.body().asString()));
Assert.assertNull(followWeight,network.message(params,BasicConfig.WORK_header,"客户权重未清空",response.body().asString()));
}
@Test(description = "删除客户",priority = 79)
public void 删除客户(){
......
......@@ -1342,6 +1342,10 @@ public class BasicConfig {
public static final String WORK_fuzzyCustName= WORK_HOST + "/kjy/oto/manager/customer/fuzzy/custName";
public static final String WORK_call= WORK_HOST + "/kjy/oto/manager/customer/call";
public static final String WORK_logout= WORK_HOST + "/kjy/oto/manager/auth/logout";
public static final String WORK_leadsConfig= WORK_HOST + "/kjy/oto/manager/customer/pool/leadsConfig";
public static final String WORK_freshList= WORK_HOST + "/kjy/oto/manager/customer/pool/fresh/list";
public static final String WORK_recycleList= WORK_HOST + "/kjy/oto/manager/customer/pool/recycle/list";
public static final String WORK_claim= WORK_HOST + "/kjy/oto/manager/customer/pool/claim";
public static final String WORK_verifyCodet = WORK_HOST + "/kjy/oto/auto/test/verifyCode";
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust";
......
......@@ -427,7 +427,7 @@ public class BaseUtils {
otoCookieValue = cookieKeyValue[1];
// otoCookieKey = "otoToken";
// otoCookieValue = "64e83LYGbaXYX9EkHumCho2UkzpJdamKBUy1LxjAMokRCXzXUqz3GhwHVuafuX3XiGBeJtGTACHoTFEV33SyzV8W1RH5HE6pchoYaiHxhbB";
// otoCookieValue = "64e83LYGbaXYX9EkHumCho2Um1GgEB1fbKaZdh8QYa2vxD8xezqsMmAyVvbChD8h3z3q8Gm3UAwoBaXcXRnhmhtg9s4szxELntHRrdut4W9";
network.agentCookies.put(otoCookieKey,otoCookieValue); //存入cookies
System.out.println("销售Cookie中key:"+otoCookieKey+" ,values:"+otoCookieValue);
......
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