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

增加邀约优化的测试用例

parent 76d84885
...@@ -136,14 +136,6 @@ public class Activity implements Authorization { ...@@ -136,14 +136,6 @@ public class Activity implements Authorization {
sleep(2000); sleep(2000);
updateInvite(1,now + 3600000,cust_id-1); updateInvite(1,now + 3600000,cust_id-1);
abandonCust(cust_id+1);//自动化客户2
sleep(2000);
assignSeller(cust_id+1,INVITE_ID,true,1,"crm");
sleep(2000);
updateInvite(1,now + 3600000,cust_id+1);
sleep(2000);
updateInvite(0,now + 3600000,cust_id+1);
abandonCust(cust_id+2);//自动化客户3 abandonCust(cust_id+2);//自动化客户3
sleep(2000); sleep(2000);
assignSeller(cust_id+2,INVITE_ID,true,1,"crm"); assignSeller(cust_id+2,INVITE_ID,true,1,"crm");
...@@ -157,7 +149,6 @@ public class Activity implements Authorization { ...@@ -157,7 +149,6 @@ public class Activity implements Authorization {
updateInvite(1,now + 3600000,cust_id+3); updateInvite(1,now + 3600000,cust_id+3);
otoLeaderAuth(); otoLeaderAuth();
getCalendarlist(today,3,"自动化测试用户2","勿动-自动化测试邀约");
getCalendarlist(today,2,"自动化测试用户0","勿动-自动化测试邀约"); getCalendarlist(today,2,"自动化测试用户0","勿动-自动化测试邀约");
} }
...@@ -173,15 +164,6 @@ public class Activity implements Authorization { ...@@ -173,15 +164,6 @@ public class Activity implements Authorization {
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_preAssign,"预分配失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_preAssign,"预分配失败",response.body().asString()));
//重新邀约客户2
updateInvite(1,now + 3600000,cust_id+1);
getCalendarlist(today,2,"自动化测试用户2","勿动-自动化测试邀约");
params.put("recordId",recordItem.recordId);
response =network.postResponse(params,BasicConfig.WORK_calendar_preAssign);
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_preAssign,"预分配失败",response.body().asString()));
updateInvite(0,now + 3600000,cust_id+1);//再次已鸽
//立即分配客户3 //立即分配客户3
getCalendarlist(today,2,"自动化测试用户3","勿动-自动化测试邀约"); getCalendarlist(today,2,"自动化测试用户3","勿动-自动化测试邀约");
params.put("recordId",recordItem.recordId); params.put("recordId",recordItem.recordId);
...@@ -236,12 +218,10 @@ public class Activity implements Authorization { ...@@ -236,12 +218,10 @@ public class Activity implements Authorization {
int size = response.jsonPath().getInt("data.list[0].custList.size()"); int size = response.jsonPath().getInt("data.list[0].custList.size()");
int configId = response.jsonPath().getInt("data.list[0].configId"); int configId = response.jsonPath().getInt("data.list[0].configId");
Assert.assertEquals(configId,440,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动的见面场景错误",response.body().asString())); Assert.assertEquals(configId,440,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动的见面场景错误",response.body().asString()));
Assert.assertEquals(size,4,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动量数错误",response.body().asString())); Assert.assertEquals(size,3,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动量数错误",response.body().asString()));
int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"); int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus");
int signStatus1 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus");
int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"); int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus");
Assert.assertEquals(signStatus0,-1,network.message(params,BasicConfig.WX_submitRecordDetail,"已分配的签到状态非【需确认】",response.body().asString())); Assert.assertEquals(signStatus0,-1,network.message(params,BasicConfig.WX_submitRecordDetail,"已分配的签到状态非【需确认】",response.body().asString()));
Assert.assertEquals(signStatus1,0,network.message(params,BasicConfig.WX_submitRecordDetail,"已鸽的签到状态非【未到场】",response.body().asString()));
Assert.assertEquals(signStatus2,2,network.message(params,BasicConfig.WX_submitRecordDetail,"已签到的签到状态非【已签到】",response.body().asString())); Assert.assertEquals(signStatus2,2,network.message(params,BasicConfig.WX_submitRecordDetail,"已签到的签到状态非【已签到】",response.body().asString()));
} }
...@@ -295,8 +275,8 @@ public class Activity implements Authorization { ...@@ -295,8 +275,8 @@ public class Activity implements Authorization {
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("date", today); params.put("date", today);
Response response = network.postResponse(params, BasicConfig.WX_interviewConfigList); Response response = network.postResponse(params, BasicConfig.WX_interviewConfigList);
int size = response.jsonPath().getInt("data.list.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,1,network.message(params,BasicConfig.WX_interviewConfigList,"其他见面场景数错误",response.body().asString())); Assert.assertEquals(size,4,network.message(params,BasicConfig.WX_interviewConfigList,"其他见面场景组数错误",response.body().asString()));
} }
@Test(description = "专家查看见面目的列表",priority = 15) @Test(description = "专家查看见面目的列表",priority = 15)
......
...@@ -219,7 +219,7 @@ public class CheckTask implements Authorization { ...@@ -219,7 +219,7 @@ public class CheckTask implements Authorization {
public void 自建计划查找销售名下客户(){ public void 自建计划查找销售名下客户(){
otoTakerAuth(); otoTakerAuth();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
Response response = network.getResponse(params,BasicConfig.WORK_obtainCustBySellerId); Response response = network.getResponse(params,BasicConfig.WORK_obtainCustBySellerId);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size , 1,network.message(params,BasicConfig.WORK_obtainCustBySellerId,"查看销售在在库客户为空",response.body().asString())); Assert.assertEquals(size , 1,network.message(params,BasicConfig.WORK_obtainCustBySellerId,"查看销售在在库客户为空",response.body().asString()));
...@@ -371,7 +371,7 @@ public class CheckTask implements Authorization { ...@@ -371,7 +371,7 @@ public class CheckTask implements Authorization {
String inviteName = response.jsonPath().getString("data.inviteName"); String inviteName = response.jsonPath().getString("data.inviteName");
String expertName = response.jsonPath().getString("data.expertName"); String expertName = response.jsonPath().getString("data.expertName");
String sellerName = response.jsonPath().getString("data.sellerName"); String sellerName = response.jsonPath().getString("data.sellerName");
Assert.assertEquals(introducer,"自动化激活用户",network.message(params,BasicConfig.WORK_header,"转介绍客户的介绍人错误",response.body().asString())); Assert.assertEquals(introducer,"自动化测试用户",network.message(params,BasicConfig.WORK_header,"转介绍客户的介绍人错误",response.body().asString()));
Assert.assertNull(inviteName,network.message(params,BasicConfig.WORK_header,"转介绍客户的当前邀约与介绍人不一致",response.body().asString())); Assert.assertNull(inviteName,network.message(params,BasicConfig.WORK_header,"转介绍客户的当前邀约与介绍人不一致",response.body().asString()));
Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_header,"转介绍客户的当前销售与介绍人不一致",response.body().asString())); Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_header,"转介绍客户的当前销售与介绍人不一致",response.body().asString()));
Assert.assertEquals(sellerName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_header,"转介绍客户的当前专家与介绍人不一致",response.body().asString())); Assert.assertEquals(sellerName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_header,"转介绍客户的当前专家与介绍人不一致",response.body().asString()));
......
...@@ -19,8 +19,7 @@ import java.util.List; ...@@ -19,8 +19,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import static com.oto.cases.otoseller.Manager.cust_id; import static com.oto.cases.otoseller.Manager.cust_id;
import static com.oto.cases.otoseller.Work.assignSeller; import static com.oto.cases.otoseller.Work.*;
import static com.oto.cases.otoseller.Work.now;
import static com.oto.config.BasicConfig.*; import static com.oto.config.BasicConfig.*;
import static com.oto.utils.BaseUtils.ssoLogin; import static com.oto.utils.BaseUtils.ssoLogin;
import static com.oto.utils.ThreadSleepUtils.sleep; import static com.oto.utils.ThreadSleepUtils.sleep;
...@@ -48,6 +47,7 @@ public class Invite implements Authorization { ...@@ -48,6 +47,7 @@ public class Invite implements Authorization {
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("confUsable",1); params.put("confUsable",1);
params.put("companyIds",new int[]{5}); params.put("companyIds",new int[]{5});
params.put("sceneClassification",2);
params.put("sceneName","勿动-自动化场景"); params.put("sceneName","勿动-自动化场景");
params.put("sceneType",2); params.put("sceneType",2);
params.put("sceneDesc","勿动,这是自动化测试专用的面访场景"); params.put("sceneDesc","勿动,这是自动化测试专用的面访场景");
...@@ -81,6 +81,7 @@ public class Invite implements Authorization { ...@@ -81,6 +81,7 @@ public class Invite implements Authorization {
params.put("confUsable",1); params.put("confUsable",1);
params.put("sceneType",1); params.put("sceneType",1);
params.put("companyIds",companyIds); params.put("companyIds",companyIds);
params.put("sceneClassification",1);
params.put("sceneName","勿动-自动化面访场景"); params.put("sceneName","勿动-自动化面访场景");
params.put("sceneDesc","勿动,这是自动化测试专用的面访场景"); params.put("sceneDesc","勿动,这是自动化测试专用的面访场景");
Response response =network.postResponse(params,BasicConfig.WORK_custConfSave); Response response =network.postResponse(params,BasicConfig.WORK_custConfSave);
...@@ -127,7 +128,7 @@ public class Invite implements Authorization { ...@@ -127,7 +128,7 @@ public class Invite implements Authorization {
@Test(description = "查看约面日历为已确认",priority = 9) @Test(description = "查看约面日历为已确认",priority = 9)
public void 查看约面日历为已确认(){ public void 查看约面日历为已确认(){
getCalendarlist(today+86400000,2,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today+86400000,2,"自动化测试用户","勿动-自动化测试邀约");
} }
...@@ -137,26 +138,27 @@ public class Invite implements Authorization { ...@@ -137,26 +138,27 @@ public class Invite implements Authorization {
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
getCalendarlist(today+86400000,2,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today+86400000,2,"自动化测试用户","勿动-自动化测试邀约");
} }
@Test(description = "修改客户具体日期,老邀约为已鸽",priority = 11) @Test(description = "修改客户具体日期覆盖邀约记录",priority = 11)
public void 修改客户具体日期老邀约变为已鸽(){ public void 修改客户具体日期覆盖邀约记录(){
updateInvite(1,now + 86400000*2,cust_id); updateInvite(1,now + 86400000*2,cust_id);
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
getCalendarlist(today+86400000,3,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today+86400000,0,"自动化测试用户","勿动-自动化测试邀约");
getCalendarlist(today+86400000*2,1,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today+86400000*2,1,"自动化测试用户","勿动-自动化测试邀约");
headerDeatil(1,"inviteStatus","5");
} }
@Test(description = "修改客户未约到客户状态变为已鸽",priority = 12) @Test(description = "修改客户未约到客户删除邀约记录",priority = 12)
public void 修改客户未约到客户状态变为已鸽(){ public void 修改客户未约到客户删除邀约记录(){
updateInvite(0,now + 3600000,cust_id); updateInvite(0,now + 3600000,cust_id);
getHasFirstInvite(0,true); getHasFirstInvite(0,true);
getCallCustInfo(0);; getCallCustInfo(0);;
getCalendarlist(today+86400000*2,3,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today+86400000*2,0,"自动化测试用户","勿动-自动化测试邀约");
} }
@Test(description = "修改客户已约到客户状态时间今天后变为已确认",priority =13) @Test(description = "修改客户已约到客户状态时间今天后变为已确认",priority =13)
...@@ -165,7 +167,7 @@ public class Invite implements Authorization { ...@@ -165,7 +167,7 @@ public class Invite implements Authorization {
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
getCalendarlist(today,2,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,2,"自动化测试用户","勿动-自动化测试邀约");
} }
@Test(description = "查询客户的面访上传记录<1",priority = 14) @Test(description = "查询客户的面访上传记录<1",priority = 14)
...@@ -237,7 +239,7 @@ public class Invite implements Authorization { ...@@ -237,7 +239,7 @@ public class Invite implements Authorization {
//查看回显 //查看回显
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
getCalendarlist(today,2,"自动化激活用户","勿动-自动化备用邀约"); getCalendarlist(today,2,"自动化测试用户","勿动-自动化备用邀约");
//还原 //还原
assignSeller(cust_id,INVITE_ID,true,1,"crm"); assignSeller(cust_id,INVITE_ID,true,1,"crm");
...@@ -285,7 +287,7 @@ public class Invite implements Authorization { ...@@ -285,7 +287,7 @@ public class Invite implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_preAssign,"预分配失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_preAssign,"预分配失败",response.body().asString()));
//验证约面日历状态/专家/带看人变更 //验证约面日历状态/专家/带看人变更
getCalendarlist(today,4,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,4,"自动化测试用户","勿动-自动化测试邀约");
Assert.assertEquals(recordItem.expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_calendar_list,"专家名称错误",response.body().asString())); Assert.assertEquals(recordItem.expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_calendar_list,"专家名称错误",response.body().asString()));
Assert.assertEquals(recordItem.takeLookName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_calendar_list,"带看人名称错误",response.body().asString())); Assert.assertEquals(recordItem.takeLookName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_calendar_list,"带看人名称错误",response.body().asString()));
Assert.assertTrue(recordItem.hasAssignFlag,network.message(params,BasicConfig.WORK_calendar_list,"是否分配状态非【已分配】",response.body().asString())); Assert.assertTrue(recordItem.hasAssignFlag,network.message(params,BasicConfig.WORK_calendar_list,"是否分配状态非【已分配】",response.body().asString()));
...@@ -312,7 +314,7 @@ public class Invite implements Authorization { ...@@ -312,7 +314,7 @@ public class Invite implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_assignRollback,"退回邀约组失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_assignRollback,"退回邀约组失败",response.body().asString()));
//验证约面日历状态/专家/带看人清空 //验证约面日历状态/专家/带看人清空
getCalendarlist(today,3,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,3,"自动化测试用户","勿动-自动化测试邀约");
Assert.assertNull(recordItem.expertName,network.message(params,BasicConfig.WORK_calendar_list,"专家名称不为空",response.body().asString())); Assert.assertNull(recordItem.expertName,network.message(params,BasicConfig.WORK_calendar_list,"专家名称不为空",response.body().asString()));
Assert.assertNull(recordItem.takeLookName,network.message(params,BasicConfig.WORK_calendar_list,"带看人名称不为空",response.body().asString())); Assert.assertNull(recordItem.takeLookName,network.message(params,BasicConfig.WORK_calendar_list,"带看人名称不为空",response.body().asString()));
Assert.assertFalse(recordItem.hasAssignFlag,network.message(params,BasicConfig.WORK_calendar_list,"是否分配状态非【待分配未确认】",response.body().asString())); Assert.assertFalse(recordItem.hasAssignFlag,network.message(params,BasicConfig.WORK_calendar_list,"是否分配状态非【待分配未确认】",response.body().asString()));
...@@ -328,7 +330,7 @@ public class Invite implements Authorization { ...@@ -328,7 +330,7 @@ public class Invite implements Authorization {
public void 立即分配邀约客户(){ public void 立即分配邀约客户(){
updateInvite(0,now + 3600000,cust_id); updateInvite(0,now + 3600000,cust_id);
updateInvite(1,now + 3600000,cust_id); updateInvite(1,now + 3600000,cust_id);
getCalendarlist(today,2,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,2,"自动化测试用户","勿动-自动化测试邀约");
otoManagerAuth(); otoManagerAuth();
...@@ -342,7 +344,7 @@ public class Invite implements Authorization { ...@@ -342,7 +344,7 @@ public class Invite implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_nowAssign,"立即分配失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_nowAssign,"立即分配失败",response.body().asString()));
//验证约面日历状态/专家/带看人变更 //验证约面日历状态/专家/带看人变更
getCalendarlist(today,4,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,4,"自动化测试用户","勿动-自动化测试邀约");
Assert.assertEquals(recordItem.expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_calendar_list,"专家名称错误",response.body().asString())); Assert.assertEquals(recordItem.expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_calendar_list,"专家名称错误",response.body().asString()));
Assert.assertEquals(recordItem.takeLookName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_calendar_list,"带看人名称错误",response.body().asString())); Assert.assertEquals(recordItem.takeLookName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_calendar_list,"带看人名称错误",response.body().asString()));
Assert.assertTrue(recordItem.hasAssignFlag,network.message(params,BasicConfig.WORK_calendar_list,"是否分配状态非【已分配】",response.body().asString())); Assert.assertTrue(recordItem.hasAssignFlag,network.message(params,BasicConfig.WORK_calendar_list,"是否分配状态非【已分配】",response.body().asString()));
...@@ -370,7 +372,7 @@ public class Invite implements Authorization { ...@@ -370,7 +372,7 @@ public class Invite implements Authorization {
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.WORK_MNG_team, "客户分配团队失败", response.body().asString())); Assert.assertTrue(data, network.message(params, BasicConfig.WORK_MNG_team, "客户分配团队失败", response.body().asString()));
getCalendarlist(today,4,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,4,"自动化测试用户","勿动-自动化测试邀约");
Assert.assertEquals(recordItem.deptId, 47,network.message(BasicConfig.WORK_getAllSceneConfs,"未回显部门id","")); Assert.assertEquals(recordItem.deptId, 47,network.message(BasicConfig.WORK_getAllSceneConfs,"未回显部门id",""));
} }
...@@ -408,10 +410,13 @@ public class Invite implements Authorization { ...@@ -408,10 +410,13 @@ public class Invite implements Authorization {
int firstInterviewFlag = response.jsonPath().getInt("data.firstInterviewFlag"); int firstInterviewFlag = response.jsonPath().getInt("data.firstInterviewFlag");
Assert.assertEquals(firstInterviewFlag ,interviewFlag ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态回显非"+"",response.body().asString())); Assert.assertEquals(firstInterviewFlag ,interviewFlag ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态回显非"+"",response.body().asString()));
if(interviewFlag == 1){ if(interviewFlag == 1){//已约到非终态-回显邀约记录
String interviewTime = response.jsonPath().getString("data.interviewTime"); String interviewTime = response.jsonPath().getString("data.interviewTime");
Assert.assertNotNull(interviewTime ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态未更新为【已约到】",response.body().asString())); Assert.assertNotNull(interviewTime ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态未更新为【已约到】",response.body().asString()));
}else { }else if(interviewFlag == 2){//已约到终态-不回显邀约记录
String interviewTime = response.jsonPath().getString("data.interviewTime");
Assert.assertNull(interviewTime ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态未更新为【已约到】",response.body().asString()));
}else{
String nextContactTime = response.jsonPath().getString("data.nextContactTime"); String nextContactTime = response.jsonPath().getString("data.nextContactTime");
Assert.assertNotNull(nextContactTime ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态未更新为【已约到】",response.body().asString())); Assert.assertNotNull(nextContactTime ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态未更新为【已约到】",response.body().asString()));
} }
......
...@@ -75,7 +75,7 @@ public class Phone implements Authorization { ...@@ -75,7 +75,7 @@ public class Phone implements Authorization {
@Test(description = "姓名搜索客户",priority = 4) @Test(description = "姓名搜索客户",priority = 4)
public void 姓名搜索客户(){ public void 姓名搜索客户(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
params.put("pageSize", "20"); params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_customerList); Response response = network.getResponse(params, BasicConfig.PHONE_customerList);
int size = response.jsonPath().getInt("data.myCustomerVos.size()"); int size = response.jsonPath().getInt("data.myCustomerVos.size()");
...@@ -134,7 +134,7 @@ public class Phone implements Authorization { ...@@ -134,7 +134,7 @@ public class Phone implements Authorization {
Response response = network.getResponse(params, BasicConfig.PHONE_customerList); Response response = network.getResponse(params, BasicConfig.PHONE_customerList);
int size = response.jsonPath().getInt("data.myCustomerVos.size()"); int size = response.jsonPath().getInt("data.myCustomerVos.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.PHONE_customerList,"客户列表为空",response.body().asString())); Assert.assertTrue(size>0,network.message(params,BasicConfig.PHONE_customerList,"客户列表为空",response.body().asString()));
boolean interviewStatus = response.jsonPath().getBoolean("data.myCustomerVos.find{it.custName == '自动化激活用户'}.interviewStatus"); boolean interviewStatus = response.jsonPath().getBoolean("data.myCustomerVos.find{it.custName == '自动化测试用户'}.interviewStatus");
Assert.assertTrue(interviewStatus,network.message(params,BasicConfig.PHONE_customerList,"客户面访状态错误:非面访中",response.body().asString())); Assert.assertTrue(interviewStatus,network.message(params,BasicConfig.PHONE_customerList,"客户面访状态错误:非面访中",response.body().asString()));
} }
...@@ -286,7 +286,7 @@ public class Phone implements Authorization { ...@@ -286,7 +286,7 @@ public class Phone implements Authorization {
public void 查看我的面访状态更新为审批中(){ public void 查看我的面访状态更新为审批中(){
sleep(1000); sleep(1000);
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
params.put("pageSize", "20"); params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList); Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int size = response.jsonPath().getInt("data.customerInterviewVos.size()"); int size = response.jsonPath().getInt("data.customerInterviewVos.size()");
...@@ -307,7 +307,7 @@ public class Phone implements Authorization { ...@@ -307,7 +307,7 @@ public class Phone implements Authorization {
//查看约面日历 //查看约面日历
otoManagerAuth(); otoManagerAuth();
getCalendarlist(today,5,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,5,"自动化测试用户","勿动-自动化测试邀约");
//查看客户的跟进人 //查看客户的跟进人
HashMap<String,Object> selectParams = new HashMap<String,Object>(); HashMap<String,Object> selectParams = new HashMap<String,Object>();
...@@ -359,7 +359,7 @@ public class Phone implements Authorization { ...@@ -359,7 +359,7 @@ public class Phone implements Authorization {
@Test(description = "查看我的面访状态更新为已失效",priority = 26) @Test(description = "查看我的面访状态更新为已失效",priority = 26)
public void 查看我的面访状态更新为已失效(){ public void 查看我的面访状态更新为已失效(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
params.put("pageSize", "20"); params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList); Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int interviewStatus = response.jsonPath().getInt("data.customerInterviewVos.find{it.id == '"+ interviewIds.get(0) +"'}.interviewStatus"); int interviewStatus = response.jsonPath().getInt("data.customerInterviewVos.find{it.id == '"+ interviewIds.get(0) +"'}.interviewStatus");
...@@ -468,7 +468,7 @@ public class Phone implements Authorization { ...@@ -468,7 +468,7 @@ public class Phone implements Authorization {
@Test(description = "查看我的面访状态更新为已完成",priority =33) @Test(description = "查看我的面访状态更新为已完成",priority =33)
public void 查看我的面访状态更新为已完成(){ public void 查看我的面访状态更新为已完成(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
params.put("pageSize", "20"); params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList); Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int interviewStatus = response.jsonPath().getInt("data.customerInterviewVos.find{it.id == '"+ interviewIds.get(1) +"'}.interviewStatus"); int interviewStatus = response.jsonPath().getInt("data.customerInterviewVos.find{it.id == '"+ interviewIds.get(1) +"'}.interviewStatus");
...@@ -588,7 +588,7 @@ public class Phone implements Authorization { ...@@ -588,7 +588,7 @@ public class Phone implements Authorization {
public void 邀约仅能查看自己创建的面访(){ public void 邀约仅能查看自己创建的面访(){
otoInviterTku(); otoInviterTku();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
params.put("pageSize", "20"); params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList); Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int size = response.jsonPath().getInt("data.customerInterviewVos.size()"); int size = response.jsonPath().getInt("data.customerInterviewVos.size()");
...@@ -609,14 +609,14 @@ public class Phone implements Authorization { ...@@ -609,14 +609,14 @@ public class Phone implements Authorization {
otoEpertTku(); otoEpertTku();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
params.put("pageSize", "20"); params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.PHONE_interviewList); Response response = network.getResponse(params, BasicConfig.PHONE_interviewList);
int size = response.jsonPath().getInt("data.customerInterviewVos.size()"); int size = response.jsonPath().getInt("data.customerInterviewVos.size()");
Assert.assertEquals(size,2,network.message(params,BasicConfig.PHONE_interviewList,"专家面访列表为空",response.body().asString())); Assert.assertEquals(size,2,network.message(params,BasicConfig.PHONE_interviewList,"专家面访列表为空",response.body().asString()));
params.clear(); params.clear();
params.put("custName", "自动化激活用户"); params.put("custName", "自动化测试用户");
params.put("pageSize", "20"); params.put("pageSize", "20");
response = network.getResponse(params, BasicConfig.PHONE_customerList); response = network.getResponse(params, BasicConfig.PHONE_customerList);
int interviewNum = response.jsonPath().getInt("data.myCustomerVos[0].interviewNum"); int interviewNum = response.jsonPath().getInt("data.myCustomerVos[0].interviewNum");
...@@ -647,7 +647,7 @@ public class Phone implements Authorization { ...@@ -647,7 +647,7 @@ public class Phone implements Authorization {
Assert.assertEquals(meetTimeSize,3,network.message(params1,BasicConfig.WORK_detail_v2,"客户的见面次数非3",response.body().asString())); Assert.assertEquals(meetTimeSize,3,network.message(params1,BasicConfig.WORK_detail_v2,"客户的见面次数非3",response.body().asString()));
HashMap<String,Object> params2 = new HashMap<>(); HashMap<String,Object> params2 = new HashMap<>();
params2.put("custName", "自动化激活用户"); params2.put("custName", "自动化测试用户");
params2.put("pageIndex", 1); params2.put("pageIndex", 1);
params2.put("pageSize", 50); params2.put("pageSize", 50);
response = network.getResponse(params2,BasicConfig.WORK_inviterCustList); response = network.getResponse(params2,BasicConfig.WORK_inviterCustList);
......
...@@ -262,23 +262,6 @@ public class Work implements Authorization { ...@@ -262,23 +262,6 @@ 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)
public void 更新客户的头像信息(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("custHead", "//yun.dui88.com/kjy/image/20221021/bd2990ed27174e0389b75c06a9bcae8c.jpg");
Response response = network.postResponse(params,BasicConfig.WORK_updateCustHead);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustHead,"上传客户头像失败",response.body().asString()));
params.clear();
params.put("custId", cust_id);
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)
public void 查看销售的总系数(){ public void 查看销售的总系数(){
Response response =network.getResponse(BasicConfig.WORK_coefficient_detail); Response response =network.getResponse(BasicConfig.WORK_coefficient_detail);
...@@ -472,7 +455,6 @@ public class Work implements Authorization { ...@@ -472,7 +455,6 @@ public class Work implements Authorization {
Assert.assertEquals(age,0,network.message(params,BasicConfig.WORK_header,"年纪更新失败",response.body().asString())); Assert.assertEquals(age,0,network.message(params,BasicConfig.WORK_header,"年纪更新失败",response.body().asString()));
Assert.assertEquals(custAddress,"老的客户住址",network.message(params,BasicConfig.WORK_header,"家庭住址更新失败",response.body().asString())); Assert.assertEquals(custAddress,"老的客户住址",network.message(params,BasicConfig.WORK_header,"家庭住址更新失败",response.body().asString()));
Assert.assertEquals(custGender,1,network.message(params,BasicConfig.WORK_header,"性别更新失败",response.body().asString())); Assert.assertEquals(custGender,1,network.message(params,BasicConfig.WORK_header,"性别更新失败",response.body().asString()));
} }
@Test(description = "修改客户基础信息",priority = 34) @Test(description = "修改客户基础信息",priority = 34)
...@@ -489,12 +471,7 @@ public class Work implements Authorization { ...@@ -489,12 +471,7 @@ public class Work implements Authorization {
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustDescription,"修改客户备注失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustDescription,"修改客户备注失败",response.body().asString()));
params.clear(); headerDeatil(1,"custDescription","客户的备注");
params.put("custId", cust_id);
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) @Test(description = "编辑客户加微状态",priority = 36)
...@@ -506,12 +483,7 @@ public class Work implements Authorization { ...@@ -506,12 +483,7 @@ public class Work implements Authorization {
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateAddWxStatus,"修改客户加微状态失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateAddWxStatus,"修改客户加微状态失败",response.body().asString()));
params.clear(); headerDeatil(1,"addWxStatus","3");
params.put("custId", cust_id);
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) @Test(description = "编辑客户姓名",priority = 37)
...@@ -522,6 +494,8 @@ public class Work implements Authorization { ...@@ -522,6 +494,8 @@ public class Work implements Authorization {
Response response = network.postResponse(params,BasicConfig.WORK_updateCustName); Response response = network.postResponse(params,BasicConfig.WORK_updateCustName);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustName,"修改客户姓名失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateCustName,"修改客户姓名失败",response.body().asString()));
headerDeatil(1,"custName","自动化测试用户");
} }
@Test(description = "创建转介绍客户",priority = 38) @Test(description = "创建转介绍客户",priority = 38)
...@@ -862,12 +836,7 @@ public class Work implements Authorization { ...@@ -862,12 +836,7 @@ public class Work implements Authorization {
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateExpertRemark,"修改专家评价失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateExpertRemark,"修改专家评价失败",response.body().asString()));
params.clear(); headerDeatil(1,"expertRemark","专家的评价");
params.put("custId", cust_id);
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()));
} }
...@@ -914,7 +883,7 @@ public class Work implements Authorization { ...@@ -914,7 +883,7 @@ public class Work implements Authorization {
String custName = response.jsonPath().getString("data.list[0].custName"); String custName = response.jsonPath().getString("data.list[0].custName");
String custFromSourceDesc = response.jsonPath().getString("data.list[0].custFromSourceDesc"); String custFromSourceDesc = response.jsonPath().getString("data.list[0].custFromSourceDesc");
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(custFromSourceDesc,"投放客户-自建落地页-表单",network.message(params,BasicConfig.MANAGER_oto_customerList,"客户来源未更新",response.body().asString())); Assert.assertEquals(custFromSourceDesc,"投放客户-自建落地页-表单",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()));
...@@ -926,12 +895,13 @@ public class Work implements Authorization { ...@@ -926,12 +895,13 @@ public class Work implements Authorization {
@Test(description = "查询认领客户评价不清空",priority = 67) @Test(description = "查询认领客户评价不清空",priority = 67)
public void 查询认领客户评价不清空(){ public void 查询认领客户评价不清空(){
HashMap<String,Object> params = new HashMap<>(); headerDeatil(1,"followWeight","2");
params.put("custId", cust_id); // HashMap<String,Object> params = new HashMap<>();
params.put("type", 1); // params.put("custId", cust_id);
Response response = network.getResponse(params,BasicConfig.WORK_header); // params.put("type", 1);
int followWeight = response.jsonPath().getInt("data.followWeight"); // Response response = network.getResponse(params,BasicConfig.WORK_header);
Assert.assertEquals(followWeight,2,network.message(params,BasicConfig.WORK_header,"客户权重未清空",response.body().asString())); // int followWeight = response.jsonPath().getInt("data.followWeight");
// Assert.assertEquals(followWeight,2,network.message(params,BasicConfig.WORK_header,"客户权重未清空",response.body().asString()));
} }
@Test(description = "查询直播动态",priority = 68) @Test(description = "查询直播动态",priority = 68)
public void 查询直播动态(){ public void 查询直播动态(){
...@@ -1099,4 +1069,12 @@ public class Work implements Authorization { ...@@ -1099,4 +1069,12 @@ public class Work implements Authorization {
} }
public static void headerDeatil(int type,String key,String value){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("type", type);
Response response = network.getResponse(params,BasicConfig.WORK_header);
String result= response.jsonPath().getString("data."+ key);
Assert.assertEquals(result,value,network.message(params,BasicConfig.WORK_header,"客户的"+key+"非"+value,response.body().asString()));
}
} }
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