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

更新总监盘点

parent e31773e6
package com.oto.bean;
import lombok.Data;
import java.util.Map;
@Data
public class Customer {
public Map<String,Object> otoCustInfo4Base;
public Map<String,Object> otoCustInfo4Insurance;
public Map<String,Object> otoCustInfo4Manage;
public Map<String,Object> otoCustInfo4Plan;
}
...@@ -38,6 +38,11 @@ public interface Authorization { ...@@ -38,6 +38,11 @@ public interface Authorization {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwuMAr15wbxgFdLvd7yBH2P3tUPLtxddZ3PVh7hYvUNEmh2KUB"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwuMAr15wbxgFdLvd7yBH2P3tUPLtxddZ3PVh7hYvUNEmh2KUB");
} }
//oto销售工作台-专家
default void otoExpertAuth() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwuMAr1k2Cvo19wspzuZEsY48qVwFBfsmN8fyk9oT9sWj9WU5L");
}
//久久保管理员-正常权限模式 //久久保管理员-正常权限模式
default void jjbManagerAuth() {network.agentCookies.put(JJBManagerCookieKey,JJBManagerCookieValue);} default void jjbManagerAuth() {network.agentCookies.put(JJBManagerCookieKey,JJBManagerCookieValue);}
......
package com.oto.cases.otoseller; package com.oto.cases.otoseller;
import com.oto.bean.Customer;
import com.oto.bean.invitationRecord; import com.oto.bean.invitationRecord;
import com.oto.bean.inviteDay; import com.oto.bean.inviteDay;
import com.oto.cases.admin.Authorization; import com.oto.cases.admin.Authorization;
...@@ -36,6 +37,7 @@ public class Work implements Authorization { ...@@ -36,6 +37,7 @@ public class Work implements Authorization {
public static long today; //当前日期0点时间戳 public static long today; //当前日期0点时间戳
public double takerCoefficient; public double takerCoefficient;
public static invitationRecord recordItem; public static invitationRecord recordItem;
public static Customer customer; //当前日期0点时间戳
@BeforeTest @BeforeTest
public void setUp(){ public void setUp(){
...@@ -91,7 +93,7 @@ public class Work implements Authorization { ...@@ -91,7 +93,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_updateTag,"修改标签失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_oto_updateTag,"修改标签失败",response.body().asString()));
} }
@Test(description = "公域引流_查找客户",priority = 5) @Test(description = "公域引流_查找客户",priority = 4)
public void 公域引流_查找客户(){ public void 公域引流_查找客户(){
HashMap<String,Object> params = new HashMap<String,Object>(); HashMap<String,Object> params = new HashMap<String,Object>();
params.put("pageIndex", 1); params.put("pageIndex", 1);
...@@ -108,7 +110,7 @@ public class Work implements Authorization { ...@@ -108,7 +110,7 @@ public class Work implements Authorization {
custId = response.jsonPath().getInt("data.list[0].id"); custId = response.jsonPath().getInt("data.list[0].id");
} }
@Test(description = "公域引流_分配客户",priority = 6) @Test(description = "公域引流_分配客户",priority = 5)
public void 公域引流_分配客户(){ public void 公域引流_分配客户(){
assignSeller(custId,23,false); assignSeller(custId,23,false);
...@@ -120,15 +122,16 @@ public class Work implements Authorization { ...@@ -120,15 +122,16 @@ public class Work implements Authorization {
// } // }
} }
@Test(description = "工作台_销售信息",priority = 7) @Test(description = "工作台_销售信息",priority = 6)
public void 客户分类_销售信息(){ public void 客户分类_销售信息(){
otoInviterAuth(); otoInviterAuth();
Response response = network.getResponse(BasicConfig.WORK_userInfo); Response response = network.getResponse(BasicConfig.WORK_userInfo);
String sellerName = response.jsonPath().getString("data.sellerName"); String sellerName = response.jsonPath().getString("data.sellerName");
int newRoleTypes = response.jsonPath().getInt("data.newRoleTypes.size()");
Assert.assertEquals(sellerName,"勿动-自动化测试邀约",network.message(BasicConfig.WORK_userInfo,"销售姓名错误",response.body().asString())); Assert.assertEquals(sellerName,"勿动-自动化测试邀约",network.message(BasicConfig.WORK_userInfo,"销售姓名错误",response.body().asString()));
} }
@Test(description = "工作台_通知栏",priority = 8) @Test(description = "工作台_通知栏",priority = 7)
public void 工作台_通知栏(){ public void 工作台_通知栏(){
Response response = network.getResponse(BasicConfig.WORK_notifyList); Response response = network.getResponse(BasicConfig.WORK_notifyList);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
...@@ -139,14 +142,14 @@ public class Work implements Authorization { ...@@ -139,14 +142,14 @@ public class Work implements Authorization {
Assert.assertEquals(notifyType,2,network.message(BasicConfig.WORK_notifyList,"通知栏类型错误",response.body().asString())); Assert.assertEquals(notifyType,2,network.message(BasicConfig.WORK_notifyList,"通知栏类型错误",response.body().asString()));
} }
@Test(description = "工作台_菜单权限列表",priority = 9) @Test(description = "工作台_菜单权限列表",priority = 8)
public void 工作台_菜单权限列表(){ public void 工作台_菜单权限列表(){
Response response = network.getResponse(BasicConfig.WORK_menu_list); Response response = network.getResponse(BasicConfig.WORK_menu_list);
int size = response.jsonPath().getInt("data.menuList.size()"); int size = response.jsonPath().getInt("data.menuList.size()");
Assert.assertEquals(size,2,network.message(BasicConfig.WORK_notifyList,"菜单列表数量错误",response.body().asString())); Assert.assertEquals(size,2,network.message(BasicConfig.WORK_notifyList,"菜单列表数量错误",response.body().asString()));
} }
@Test(description = "客户状态分类_数量总览",priority = 10) @Test(description = "客户状态分类_数量总览",priority = 9)
public void 客户状态分类_数量总览(){ public void 客户状态分类_数量总览(){
Response response = network.getResponse(BasicConfig.WORK_staticHeader); Response response = network.getResponse(BasicConfig.WORK_staticHeader);
Object data = response.jsonPath().getJsonObject("data"); Object data = response.jsonPath().getJsonObject("data");
...@@ -155,14 +158,14 @@ public class Work implements Authorization { ...@@ -155,14 +158,14 @@ public class Work implements Authorization {
header.put("totalNum",totalNum); header.put("totalNum",totalNum);
} }
@Test(description = "工作台_标签列表",priority = 11) @Test(description = "工作台_标签列表",priority = 10)
public void 工作台_标签列表(){ public void 工作台_标签列表(){
Response response = network.getResponse(BasicConfig.WORK_tagList); Response response = network.getResponse(BasicConfig.WORK_tagList);
String tagName = response.jsonPath().getString("data.find{it.tagId =="+tagId+"}.tagName"); String tagName = response.jsonPath().getString("data.find{it.tagId =="+tagId+"}.tagName");
Assert.assertEquals(tagName,"勿动-自动化更新标签",network.message(BasicConfig.WORK_tagList,"跟进表格数量为空",response.body().asString())); Assert.assertEquals(tagName,"勿动-自动化更新标签",network.message(BasicConfig.WORK_tagList,"跟进表格数量为空",response.body().asString()));
} }
@Test(description = "全部客户客户列表",priority = 12) @Test(description = "全部客户客户列表",priority = 11)
public void 全部客户列表(){ public void 全部客户列表(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1); params.put("pageIndex", 1);
...@@ -172,17 +175,13 @@ public class Work implements Authorization { ...@@ -172,17 +175,13 @@ public class Work implements Authorization {
int customerId = response.jsonPath().getInt("data.list[0].custId"); int customerId = response.jsonPath().getInt("data.list[0].custId");
Assert.assertEquals(customerId,custId,network.message(params,BasicConfig.WORK_customerList,"需要联系列表中首位客户非新增客户",response.body().asString())); Assert.assertEquals(customerId,custId,network.message(params,BasicConfig.WORK_customerList,"需要联系列表中首位客户非新增客户",response.body().asString()));
int custStar = response.jsonPath().getInt("data.list[0].custStar");
followTimes = response.jsonPath().getInt("data.list[0].followTimes"); followTimes = response.jsonPath().getInt("data.list[0].followTimes");
Object custValue = response.jsonPath().getJsonObject("data.list[0].custValue");
Object lastFollowTime = response.jsonPath().getJsonObject("data.list[0].lastFollowTime"); Object lastFollowTime = response.jsonPath().getJsonObject("data.list[0].lastFollowTime");
Assert.assertEquals(custStar,0,network.message(params,BasicConfig.WORK_customerList,"新客户默认为星标客户",response.body().asString()));
Assert.assertEquals(followTimes,0,network.message(params,BasicConfig.WORK_customerList,"新客户的默认跟进次数不为0",response.body().asString())); Assert.assertEquals(followTimes,0,network.message(params,BasicConfig.WORK_customerList,"新客户的默认跟进次数不为0",response.body().asString()));
Assert.assertNull(custValue,network.message(params,BasicConfig.WORK_customerList,"新客户的默认客户价值不为null",response.body().asString()));
Assert.assertNull(lastFollowTime,network.message(params,BasicConfig.WORK_customerList,"新客户的默认跟进时间不为null",response.body().asString())); Assert.assertNull(lastFollowTime,network.message(params,BasicConfig.WORK_customerList,"新客户的默认跟进时间不为null",response.body().asString()));
} }
@Test(description = "查看微信",priority = 13) @Test(description = "查看微信",priority = 12)
public void 查看微信(){ public void 查看微信(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId); params.put("custId", custId);
...@@ -191,7 +190,7 @@ public class Work implements Authorization { ...@@ -191,7 +190,7 @@ public class Work implements Authorization {
Assert.assertEquals(data,"15136361301",network.message(params,BasicConfig.WORK_phone,"手机号错误",response.body().asString())); Assert.assertEquals(data,"15136361301",network.message(params,BasicConfig.WORK_phone,"手机号错误",response.body().asString()));
} }
@Test(description = "查询新客户见面情况",priority = 14) @Test(description = "查询新客户见面情况",priority = 13)
public void 查询新客户见面情况(){ public void 查询新客户见面情况(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId); params.put("custId", custId);
...@@ -204,7 +203,7 @@ public class Work implements Authorization { ...@@ -204,7 +203,7 @@ public class Work implements Authorization {
Assert.assertNull(orderVisitDate,network.message(params,BasicConfig.WORK_info,"预约时间不为空",response.body().asString())); Assert.assertNull(orderVisitDate,network.message(params,BasicConfig.WORK_info,"预约时间不为空",response.body().asString()));
} }
@Test(description = "查询新客户头部信息",priority = 15) @Test(description = "查询新客户头部信息",priority = 14)
public void 查询新客户头部信息(){ public void 查询新客户头部信息(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId); params.put("custId", custId);
...@@ -215,22 +214,49 @@ public class Work implements Authorization { ...@@ -215,22 +214,49 @@ public class Work implements Authorization {
int callTimes= response.jsonPath().getInt("data.callTimes"); int callTimes= response.jsonPath().getInt("data.callTimes");
int custStar= response.jsonPath().getInt("data.custStar"); int custStar= response.jsonPath().getInt("data.custStar");
int addWxStatus= response.jsonPath().getInt("data.custStar"); int addWxStatus= response.jsonPath().getInt("data.custStar");
Assert.assertEquals(allCallTimes,0,network.message(params,BasicConfig.WORK_header,"总通话次数非0",response.body().asString())); int custHead= response.jsonPath().getInt("data.custHead");
Assert.assertEquals(allCallTime,0,network.message(params,BasicConfig.WORK_header,"总call次数非0",response.body().asString())); String custDescription= response.jsonPath().getString("data.custDescription");
Assert.assertEquals(callTimes,0,network.message(params,BasicConfig.WORK_header,"总通话时间非0",response.body().asString())); String expertRemark= response.jsonPath().getString("data.expertRemark");
Assert.assertEquals(custStar,0,network.message(params,BasicConfig.WORK_header,"客户星标不为否",response.body().asString())); Assert.assertEquals(allCallTimes,0,network.message(params,BasicConfig.WORK_header,"新客户总通话次数非0",response.body().asString()));
Assert.assertEquals(addWxStatus,0,network.message(params,BasicConfig.WORK_header,"客户的加微状态不是未添加",response.body().asString())); Assert.assertEquals(allCallTime,0,network.message(params,BasicConfig.WORK_header,"新客户总call次数非0",response.body().asString()));
Assert.assertEquals(callTimes,0,network.message(params,BasicConfig.WORK_header,"新客户总通话时间非0",response.body().asString()));
Assert.assertEquals(custStar,0,network.message(params,BasicConfig.WORK_header,"新客户星标不为否",response.body().asString()));
Assert.assertEquals(addWxStatus,0,network.message(params,BasicConfig.WORK_header,"新客户的加微状态不是未添加",response.body().asString()));
Assert.assertEquals(custHead,"https://yun.kjjcrm.com/kjy/media/file/20221018/c9c37c521ddfd949614f1b78b92a1001.png?x-oss-process=image/quality,q_80",network.message(params,BasicConfig.WORK_header,"新客户头像非默认头像",response.body().asString()));
Assert.assertNull(custDescription,network.message(params,BasicConfig.WORK_header,"新客户的备注不为null",response.body().asString()));
Assert.assertNull(expertRemark,network.message(params,BasicConfig.WORK_header,"新客户的专家评价不为null",response.body().asString()));
} }
@Test(description = "查询新客户详细信息",priority = 16) @Test(description = "查询新客户的日程状态",priority = 15)
public void 查询新客户详细信息(){ public void 查询新客户的日程状态(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId); params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.WORK_detail); Response response = network.getResponse(params,BasicConfig.WORK_getScheduleInfo);
Object custInfo = response.jsonPath().getJsonObject("data.custInfo"); Object data = response.jsonPath().getJsonObject("data");
Object formInfo = response.jsonPath().getJsonObject("data.formInfo"); Assert.assertNull(data,network.message(params,BasicConfig.WORK_getScheduleInfo,"新客户日程非空",response.body().asString()));
Assert.assertNotNull(custInfo,network.message(params,BasicConfig.WORK_detail,"新客户提交计划书状态错误非0",response.body().asString())); }
Assert.assertNotNull(formInfo,network.message(params,BasicConfig.WORK_detail,"新客户投保要素确认状态错误非0",response.body().asString()));
@Test(description = "查询新客户的详细信息",priority = 16)
public void 查询新客户的详细信息(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.WORK_detail_v2);
String age = response.jsonPath().getString("data.otoCustInfo4Base.age");
String sellerName = response.jsonPath().getString("data.otoCustInfo4Base.sellerName");
int checkInCommunity = response.jsonPath().getInt("data.otoCustInfo4Insurance.checkInCommunity");
String familyStructure = response.jsonPath().getString("data.otoCustInfo4Insurance.familyStructure");
int commitPlanFlag = response.jsonPath().getInt("data.otoCustInfo4Manage.commitPlanFlag");
int meetTimeSize = response.jsonPath().getInt("data.otoCustInfo4Manage.meetTimeSize");
String drawType = response.jsonPath().getString("data.otoCustInfo4Plan.drawType");
Assert.assertNull(age,network.message(params,BasicConfig.WORK_detail_v2,"新客户年龄非空",response.body().asString()));
Assert.assertNull(sellerName,network.message(params,BasicConfig.WORK_detail_v2,"新客户当前的跟进销售非空",response.body().asString()));
Assert.assertNull(familyStructure,network.message(params,BasicConfig.WORK_detail_v2,"新客户家庭结构非空",response.body().asString()));
Assert.assertNull(drawType,network.message(params,BasicConfig.WORK_detail_v2,"新客户支取方案非空",response.body().asString()));
Assert.assertEquals(checkInCommunity,0,network.message(params,BasicConfig.WORK_detail_v2,"新客户的是否需入住社区非否",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.WORK_detail_v2,"新客户的是否提交计划书非否",response.body().asString()));
Assert.assertEquals(meetTimeSize,0,network.message(params,BasicConfig.WORK_detail_v2,"新客户的见面次数非0",response.body().asString()));
customer = JsonUtil.parseResponseToBean(response,Customer.class);
} }
@Test(description = "查询客户电话表单回填状态",priority = 17) @Test(description = "查询客户电话表单回填状态",priority = 17)
...@@ -259,13 +285,21 @@ public class Work implements Authorization { ...@@ -259,13 +285,21 @@ public class Work implements Authorization {
Assert.assertNotNull(data,network.message(params,BasicConfig.WORK_callLog,"历史通话为空",response.body().asString())); Assert.assertNotNull(data,network.message(params,BasicConfig.WORK_callLog,"历史通话为空",response.body().asString()));
} }
@Test(description = "查询客户阶段信息",priority = 20) @Test(description = "更新客户的头像信息",priority = 20)
public void 查询客户阶段信息(){ public void 更新客户的头像信息(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId); params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.PHONE_getCustPhase); params.put("custHead", "//yun.dui88.com/kjy/image/20221021/bd2990ed27174e0389b75c06a9bcae8c.jpg");
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag"); Response response = network.postResponse(params,BasicConfig.WORK_updateCustHead);
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_getCustPhase,"是否提交计划书不为否",response.body().asString())); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustHead,"上传客户头像失败",response.body().asString()));
params.clear();
params.put("custId", custId);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
int custHead= response.jsonPath().getInt("data.custHead");
Assert.assertEquals(custHead,"//yun.dui88.com/kjy/image/20221021/bd2990ed27174e0389b75c06a9bcae8c.jpg",network.message(params,BasicConfig.WORK_header,"新客户头像未更新",response.body().asString()));
} }
@Test(description = "查看销售的总系数",priority = 21) @Test(description = "查看销售的总系数",priority = 21)
...@@ -480,34 +514,92 @@ public class Work implements Authorization { ...@@ -480,34 +514,92 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"修改自动化场景失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"修改自动化场景失败",response.body().asString()));
} }
@Test(description = "修改客户基础信息",priority = 37) @Test(description = "修改客户基础信息",priority = 34)
public void 修改客户基础信息(){ public void 修改客户基础信息(){
otoInviterAuth(); otoInviterAuth();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
ArrayList<Integer> array = new ArrayList<>(); ArrayList<Integer> array = new ArrayList<>();
params.put("custId", custId); params.put("custId", custId);
params.put("commitPlanFlag", 0); Customer custInfo = customer;
params.put("addWxStatus", 0); custInfo.otoCustInfo4Base.put("age",65);
params.put("coreMaker", 1); custInfo.otoCustInfo4Base.put("custAddress","客户的家庭住址");
params.put("ideaAgree", 1); custInfo.otoCustInfo4Base.put("considerAgedForWho","为谁考虑养老");
params.put("insApplicant", 4); custInfo.otoCustInfo4Base.put("attentionOldCommunity","客户最关注养老社区什么");
params.put("insByApplicant", 4); params.put("otoCustInfo4Base", custInfo.otoCustInfo4Base);
params.put("insMoney", 500); params.put("otoCustInfo4Insurance", custInfo.otoCustInfo4Insurance);
params.put("insPeriod", 20); params.put("otoCustInfo4Manage", custInfo.otoCustInfo4Manage);
params.put("custArea", "北京-北京市"); params.put("otoCustInfo4Plan", custInfo.otoCustInfo4Plan);
Response response = network.postResponse(params,BasicConfig.WORK_edit_v2);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_edit_v2,"修改客户信息失败",response.body().asString()));
params.clear();
params.put("custId", custId);
response = network.getResponse(params,BasicConfig.WORK_detail_v2);
String age = response.jsonPath().getString("data.otoCustInfo4Base.age");
String custAddress = response.jsonPath().getString("data.otoCustInfo4Base.custAddress");
String considerAgedForWho = response.jsonPath().getString("data.otoCustInfo4Base.considerAgedForWho");
String attentionOldCommunity = response.jsonPath().getString("data.otoCustInfo4Base.attentionOldCommunity");
Assert.assertEquals(age,"65",network.message(params,BasicConfig.WORK_detail_v2,"客户的年龄未更新",response.body().asString()));
Assert.assertEquals(custAddress,"客户的家庭住址",network.message(params,BasicConfig.WORK_detail_v2,"客户的家庭住址未更新",response.body().asString()));
Assert.assertEquals(considerAgedForWho,"为谁考虑养老",network.message(params,BasicConfig.WORK_detail_v2,"客户的为谁考虑养老未更新",response.body().asString()));
Assert.assertEquals(attentionOldCommunity,"客户最关注养老社区什么",network.message(params,BasicConfig.WORK_detail_v2,"客户的客户最关注养老社区什么未更新",response.body().asString()));
customer = JsonUtil.parseResponseToBean(response,Customer.class);
}
@Test(description = "编辑客户备注",priority = 35)
public void 编辑客户备注(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("custDescription", "客户的备注"); params.put("custDescription", "客户的备注");
params.put("custName", "自动化测试用户"); Response response = network.postResponse(params,BasicConfig.WORK_updateCustDescription);
params.put("dealFlag", 0); boolean data = response.jsonPath().getBoolean("data");
params.put("forWho", array); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustDescription,"修改客户备注失败",response.body().asString()));
params.put("retireMoney", 0);
params.put("roomerAge", 0); params.clear();
params.put("roomerCity", ""); params.put("custId", custId);
params.put("visitOrg", array); params.put("type", 1);
Response response = network.postResponse(params,BasicConfig.WORK_edit); response = network.getResponse(params,BasicConfig.WORK_header);
String custDescription= response.jsonPath().getString("data.custDescription");
Assert.assertEquals(custDescription,"客户的备注",network.message(params,BasicConfig.WORK_header,"客户的备注未更新",response.body().asString()));
}
@Test(description = "编辑客户加微状态",priority = 36)
public void 编辑客户加微状态(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("addWxStatus", 3);
Response response = network.postResponse(params,BasicConfig.WORK_updateAddWxStatus);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_edit,"修改客户基础信息失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateAddWxStatus,"修改客户备注失败",response.body().asString()));
params.clear();
params.put("custId", custId);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
int addWxStatus= response.jsonPath().getInt("data.addWxStatus");
Assert.assertEquals(addWxStatus,3,network.message(params,BasicConfig.WORK_header,"客户的备注未更新",response.body().asString()));
} }
@Test(description = "创建转介绍客户",priority = 36)
public void 创建转介绍客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("addWxStatus", 3);
Response response = network.postResponse(params,BasicConfig.WORK_updateAddWxStatus);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateAddWxStatus,"修改客户备注失败",response.body().asString()));
params.clear();
params.put("custId", custId);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
int addWxStatus= response.jsonPath().getInt("data.addWxStatus");
Assert.assertEquals(addWxStatus,3,network.message(params,BasicConfig.WORK_header,"客户的备注未更新",response.body().asString()));
}
@Test(description = "查看客户动态",priority = 39) @Test(description = "查看客户动态",priority = 39)
public void 查看客户动态(){ public void 查看客户动态(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
...@@ -1296,10 +1388,55 @@ public class Work implements Authorization { ...@@ -1296,10 +1388,55 @@ public class Work implements Authorization {
takerCoefficient = leadertotalCoefficient; takerCoefficient = leadertotalCoefficient;
} }
@Test(description = "带看组回显邀约信息",priority = 105) @Test(description = "销售标记客户星标成功",priority = 105)
public void 带看组回显邀约信息(){ public void 销售标记客户星标成功(){
otoTakerAuth(); otoTakerAuth();
getHasFirstInvite(1,false); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response = network.postResponse(params,BasicConfig.WORK_star);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateExpertRemark,"标记客户星标失败",response.body().asString()));
params.clear();
params.put("custId", custId);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
int custStar= response.jsonPath().getInt("data.custStar");
Assert.assertEquals(custStar,1,network.message(params,BasicConfig.WORK_header,"客户的专家评价未更新",response.body().asString()));
}
@Test(description = "销售取消客户星标失败",priority = 105)
public void 销售取消客户星标失败(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response = network.postResponse(params,BasicConfig.WORK_star);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertFalse(data,network.message(params,BasicConfig.WORK_updateExpertRemark,"销售取消客户星标成功",response.body().asString()));
params.clear();
params.put("custId", custId);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
int custStar= response.jsonPath().getInt("data.custStar");
Assert.assertEquals(custStar,1,network.message(params,BasicConfig.WORK_header,"客户的专家评价未更新",response.body().asString()));
}
@Test(description = "编辑客户专家评价",priority = 107)
public void 编辑客户专家评价(){
otoExpertAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("expertRemark", "专家的评价");
Response response = network.getResponse(params,BasicConfig.WORK_updateExpertRemark);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateExpertRemark,"修改专家评价失败",response.body().asString()));
params.clear();
params.put("custId", custId);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
String custDescription= response.jsonPath().getString("data.custDescription");
Assert.assertEquals(custDescription,"客户的备注",network.message(params,BasicConfig.WORK_header,"客户的专家评价未更新",response.body().asString()));
} }
//修改客户的约面情况 //修改客户的约面情况
......
...@@ -194,6 +194,14 @@ public class BasicConfig { ...@@ -194,6 +194,14 @@ public class BasicConfig {
public static final String WORK_calendar_nowAssign= WORK_HOST + "/kjy/oto/manager/cust/calendar/nowAssign"; public static final String WORK_calendar_nowAssign= WORK_HOST + "/kjy/oto/manager/cust/calendar/nowAssign";
public static final String WORK_calendar_workMenu= WORK_HOST + "/kjy/oto/manager/cust/calendar/workMenu"; public static final String WORK_calendar_workMenu= WORK_HOST + "/kjy/oto/manager/cust/calendar/workMenu";
public static final String WORK_calendar_assignRollback= WORK_HOST + "/kjy/oto/manager/cust/calendar/assignRollback"; public static final String WORK_calendar_assignRollback= WORK_HOST + "/kjy/oto/manager/cust/calendar/assignRollback";
public static final String WORK_getScheduleInfo= WORK_HOST + "/kjy/oto/manager/sellerNotify/getScheduleInfo";
public static final String WORK_detail_v2 = WORK_HOST + "/kjy/oto/manager/customer/detail/v2";
public static final String WORK_updateCustHead= WORK_HOST + "/kjy/oto/manager/customer/updateCustHead";
public static final String WORK_edit_v2 = WORK_HOST + "/kjy/oto/manager/customer/edit/v2";
public static final String WORK_updateCustDescription = WORK_HOST + "/kjy/oto/manager/customer/updateCustDescription";
public static final String WORK_updateExpertRemark= WORK_HOST + "/kjy/oto/manager/customer/updateExpertRemark";
public static final String WORK_updateAddWxStatus= WORK_HOST + "/kjy/oto/manager/customer/updateAddWxStatus";
public static final String WORK_introduce_save= WORK_HOST + "/kjy/oto/manager/customer/introduce/save";
//*************************客集集营销平台****************************** //*************************客集集营销平台******************************
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser"; public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
......
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