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

Merge branch 'Feature/20220824-gxh' into 'master'

更新系数继承的测试用例

See merge request !23
parents 8882b3eb ec8504ff
......@@ -75,7 +75,7 @@ public class Phone implements Authorization {
@Test(description = "姓名搜索客户",priority = 4)
public void 姓名搜索客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化测试用户");
params.put("custName", "自动化激活用户");
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_customerList);
int size = response.jsonPath().getInt("data.myCustomerVos.size()");
......@@ -136,8 +136,8 @@ public class Phone implements Authorization {
Response response = network.getResponse(params, BasicConfig.PHONE_customerList);
int size = response.jsonPath().getInt("data.myCustomerVos.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.PHONE_customerList,"客户列表为空",response.body().asString()));
int custFlow = response.jsonPath().getInt("data.myCustomerVos.find{it.custName == '自动化测试用户'}.custFlow");
boolean interviewStatus = response.jsonPath().getBoolean("data.myCustomerVos.find{it.custName == '自动化测试用户'}.interviewStatus");
int custFlow = response.jsonPath().getInt("data.myCustomerVos.find{it.custName == '自动化激活用户'}.custFlow");
boolean interviewStatus = response.jsonPath().getBoolean("data.myCustomerVos.find{it.custName == '自动化激活用户'}.interviewStatus");
Assert.assertEquals(custFlow,1,network.message(params,BasicConfig.PHONE_customerList,"客户阶段错误",response.body().asString()));
Assert.assertTrue(interviewStatus,network.message(params,BasicConfig.PHONE_customerList,"客户面访状态错误:非面访中",response.body().asString()));
}
......@@ -324,7 +324,7 @@ public class Phone implements Authorization {
@Test(description = "查看我的面访状态更新为审批中",priority = 23)
public void 查看我的面访状态更新为审批中(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化测试用户");
params.put("custName", "自动化激活用户");
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int size = response.jsonPath().getInt("data.customerInterviewVos.size()");
......@@ -386,7 +386,7 @@ public class Phone implements Authorization {
@Test(description = "查看我的面访状态更新为已失效",priority = 27)
public void 查看我的面访状态更新为已失效(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化测试用户");
params.put("custName", "自动化激活用户");
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int interviewStatus = response.jsonPath().getInt("data.customerInterviewVos.find{it.id == '"+ interviewIds.get(0) +"'}.interviewStatus");
......@@ -484,7 +484,7 @@ public class Phone implements Authorization {
@Test(description = "查看我的面访状态更新为已完成",priority =33)
public void 查看我的面访状态更新为已完成(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化测试用户");
params.put("custName", "自动化激活用户");
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int interviewStatus = response.jsonPath().getInt("data.customerInterviewVos.find{it.id == '"+ interviewIds.get(0) +"'}.interviewStatus");
......
......@@ -125,7 +125,6 @@ public class Work implements Authorization {
@Test(description = "公域引流_分配客户",priority = 6)
public void 公域引流_分配客户(){
HashMap<String,Object> params = new HashMap<>();
String str= String.valueOf(System.currentTimeMillis());
params.put("customerId",custId);
params.put("sellerId", 3);
Response response = network.postResponse(params,BasicConfig.MANAGER_oto_assignSeller);
......@@ -136,6 +135,7 @@ public class Work implements Authorization {
response = network.postResponse(params,BasicConfig.MANAGER_oto_assignSeller);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_assignSeller,"销售相同产品组分配客户失败",response.body().asString()));
}
@Test(description = "工作台_销售信息",priority = 7)
......@@ -805,8 +805,10 @@ public class Work implements Authorization {
//查询销售总系数
response =network.getResponse(BasicConfig.WORK_coefficient_detail);
BigDecimal bg = new BigDecimal(coefficient.get("totalCoefficient") + coefficient.get("claimCustCoefficient"));
Double sum = bg.setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
Double totalCoefficient = response.jsonPath().getDouble("data.totalCoefficient");
Assert.assertEquals(totalCoefficient,coefficient.get("totalCoefficient"),network.message(BasicConfig.WORK_coefficient_detail,"放弃客户销售总系数变化",response.body().asString()));
Assert.assertEquals(totalCoefficient,sum,network.message(BasicConfig.WORK_coefficient_detail,"放弃客户销售总系数变化",response.body().asString()));
}
@Test(description = "认领回收池客户总数更新",priority = 69)
......@@ -882,15 +884,37 @@ public class Work implements Authorization {
Response logRes = network.getResponse(params,BasicConfig.WORK_operation);
int logSize = logRes.jsonPath().getInt("data.list.size()");
Assert.assertTrue(logSize>0,network.message(BasicConfig.WORK_operation,"客户动态隔离失败",logRes.body().asString()));
}
//还原
@Test(description ="跟进中不可重新激活",priority = 76)
public void 跟进中不可重新激活(){
//重新填写表单
HashMap<String,Object> params = new HashMap<>();
params.put("formId", "Kj22MTAzOQ");
params.put("phoneNum", phone);
params.put("urlLink", "https://kjj-static.duibatest.com.cn/cpic-home/2022030105?formId=Kj22MTAzOQ&channel=tx&agent=xm");
params.put("username", "自动化激活用户");
params.put("uuid", "622d83e4-ca21-4ccd-94cb-182c0f2a6b60");
Response response = network.postResponse(params,BasicConfig.FORM_submit);
//查看客户被重新激活并姓名和产品组更新
params.clear();
params.put("customerId",custId);
params.put("sellerId",SELLER_ID);
response = network.postResponse(params,BasicConfig.MANAGER_oto_assignSeller);
params.put("pageIndex", 1);
params.put("pageSize", 10);
params.put("phoneNum", phone);
response = network.getResponse(params,BasicConfig.MANAGER_oto_customerList);
int totalCount = response.jsonPath().getInt("data.totalCount");
Assert.assertTrue(totalCount == 1,network.message(params,BasicConfig.MANAGER_oto_customerList,"未查找到该客户",response.body().asString()));
String custName = response.jsonPath().getString("data.list[0].custName");
int companySize = response.jsonPath().getInt("data.list[0].companyIds.size()");
int custStatus = response.jsonPath().getInt("data.list[0].custStatus");
Assert.assertEquals(custName,"自动化测试用户",network.message(params,BasicConfig.MANAGER_oto_customerList,"客户姓名与填单时错误",response.body().asString()));
Assert.assertEquals(companySize,3,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString()));
Assert.assertEquals(custStatus,1,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString()));
}
@Test(description = "关闭总监的新客户认领权限和回收客户认领权限",priority = 76)
@Test(description = "关闭总监的新客户认领权限和回收客户认领权限",priority = 78)
public void 关闭总监的新客户认领权限和回收客户认领权限(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", LEADER_ID);
......@@ -904,7 +928,7 @@ public class Work implements Authorization {
Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"关闭总监的新客户认领权限和回收客户认领权限失败",response.body().asString()));
}
@Test(description = "无新客户认领权限不可查看新客户列表",priority = 77)
@Test(description = "无新客户认领权限不可查看新客户列表",priority = 79)
public void 无新客户认领权限不可查看新客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
......@@ -914,7 +938,7 @@ public class Work implements Authorization {
Assert.assertFalse(success,network.message(BasicConfig.WORK_freshList,"无新客户认领权限可查看新客户列表",response.body().asString()));
}
@Test(description = "无查看微信权限不可查看客户号码",priority = 78)
@Test(description = "无查看微信权限不可查看客户号码",priority = 80)
public void 无查看微信权限不可查看客户号码(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
......@@ -923,7 +947,7 @@ public class Work implements Authorization {
Assert.assertFalse(success,network.message(BasicConfig.WORK_phone,"无查看微信权限可查看客户号码",response.body().asString()));
}
@Test(description = "无回收客户认领权限不可查看回收客户列表",priority = 79)
@Test(description = "无回收客户认领权限不可查看回收客户列表",priority = 81)
public void 无回收客户认领权限不可查看回收客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
......@@ -933,7 +957,7 @@ public class Work implements Authorization {
Assert.assertFalse(success,network.message(BasicConfig.WORK_logout,"无回收客户认领权限可查看回收客户列表",response.body().asString()));
}
@Test(description = "开启总监的新客户认领权限和回收客户认领权限",priority = 80)
@Test(description = "开启总监的新客户认领权限和回收客户认领权限",priority = 82)
public void 开启总监的新客户认领权限和回收客户认领权限(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", LEADER_ID);
......@@ -948,7 +972,7 @@ public class Work implements Authorization {
}
@Test(description = "新建日程",priority = 81)
@Test(description = "新建日程",priority = 83)
public void 新建日程(){
//获取日程提醒数量
Response listRes = network.getResponse(BasicConfig.WORK_notifyList);
......@@ -969,7 +993,7 @@ public class Work implements Authorization {
Assert.assertTrue(size<size2,network.message(BasicConfig.WORK_notifyList,"日程通知未展示新建日程",listRes.body().asString()));
}
@Test(description = "取消日程",priority = 82)
@Test(description = "取消日程",priority = 84)
public void 取消日程(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
......@@ -978,7 +1002,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(BasicConfig.WORK_cancelSchedule,"取消日程失败",response.body().asString()));
}
@Test(description = "普通销售不可查看审批管理",priority =83)
@Test(description = "普通销售不可查看审批管理",priority =85)
public void 普通销售不可查看审批管理(){
otosellerAuth();
HashMap<String,Object> params = new HashMap<>();
......@@ -989,7 +1013,7 @@ public class Work implements Authorization {
Assert.assertEquals(size,0,network.message(BasicConfig.WORK_interviewAuditList,"查看审批列表不为空",response.body().asString()));
}
@Test(description ="获取任务管理列表",priority = 84)
@Test(description ="获取任务管理列表",priority = 86)
public void 获取任务管理列表(){
otoManagerAuth();
Response response = network.getResponse(BasicConfig.WORK_taskConfList);
......@@ -997,7 +1021,7 @@ public class Work implements Authorization {
Assert.assertTrue(size==4,network.message(BasicConfig.WORK_taskConfList,"获取任务配置数量错误",response.body().asString()));
}
@Test(description = "修改任务配置",priority = 85)
@Test(description = "修改任务配置",priority = 87)
public void 修改任务配置(){
HashMap<String,Object> params = new HashMap<>();
String list[] = {"01","02","03","04"};
......@@ -1030,7 +1054,7 @@ public class Work implements Authorization {
Assert.assertTrue(acqData,network.message(params,BasicConfig.WORK_modifyTaskConf,"修改任务失败",acqRes.body().asString()));
}
@Test(description = "客户总览_销售查看任务",priority = 86)
@Test(description = "客户总览_销售查看任务",priority = 88)
public void 销售查看任务(){
otosellerAuth();
sleep(2000);
......@@ -1040,7 +1064,7 @@ public class Work implements Authorization {
Assert.assertEquals(finishCustNum,0,network.message(BasicConfig.WORK_statisticHeader,"销售任务统计错误",response.body().asString()));
}
@Test(description = "查看联系新客户任务明细",priority = 87)
@Test(description = "查看联系新客户任务明细",priority = 89)
public void 查看联系新客户任务明细(){
HashMap<String,Object> params = new HashMap<>();
params.put("taskConfId",4); //任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
......@@ -1053,7 +1077,7 @@ public class Work implements Authorization {
Assert.assertTrue(listSize>0,network.message(params,BasicConfig.WORK_taskDetailsList,"待完成客户数统计错误",response.body().asString()));
}
@Test(description = "查看我的预约订单列表",priority = 88)
@Test(description = "查看我的预约订单列表",priority = 90)
public void 查看我的预约订单列表(){
agent2Tku();
HashMap<String,Object> params = new HashMap<>();
......@@ -1067,7 +1091,7 @@ public class Work implements Authorization {
Assert.assertEquals(bookingStatus,0,network.message(BasicConfig.PHONE_getReservationList,"预约状态错误:非待参观",response.body().asString()));
}
@Test(description = "新增见面场景",priority = 89)
@Test(description = "新增见面场景",priority = 91)
public void 新增见面场景(){
otoManagerAuth();
int companyIds[] = {1,5};
......@@ -1084,7 +1108,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"新增见面场景失败",response.body().asString()));
}
@Test(description = "查看见面场景列表",priority = 90)
@Test(description = "查看见面场景列表",priority = 92)
public void 查看见面场景列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex",1);
......@@ -1100,7 +1124,7 @@ public class Work implements Authorization {
sceneId = response.jsonPath().getLong("data.list[0].id");
}
@Test(description = "修改见面场景",priority = 91)
@Test(description = "修改见面场景",priority = 93)
public void 修改见面场景(){
int companyIds[] ={5};
int custFlows[] = {1,2,3,4,5};
......@@ -1117,7 +1141,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"修改自动化场景失败",response.body().asString()));
}
@Test(description = "关闭见面场景状态",priority = 92)
@Test(description = "关闭见面场景状态",priority = 94)
public void 关闭见面场景状态(){
HashMap<String,Object> params = new HashMap<>();
params.put("id",sceneId);
......@@ -1127,7 +1151,51 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_updateStatus,"关闭见面场景失败",response.body().asString()));
}
@Test(description = "修改客户的产品组",priority = 93)
@Test(description ="放弃客户后重新激活进入预备池",priority = 95)
public void 放弃客户后重新激活进入预备池(){
//放弃客户_没钱
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("abandonReasonType", 2);
Response response = network.postResponse(params,BasicConfig.WORK_abandonCust);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_abandonCust,"放弃客户失败",response.body().asString()));
//重新填写表单
params.clear();
params.put("formId", "Kj22MTAzOQ");
params.put("phoneNum", phone);
params.put("urlLink", "https://kjj-static.duibatest.com.cn/cpic-home/2022030105?formId=Kj22MTAzOQ&channel=tx&agent=xm");
params.put("username", "自动化激活用户");
params.put("uuid", "622d83e4-ca21-4ccd-94cb-182c0f2a6b60");
response = network.postResponse(params,BasicConfig.FORM_submit);
//查看客户被重新激活并姓名和产品组更新
params.clear();
params.put("pageIndex", 1);
params.put("pageSize", 10);
params.put("phoneNum", phone);
response = network.getResponse(params,BasicConfig.MANAGER_oto_customerList);
int totalCount = response.jsonPath().getInt("data.totalCount");
Assert.assertTrue(totalCount == 1,network.message(params,BasicConfig.MANAGER_oto_customerList,"未查找到该客户",response.body().asString()));
String custName = response.jsonPath().getString("data.list[0].custName");
int companySize = response.jsonPath().getInt("data.list[0].companyIds.size()");
int custStatus = response.jsonPath().getInt("data.list[0].custStatus");
Assert.assertEquals(custName,"自动化激活用户",network.message(params,BasicConfig.MANAGER_oto_customerList,"客户姓名与填单时错误",response.body().asString()));
Assert.assertEquals(companySize,4,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString()));
Assert.assertEquals(custStatus,0,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString()));
//分配给销售
ssoLogin();
sleep(3000);
params.clear();
params.put("customerId",custId);
params.put("sellerId",SELLER_ID);
response = network.postResponse(params,BasicConfig.MANAGER_oto_assignSeller);
}
@Test(description = "修改客户的产品组",priority = 96)
public void 修改客户产品组(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
......@@ -1137,7 +1205,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_customer_update,"修改客户的产品组失败",response.body().asString()));
}
@Test(description = "查询所有产品列表",priority = 94)
@Test(description = "查询所有产品列表",priority = 97)
public void 查询所有产品列表(){
Response response =network.getResponse(BasicConfig.MANAGER_product_listAll);
int size = response.jsonPath().getInt("data.list.size()");
......@@ -1145,6 +1213,8 @@ public class Work implements Authorization {
}
//修改客户的约面情况
public void updateInvite(int interviewFlag,long time){
HashMap<String,Object> params = new HashMap<>();
......
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