Commit 46c34b9f authored by 龚小红's avatar 龚小红

Merge branch 'Faeture/20221021-gxh' into 'master'

Faeture/20221021 gxh

See merge request !40
parents 4ffa3ab5 ade84012
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);}
......
...@@ -867,6 +867,32 @@ public class Manager implements Authorization { ...@@ -867,6 +867,32 @@ public class Manager implements Authorization {
} }
@Test(description = "修改客户的产品组",priority = 56)
public void 修改客户产品组(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custids.get(0));
params.put("companyIds",new int[]{5,6});
Response response =network.postResponse(params,BasicConfig.MANAGER_customer_update);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_customer_update,"修改客户的产品组失败",response.body().asString()));
params.clear();
params.put("pageIndex", 1);
params.put("pageSize", 10);
params.put("phoneNum", "15136361302");
response = network.getResponse(params,BasicConfig.MANAGER_oto_customerList);
int companySize = response.jsonPath().getInt("data.list[0].companyIds.size()");
Assert.assertEquals(companySize,2,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString()));
}
@Test(description = "查询所有产品列表",priority = 57)
public void 查询所有产品列表(){
Response response =network.getResponse(BasicConfig.MANAGER_product_listAll);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_product_listAll,"查看产品列表不为空",response.body().asString()));
}
public int searchCustName(String custName){ public int searchCustName(String custName){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
......
...@@ -105,9 +105,9 @@ public class Phone implements Authorization { ...@@ -105,9 +105,9 @@ public class Phone implements Authorization {
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("id",Work.sceneId); params.put("id",Work.sceneId);
params.put("confUsable",1); params.put("confUsable",1);
Response response =network.postResponse(params,BasicConfig.PHONE_updateStatus); Response response =network.postResponse(params,BasicConfig.WORK_updateStatus);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_updateStatus,"关闭见面场景失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateStatus,"关闭见面场景失败",response.body().asString()));
params.clear(); params.clear();
params.put("custId", cust_id); params.put("custId", cust_id);
...@@ -304,6 +304,12 @@ public class Phone implements Authorization { ...@@ -304,6 +304,12 @@ public class Phone implements Authorization {
response =network.getResponse(params,BasicConfig.WORK_invire); response =network.getResponse(params,BasicConfig.WORK_invire);
boolean data = response.jsonPath().getBoolean("data");Assert.assertTrue(data ,network.message(params,BasicConfig.WORK_invire,"上传面访记录>=1",response.body().asString())); boolean data = response.jsonPath().getBoolean("data");Assert.assertTrue(data ,network.message(params,BasicConfig.WORK_invire,"上传面访记录>=1",response.body().asString()));
params.clear();
params.put("custId", IdMakeUtil.decodingId(cust_id));
response = network.getResponse(params,BasicConfig.WORK_detail_v2);
int commitPlanFlag = response.jsonPath().getInt("data.otoCustInfo4Manage.commitPlanFlag");
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.WORK_detail_v2,"是否提交计划书非否",response.body().asString()));
//查看约面日历 //查看约面日历
otoManagerAuth(); otoManagerAuth();
Work.getCalendarlist(Work.today,5,"自动化激活用户","勿动-自动化测试邀约"); Work.getCalendarlist(Work.today,5,"自动化激活用户","勿动-自动化测试邀约");
...@@ -346,6 +352,13 @@ public class Phone implements Authorization { ...@@ -346,6 +352,13 @@ public class Phone implements Authorization {
Response response =network.postResponse(params,BasicConfig.WORK_interviewAuditReject); Response response =network.postResponse(params,BasicConfig.WORK_interviewAuditReject);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_interviewAuditReject,"驳回审批失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_interviewAuditReject,"驳回审批失败",response.body().asString()));
otoTakerAuth();
params.clear();
params.put("custId", IdMakeUtil.decodingId(cust_id));
response = network.getResponse(params,BasicConfig.WORK_detail_v2);
int commitPlanFlag = response.jsonPath().getInt("data.otoCustInfo4Manage.commitPlanFlag");
Assert.assertEquals(commitPlanFlag,1,network.message(params,BasicConfig.WORK_detail_v2,"是否提交计划书非否",response.body().asString()));
} }
@Test(description = "查看我的面访状态更新为已失效",priority = 26) @Test(description = "查看我的面访状态更新为已失效",priority = 26)
...@@ -443,6 +456,13 @@ public class Phone implements Authorization { ...@@ -443,6 +456,13 @@ public class Phone implements Authorization {
response =network.postResponse(params,BasicConfig.WORK_interviewAuditPass); response =network.postResponse(params,BasicConfig.WORK_interviewAuditPass);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_interviewAuditPass,"通过审批失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_interviewAuditPass,"通过审批失败",response.body().asString()));
otoTakerAuth();
params.clear();
params.put("custId", IdMakeUtil.decodingId(cust_id));
response = network.getResponse(params,BasicConfig.WORK_detail_v2);
int commitPlanFlag = response.jsonPath().getInt("data.otoCustInfo4Manage.commitPlanFlag");
Assert.assertEquals(commitPlanFlag,1,network.message(params,BasicConfig.WORK_detail_v2,"是否提交计划书非是",response.body().asString()));
} }
@Test(description = "查询专家列表",priority = 32) @Test(description = "查询专家列表",priority = 32)
...@@ -587,7 +607,7 @@ public class Phone implements Authorization { ...@@ -587,7 +607,7 @@ public class Phone implements Authorization {
otoManagerAuth(); otoManagerAuth();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("id",Work.sceneId); params.put("id",Work.sceneId);
Response response =network.postResponse(params,BasicConfig.PHONE_delete); Response response =network.postResponse(params,BasicConfig.WORK_delete);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_delCust,"删除见面场景失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_delCust,"删除见面场景失败",response.body().asString()));
} }
...@@ -606,9 +626,9 @@ public class Phone implements Authorization { ...@@ -606,9 +626,9 @@ public class Phone implements Authorization {
params.put("pageSize",20); params.put("pageSize",20);
Response response =network.getResponse(params,BasicConfig.PHONE_paper_getCustomers); Response response =network.getResponse(params,BasicConfig.PHONE_paper_getCustomers);
int size = response.jsonPath().getInt("data.list.size()"); int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(BasicConfig.PHONE_paper_getCustomers,"订单状态未更新为已参观",response.body().asString())); Assert.assertTrue(size>0,network.message(BasicConfig.PHONE_paper_getCustomers,"日报列表客户为空",response.body().asString()));
String label = response.jsonPath().getString("data.list[0].label"); String label = response.jsonPath().getString("data.list[0].label");
Assert.assertEquals(label,"今日联系",network.message(BasicConfig.PHONE_paper_getCustomers,"日报提交状态非0:未提交",response.body().asString())); Assert.assertEquals(label,"",network.message(BasicConfig.PHONE_paper_getCustomers,"客户非今日见面标签",response.body().asString()));
} }
@Test(description = "提交日报",priority = 50) @Test(description = "提交日报",priority = 50)
...@@ -639,18 +659,6 @@ public class Phone implements Authorization { ...@@ -639,18 +659,6 @@ public class Phone implements Authorization {
interviewdetail(interviewIds.get(2),1,0,"",0,0,null); interviewdetail(interviewIds.get(2),1,0,"",0,0,null);
} }
@Test(description = "查询新客户详细信息",priority = 54)
public void 查询新客户详细信息(){
otoTakerAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
Response response = network.getResponse(params,BasicConfig.WORK_detail);
int addWxStatus = response.jsonPath().getInt("data.custInfo.addWxStatus");
int commitPlanFlag = response.jsonPath().getInt("data.custPhaseVo.commitPlanFlag");
Assert.assertEquals(addWxStatus,3,network.message(params,BasicConfig.WORK_detail,"加微状态不为3:上报已添加",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.WORK_detail,"是否提交计划书不为否",response.body().asString()));
}
@Test(description = "邀约仅能查看自己创建的面访",priority = 55) @Test(description = "邀约仅能查看自己创建的面访",priority = 55)
public void 邀约仅能查看自己创建的面访(){ public void 邀约仅能查看自己创建的面访(){
otoInviterTku(); otoInviterTku();
...@@ -662,7 +670,16 @@ public class Phone implements Authorization { ...@@ -662,7 +670,16 @@ public class Phone implements Authorization {
Assert.assertEquals(size,0,network.message(params,BasicConfig.PHONE_interviewList,"邀约面访列表不为空",response.body().asString())); Assert.assertEquals(size,0,network.message(params,BasicConfig.PHONE_interviewList,"邀约面访列表不为空",response.body().asString()));
} }
@Test(description = "专家能查看关联自己的面访",priority = 56) @Test(description = "邀约查看历史备注包含面访备注",priority = 56)
public void 邀约查看历史备注包含面访备注(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
Response response = network.getResponse(params, BasicConfig.WORK_historyRecord);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,3,network.message(params,BasicConfig.WORK_historyRecord,"邀约面访列表不为空",response.body().asString()));
}
@Test(description = "专家能查看关联自己的面访",priority = 57)
public void 专家能查看关联自己的面访(){ public void 专家能查看关联自己的面访(){
otoEpertTku(); otoEpertTku();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
...@@ -676,7 +693,7 @@ public class Phone implements Authorization { ...@@ -676,7 +693,7 @@ public class Phone implements Authorization {
@Test(description = "删除客户",priority = 79) @Test(description = "删除客户",priority = 79)
public void 删除客户(){ public void 删除客户(){
long id= IdMakeUtil.decodingId(cust_id); long id= IdMakeUtil.decodingId(cust_id);
for(int i = (int)id;i<id+5;i++){ for(int i = (int)id;i<id+6;i++){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", i); params.put("custId", i);
Response response = network.postResponse(params,BasicConfig.WORK_delCust); Response response = network.postResponse(params,BasicConfig.WORK_delCust);
......
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,11 +110,11 @@ public class Work implements Authorization { ...@@ -108,11 +110,11 @@ 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,1);
assignSeller(custId,INVITE_ID,true); assignSeller(custId,INVITE_ID,true,1);
// for(int i = 6104;i<6204;i++){ // for(int i = 6104;i<6204;i++){
// assignSeller(custId,INVITE_ID,true); // assignSeller(custId,INVITE_ID,true);
...@@ -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,34 +158,29 @@ public class Work implements Authorization { ...@@ -155,34 +158,29 @@ 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);
params.put("pageSize", 10); params.put("pageSize", 50);
params.put("custClassifyType", 1);
Response response = network.getResponse(params,BasicConfig.WORK_customerList); Response response = network.getResponse(params,BasicConfig.WORK_customerList);
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 +189,7 @@ public class Work implements Authorization { ...@@ -191,7 +189,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 +202,7 @@ public class Work implements Authorization { ...@@ -204,7 +202,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 +213,49 @@ public class Work implements Authorization { ...@@ -215,22 +213,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())); String custHead= response.jsonPath().getString("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.assertEquals(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 +284,21 @@ public class Work implements Authorization { ...@@ -259,13 +284,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);
String custHead= response.jsonPath().getString("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)
...@@ -444,9 +477,9 @@ public class Work implements Authorization { ...@@ -444,9 +477,9 @@ public class Work implements Authorization {
params.put("companyIds",new int[]{5}); params.put("companyIds",new int[]{5});
params.put("sceneName","勿动-自动化场景"); params.put("sceneName","勿动-自动化场景");
params.put("sceneDesc","勿动,这是自动化测试专用的面访场景"); params.put("sceneDesc","勿动,这是自动化测试专用的面访场景");
Response response =network.postResponse(params,BasicConfig.PHONE_custConfSave); Response response =network.postResponse(params,BasicConfig.WORK_custConfSave);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"新增见面场景失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_custConfSave,"新增见面场景失败",response.body().asString()));
} }
@Test(description = "查看见面场景列表",priority = 32) @Test(description = "查看见面场景列表",priority = 32)
...@@ -454,13 +487,13 @@ public class Work implements Authorization { ...@@ -454,13 +487,13 @@ public class Work implements Authorization {
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex",1); params.put("pageIndex",1);
params.put("pageSize",20); params.put("pageSize",20);
Response response =network.getResponse(params,BasicConfig.PHONE_custConfList); Response response =network.getResponse(params,BasicConfig.WORK_custConfList);
int size = response.jsonPath().getInt("data.list.size()"); int size = response.jsonPath().getInt("data.list.size()");
int confUsable = response.jsonPath().getInt("data.list[0].confUsable"); int confUsable = response.jsonPath().getInt("data.list[0].confUsable");
String sceneName = response.jsonPath().getString("data.list[0].sceneName"); String sceneName = response.jsonPath().getString("data.list[0].sceneName");
Assert.assertTrue(size>0 ,network.message(params,BasicConfig.PHONE_custConfList,"查看列表场景不为空",response.body().asString())); Assert.assertTrue(size>0 ,network.message(params,BasicConfig.WORK_custConfList,"查看列表场景不为空",response.body().asString()));
Assert.assertEquals(confUsable, 0,network.message(params,BasicConfig.PHONE_custConfList,"查看见面场景非0",response.body().asString())); Assert.assertEquals(confUsable, 0,network.message(params,BasicConfig.WORK_custConfList,"查看见面场景非0",response.body().asString()));
Assert.assertEquals(sceneName,"勿动-自动化场景",network.message(params,BasicConfig.PHONE_custConfList,"查看见面名称错误",response.body().asString())); Assert.assertEquals(sceneName,"勿动-自动化场景",network.message(params,BasicConfig.WORK_custConfList,"查看见面名称错误",response.body().asString()));
sceneId = response.jsonPath().getLong("data.list[0].id"); sceneId = response.jsonPath().getLong("data.list[0].id");
} }
...@@ -475,37 +508,118 @@ public class Work implements Authorization { ...@@ -475,37 +508,118 @@ public class Work implements Authorization {
params.put("companyIds",companyIds); params.put("companyIds",companyIds);
params.put("sceneName","勿动-自动化面访场景"); params.put("sceneName","勿动-自动化面访场景");
params.put("sceneDesc","勿动,这是自动化测试专用的面访场景"); params.put("sceneDesc","勿动,这是自动化测试专用的面访场景");
Response response =network.postResponse(params,BasicConfig.PHONE_custConfSave); Response response =network.postResponse(params,BasicConfig.WORK_custConfSave);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"修改自动化场景失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_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", "客户的备注");
Response response = network.postResponse(params,BasicConfig.WORK_updateCustDescription);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustDescription,"修改客户备注失败",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()));
}
@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_updateAddWxStatus,"修改客户加微状态失败",response.body().asString()));
}
@Test(description = "编辑客户姓名",priority = 37)
public void 编辑客户姓名(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("custName", "自动化测试用户"); params.put("custName", "自动化测试用户");
params.put("dealFlag", 0); Response response = network.postResponse(params,BasicConfig.WORK_updateCustName);
params.put("forWho", array); boolean data = response.jsonPath().getBoolean("data");
params.put("retireMoney", 0); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustName,"修改客户姓名失败",response.body().asString()));
params.put("roomerAge", 0); }
params.put("roomerCity", "");
params.put("visitOrg", array); @Test(description = "创建转介绍客户",priority = 38)
Response response = network.postResponse(params,BasicConfig.WORK_edit); public void 创建转介绍客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("addType", 1);
params.put("introducerId", custId);
params.put("custPhoneNum", "15136361306");
params.put("custName", "自动化测试客户6");
Response response = network.postResponse(params,BasicConfig.WORK_introduce_save);
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_introduce_save,"创建转介绍客户失败",response.body().asString()));
params.clear();
params.put("pageIndex", 1);
params.put("pageSize", 50);
params.put("custName", "自动化测试客户6");
response = network.getResponse(params,BasicConfig.WORK_customerList);
int customerId = response.jsonPath().getInt("data.list[0].custId");
params.clear();
params.put("custId", customerId);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
String introducer = response.jsonPath().getString("data.introducer");
String inviteName = response.jsonPath().getString("data.inviteName");
String expertName = response.jsonPath().getString("data.expertName");
String sellerName = response.jsonPath().getString("data.sellerName");
Assert.assertEquals(introducer,"自动化测试用户",network.message(params,BasicConfig.WORK_updateAddWxStatus,"转介绍客户的介绍人错误",response.body().asString()));
Assert.assertEquals(inviteName,"勿动-自动化测试邀约",network.message(params,BasicConfig.WORK_updateAddWxStatus,"转介绍客户的当前邀约与介绍人不一致",response.body().asString()));
Assert.assertNull(expertName,network.message(params,BasicConfig.WORK_updateAddWxStatus,"转介绍客户的当前销售与介绍人不一致",response.body().asString()));
Assert.assertNull(sellerName,network.message(params,BasicConfig.WORK_updateAddWxStatus,"转介绍客户的当前专家与介绍人不一致",response.body().asString()));
} }
@Test(description = "查看客户动态",priority = 39) @Test(description = "查看客户动态",priority = 39)
...@@ -524,7 +638,7 @@ public class Work implements Authorization { ...@@ -524,7 +638,7 @@ public class Work implements Authorization {
params.put("custName", "自动化"); params.put("custName", "自动化");
Response response = network.getResponse(params,BasicConfig.WORK_fuzzyCustName); Response response = network.getResponse(params,BasicConfig.WORK_fuzzyCustName);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.WORK_fuzzyCustName,"客户动态条数错误",response.body().asString())); Assert.assertTrue(size>0,network.message(params,BasicConfig.WORK_fuzzyCustName,"客户查找结果为空",response.body().asString()));
} }
@Test(description = "公域引流_删除标签",priority = 41) @Test(description = "公域引流_删除标签",priority = 41)
...@@ -791,7 +905,7 @@ public class Work implements Authorization { ...@@ -791,7 +905,7 @@ public class Work implements Authorization {
response = network.getResponse(BasicConfig.WORK_staticHeader); response = network.getResponse(BasicConfig.WORK_staticHeader);
int totalNum = response.jsonPath().getInt("data.totalNum"); int totalNum = response.jsonPath().getInt("data.totalNum");
int num = header.get("totalNum"); int num = header.get("totalNum");
Assert.assertEquals(totalNum, num-1,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString())); Assert.assertEquals(totalNum, num,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString()));
//查询销售总系数 //查询销售总系数
response =network.getResponse(BasicConfig.WORK_coefficient_detail); response =network.getResponse(BasicConfig.WORK_coefficient_detail);
...@@ -850,7 +964,7 @@ public class Work implements Authorization { ...@@ -850,7 +964,7 @@ public class Work implements Authorization {
Response response = network.getResponse(BasicConfig.WORK_staticHeader); Response response = network.getResponse(BasicConfig.WORK_staticHeader);
int totalNum = response.jsonPath().getInt("data.totalNum"); int totalNum = response.jsonPath().getInt("data.totalNum");
int num = header.get("totalNum"); int num = header.get("totalNum");
Assert.assertEquals(totalNum, num,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString())); Assert.assertEquals(totalNum, num+1,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString()));
} }
@Test(description = "查询认领客户评价不清空",priority = 71) @Test(description = "查询认领客户评价不清空",priority = 71)
...@@ -886,7 +1000,7 @@ public class Work implements Authorization { ...@@ -886,7 +1000,7 @@ public class Work implements Authorization {
@Test(description = "销售间客户动态取消隔离",priority = 74) @Test(description = "销售间客户动态取消隔离",priority = 74)
public void 销售间客户动态取消隔离(){ public void 销售间客户动态取消隔离(){
//重新分配邀约 //重新分配邀约
assignSeller(custId,320,true); assignSeller(custId,320,true,1);
//查看客户动态 //查看客户动态
otoInviterAuth2(); otoInviterAuth2();
...@@ -910,7 +1024,7 @@ public class Work implements Authorization { ...@@ -910,7 +1024,7 @@ public class Work implements Authorization {
@Test(description ="跟进中不可重新激活",priority = 76) @Test(description ="跟进中不可重新激活",priority = 76)
public void 跟进中不可重新激活(){ public void 跟进中不可重新激活(){
//还原 //还原
assignSeller(custId,INVITE_ID,true); assignSeller(custId,INVITE_ID,true,1);
//重新填写表单 //重新填写表单
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
...@@ -1098,7 +1212,44 @@ public class Work implements Authorization { ...@@ -1098,7 +1212,44 @@ public class Work implements Authorization {
Assert.assertTrue(listSize>0,network.message(params,BasicConfig.WORK_taskDetailsList,"待完成客户数统计错误",response.body().asString())); Assert.assertTrue(listSize>0,network.message(params,BasicConfig.WORK_taskDetailsList,"待完成客户数统计错误",response.body().asString()));
} }
@Test(description = "查看我的预约订单列表",priority = 90) @Test(description = "销售标记客户星标成功",priority = 90)
public void 销售标记客户星标成功(){
otoInviterAuth();
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 = 92)
public void 编辑客户专家评价(){
assignSeller(custId,EXPERT_ID,true,3);
otoExpertAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("expertRemark", "专家的评价");
Response response = network.postResponse(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.expertRemark");
Assert.assertEquals(custDescription,"专家的评价",network.message(params,BasicConfig.WORK_header,"客户的专家评价未更新",response.body().asString()));
}
@Test(description = "查看我的预约订单列表",priority = 93)
public void 查看我的预约订单列表(){ public void 查看我的预约订单列表(){
agent2Tku(); agent2Tku();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
...@@ -1112,39 +1263,63 @@ public class Work implements Authorization { ...@@ -1112,39 +1263,63 @@ public class Work implements Authorization {
Assert.assertEquals(bookingStatus,0,network.message(BasicConfig.PHONE_getReservationList,"预约状态错误:非待参观",response.body().asString())); Assert.assertEquals(bookingStatus,0,network.message(BasicConfig.PHONE_getReservationList,"预约状态错误:非待参观",response.body().asString()));
} }
@Test(description = "提交客户盘点",priority = 94)
@Test(description = "关闭见面场景状态",priority = 94) public void 提交客户盘点(){
public void 关闭见面场景状态(){ otoManagerAuth();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("id",sceneId); params.put("checkConclusion","客户盘点后的结论1");
params.put("confUsable",0); params.put("checkNext","");
Response response =network.postResponse(params,BasicConfig.PHONE_updateStatus); params.put("custId",custId);
Response response =network.postResponse(params,BasicConfig.WORK_saveCheckRecord);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_updateStatus,"关闭见面场景失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_saveCheckRecord,"提交客户盘点失败",response.body().asString()));
}
params.put("checkConclusion","");
params.put("checkNext","下一步干什么2");
response =network.postResponse(params,BasicConfig.WORK_saveCheckRecord);
@Test(description = "修改客户的产品组",priority = 95) params.put("checkConclusion","客户盘点后的结论");
public void 修改客户产品组(){ params.put("checkNext","下一步干什么");
response =network.postResponse(params,BasicConfig.WORK_saveCheckRecord);
}
@Test(description = "查看盘点列表",priority = 95)
public void 查看盘点列表(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId); params.put("custId",custId);
params.put("companyIds",new int[]{5,6}); Response response =network.getResponse(params,BasicConfig.WORK_checkList);
Response response =network.postResponse(params,BasicConfig.MANAGER_customer_update); int size = response.jsonPath().getInt("data.size()");
boolean data = response.jsonPath().getBoolean("data"); Assert.assertEquals(size,3,network.message(params,BasicConfig.WORK_checkList,"提交客户盘点失败",response.body().asString()));
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_customer_update,"修改客户的产品组失败",response.body().asString())); String checkConclusion = response.jsonPath().getString("data[0].checkConclusion");
String checkNext = response.jsonPath().getString("data[0].checkNext");
Assert.assertEquals(checkConclusion,"客户盘点后的结论",network.message(params,BasicConfig.WORK_checkList,"提交客户盘点失败",response.body().asString()));
Assert.assertEquals(checkNext,"下一步干什么",network.message(params,BasicConfig.WORK_checkList,"提交客户盘点失败",response.body().asString()));
}
params.clear(); @Test(description = "查看盘点客户列表",priority = 96)
params.put("pageIndex", 1); public void 查看盘点客户列表(){
params.put("pageSize", 10); HashMap<String,Object> params = new HashMap<>();
params.put("phoneNum", "15136361301"); params.put("todayCheck",1);
response = network.getResponse(params,BasicConfig.MANAGER_oto_customerList); params.put("pageIndex",1);
int companySize = response.jsonPath().getInt("data.list[0].companyIds.size()"); params.put("pageSize",50);
Assert.assertEquals(companySize,2,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString())); Response response =network.postResponse(params,BasicConfig.WORK_checkCustList);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.WORK_checkCustList,"今日盘点客户不包含刚刚已经盘点的客户",response.body().asString()));
}
@Test(description = "关闭见面场景状态",priority = 97)
public void 关闭见面场景状态(){
HashMap<String,Object> params = new HashMap<>();
params.put("id",sceneId);
params.put("confUsable",0);
Response response =network.postResponse(params,BasicConfig.WORK_updateStatus);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateStatus,"关闭见面场景失败",response.body().asString()));
} }
@Test(description ="放弃客户后重新激活进入预备池",priority = 95) @Test(description ="放弃客户后重新激活进入预备池",priority = 98)
public void 放弃客户后重新激活进入预备池(){ public void 放弃客户后重新激活进入预备池(){
otoInviterAuth();
//放弃客户_没钱 //放弃客户_没钱
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId); params.put("custId", custId);
...@@ -1168,27 +1343,18 @@ public class Work implements Authorization { ...@@ -1168,27 +1343,18 @@ public class Work implements Authorization {
int companySize = response.jsonPath().getInt("data.list[0].companyIds.size()"); int companySize = response.jsonPath().getInt("data.list[0].companyIds.size()");
int custStatus = response.jsonPath().getInt("data.list[0].custStatus"); int custStatus = response.jsonPath().getInt("data.list[0].custStatus");
Assert.assertEquals(custName,"自动化激活用户",network.message(params,BasicConfig.MANAGER_oto_customerList,"客户姓名与填单时错误",response.body().asString())); 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(companySize,3,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString()));
Assert.assertEquals(custStatus,0,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(); ssoLogin();
sleep(5000); sleep(5000);
assignSeller(custId,INVITE_ID,true); assignSeller(custId,INVITE_ID,true,1);
}
@Test(description = "查询所有产品列表",priority = 97)
public void 查询所有产品列表(){
Response response =network.getResponse(BasicConfig.MANAGER_product_listAll);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_product_listAll,"查看产品列表不为空",response.body().asString()));
} }
@Test(description = "CRM查询场景专家列表",priority = 99) @Test(description = "CRM查询场景专家列表",priority = 99)
public void CRM查询场景专家列表(){ public void CRM查询场景专家列表(){
otoInviterAuth(); otoManagerAuth();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("recordId",recordItem.recordId); params.put("recordId",recordItem.recordId);
params.put("expertFlag",true); params.put("expertFlag",true);
...@@ -1209,6 +1375,7 @@ public class Work implements Authorization { ...@@ -1209,6 +1375,7 @@ public class Work implements Authorization {
@Test(description = "预分配客户",priority = 101) @Test(description = "预分配客户",priority = 101)
public void 预分配客户(){ public void 预分配客户(){
otoInviterAuth();
coefficient.put("totalCoefficient",getSellertotalCoefficient()); coefficient.put("totalCoefficient",getSellertotalCoefficient());
otoTakerAuth(); otoTakerAuth();
...@@ -1296,11 +1463,6 @@ public class Work implements Authorization { ...@@ -1296,11 +1463,6 @@ public class Work implements Authorization {
takerCoefficient = leadertotalCoefficient; takerCoefficient = leadertotalCoefficient;
} }
@Test(description = "带看组回显邀约信息",priority = 105)
public void 带看组回显邀约信息(){
otoTakerAuth();
getHasFirstInvite(1,false);
}
//修改客户的约面情况 //修改客户的约面情况
public void updateInvite(int interviewFlag,long time){ public void updateInvite(int interviewFlag,long time){
...@@ -1434,10 +1596,10 @@ public class Work implements Authorization { ...@@ -1434,10 +1596,10 @@ public class Work implements Authorization {
return totalCoefficient; return totalCoefficient;
} }
public void assignSeller(int customerId,int sellerId,boolean result) { public void assignSeller(int customerId,int sellerId,boolean result,int assignType) {
HashMap<String, Object> params = new HashMap<>(); HashMap<String, Object> params = new HashMap<>();
params.put("customerId", customerId); params.put("customerId", customerId);
params.put("assignType", 1); params.put("assignType", assignType);
params.put("sellerId", sellerId); params.put("sellerId", sellerId);
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_assignSeller); Response response = network.postResponse(params, BasicConfig.MANAGER_oto_assignSeller);
if (result){ if (result){
......
...@@ -43,8 +43,8 @@ public class BasicConfig { ...@@ -43,8 +43,8 @@ public class BasicConfig {
/*******OTO销售工作台*********/ /*******OTO销售工作台*********/
public static final String OTO_INVITER_TKU = "4yrzAfNog7WE527NKCNmqBqph48N7mWR9J49QYysZmKYC3DF97hQFap7RphynF3GFXLhp7GFZ35mc"; public static final String OTO_INVITER_TKU = "4yrzAfNog7WE527NKCNmqBqph48N7mWR9J49QYysZmKYC3DF97hQFap7RphynF3GFXLhp7GFZ35mc";
public static final String OTO_TAKER_TKU = "7Fcuh7FWTsTHSqd2BcxmPv9SXECJUK6FddtgLSE1ugtvw4pYHcyHV7StcfozfnfchPdCkpFErSUP3kgVyF58YPpp9B8BdrksYwChC8mBXn6pQ8GxCb5AJpZreWsh8wxX6phe6zHs2RvsKvd3jnq1kyQA"; public static final String OTO_TAKER_TKU = "7Fcuh7FWTsTHSqd2be68YiRKvNhscfrWwNHFvuMwkumtuhF4AotfJLRbsAVpjxzt4G9E5r6M2nvgrcqiP5xBvQDLDQjT5eB9rqBVB1eonEqkmd1gjktdoWV8GLPAK8S3nk7yaHUevCWZWaZhJ8YkQV6M";
public static final String OTO_EXPERT_TKU = "7Fcuh7FWTsTHSqd2BcxmPuvuvvAePiLgYnPp2yhMkiydMAt2nVg96imnjRqrqVAH3cmNGvDJURv32AVK2yLe2x7Lf6AHBynU8eM24vGtyweFzdxys5K12eHXDwbkxrb2kvT1n4iw91cxjxXqpVSRffbo"; public static final String OTO_EXPERT_TKU = "7Fcuh7FWTsTHSqd2be68YiSEoRqh5beyhXNsJahtdNENwqw57Q8TPPkJkUoE8pP57iQhpfhq2LnsJVpBfdtSt2j969eSDnpxUd7WGNhyZDL8gSFA6ecKSbZSYh29SPrUQXhHQihrbPNDfLzrDbku1AM4";
// *************** 客集集域名 *************** // *************** 客集集域名 ***************
public static final String HOST = "https://kjj.m.duibatest.com.cn"; public static final String HOST = "https://kjj.m.duibatest.com.cn";
public static final String SSO_HOST = "https://sso.duibatest.com.cn"; public static final String SSO_HOST = "https://sso.duibatest.com.cn";
...@@ -156,7 +156,6 @@ public class BasicConfig { ...@@ -156,7 +156,6 @@ public class BasicConfig {
public static final String WORK_tag = WORK_HOST + "/kjy/oto/manager/customer/tag"; public static final String WORK_tag = WORK_HOST + "/kjy/oto/manager/customer/tag";
public static final String WORK_order = WORK_HOST + "/kjy/oto/manager/customer/order"; public static final String WORK_order = WORK_HOST + "/kjy/oto/manager/customer/order";
public static final String WORK_feedback = WORK_HOST + "/kjy/oto/manager/customer/feedback"; public static final String WORK_feedback = WORK_HOST + "/kjy/oto/manager/customer/feedback";
public static final String WORK_edit = WORK_HOST + "/kjy/oto/manager/customer/edit";
public static final String WORK_operation = WORK_HOST + "/kjy/oto/manager/customer/log/operation"; public static final String WORK_operation = WORK_HOST + "/kjy/oto/manager/customer/log/operation";
public static final String WORK_fuzzyCustName= WORK_HOST + "/kjy/oto/manager/customer/fuzzy/custName"; 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_call= WORK_HOST + "/kjy/oto/manager/customer/call";
...@@ -194,6 +193,23 @@ public class BasicConfig { ...@@ -194,6 +193,23 @@ 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 WORK_updateCustName= WORK_HOST + "/kjy/oto/manager/customer/updateCustName";
public static final String WORK_custConfSave = WORK_HOST + "/kjy/oto/manager/custconf/save";
public static final String WORK_custConfList = WORK_HOST + "/kjy/oto/manager/custconf/list";
public static final String WORK_updateStatus = WORK_HOST + "/kjy/oto/manager/custconf/updateStatus";
public static final String WORK_delete = WORK_HOST + "/kjy/oto/manager/custconf/delete";
public static final String WORK_saveCheckRecord = WORK_HOST + "/kjy/oto/manager/customer/saveCheckRecord";
public static final String WORK_checkCustList = WORK_HOST + "/kjy/oto/manager/customer/check/custList";
public static final String WORK_checkList = WORK_HOST + "/kjy/oto/manager/customer/check/list";
public static final String WORK_historyRecord = WORK_HOST + "/kjy/oto/manager/customer/log/historyRecord";
//*************************客集集营销平台****************************** //*************************客集集营销平台******************************
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser"; public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
...@@ -202,12 +218,8 @@ public class BasicConfig { ...@@ -202,12 +218,8 @@ public class BasicConfig {
public static final String WX_confirm= HOST + "/kjy/mp/oto/risk/invLetter/confirm"; public static final String WX_confirm= HOST + "/kjy/mp/oto/risk/invLetter/confirm";
//***********************销售工作台手机端********************** //***********************销售工作台手机端**********************
public static final String PHONE_custConfSave = WORK_HOST + "/kjy/oto/manager/custconf/save";
public static final String PHONE_custConfList = WORK_HOST + "/kjy/oto/manager/custconf/list";
public static final String PHONE_updateStatus = WORK_HOST + "/kjy/oto/manager/custconf/updateStatus";
public static final String PHONE_getCustPhase = WORK_HOST + "/kjy/oto/manager/customer/getCustPhase"; public static final String PHONE_getCustPhase = WORK_HOST + "/kjy/oto/manager/customer/getCustPhase";
public static final String PHONE_updateCustPhase = WORK_HOST + "/kjy/oto/manager/customer/updateCustPhase"; public static final String PHONE_updateCustPhase = WORK_HOST + "/kjy/oto/manager/customer/updateCustPhase";
public static final String PHONE_delete = WORK_HOST + "/kjy/oto/manager/custconf/delete";
public static final String PHONE_customerList = PHONE_HOST + "/kjy/oto/manager/customer/list"; public static final String PHONE_customerList = PHONE_HOST + "/kjy/oto/manager/customer/list";
public static final String PHONE_customerSave = PHONE_HOST + "/kjy/oto/manager/customer/introduce/save"; public static final String PHONE_customerSave = PHONE_HOST + "/kjy/oto/manager/customer/introduce/save";
public static final String PHONE_appointmentDetail = PHONE_HOST + "/kjy/oto/interview/appointment/detail"; public static final String PHONE_appointmentDetail = PHONE_HOST + "/kjy/oto/interview/appointment/detail";
......
...@@ -27,7 +27,7 @@ public class NetworkUtils { ...@@ -27,7 +27,7 @@ public class NetworkUtils {
//cookies中的tku //cookies中的tku
agentCookies.put("tku",AGENT_TKU); agentCookies.put("tku",AGENT_TKU);
//多场景测试标志 //多场景测试标志
agentCookies.put("_duibaServiceGroupKey","miria-3401"); agentCookies.put("_duibaServiceGroupKey","miria-3321");
//json类型的headers //json类型的headers
agentHeaders.put("Content-Type","application/json"); agentHeaders.put("Content-Type","application/json");
//二进制文件的headers //二进制文件的headers
......
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