Commit 3f74516e authored by 龚小红's avatar 龚小红

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

增加一面邀约的接口用例

See merge request !19
parents e7b02d12 b06a4d4a
......@@ -331,6 +331,15 @@ public class Phone implements Authorization {
int interviewStatus = response.jsonPath().getInt("data.customerInterviewVos.find{it.id == '"+ interviewIds.get(0) +"'}.interviewStatus");
Assert.assertEquals(size,1,network.message(params,BasicConfig.PHONE_interviewList,"面访列表为空",response.body().asString()));
Assert.assertEquals(interviewStatus,6,network.message(params,BasicConfig.PHONE_interviewList,"面访状态错误",response.body().asString()));
//销售查看上传记录
otosellerAuth();
params.clear();
params.put("custId",IdMakeUtil.decodingId(cust_id));
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()));
}
@Test(description = "总监查看审批列表",priority = 24)
......
......@@ -2,6 +2,7 @@ package com.oto.cases.otoseller;
import com.oto.cases.admin.Authorization;
import com.oto.config.BasicConfig;
import com.oto.utils.IdMakeUtil;
import com.oto.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
......@@ -19,12 +20,14 @@ public class Work implements Authorization {
private static final NetworkUtils network = NetworkUtils.getInstance();
public int tagId; //标签ID
public int custId; //客户ID
public static String phone = "13705566425"; //客户手机号
public static String phone = "15136361301"; //客户手机号
public int followTimes; //跟进次数
public static Map<String,Integer> header;
public static Map<String,Integer> chart;
public Map<String,Double> coefficient;
public static long sceneId;
public String inviteUrl;//邀请函链接
public int taskId; //任务ID
@BeforeTest
public void setUp(){
......@@ -585,7 +588,167 @@ public class Work implements Authorization {
Assert.assertTrue(answer>0,network.message(params,BasicConfig.MANAGER_oto_customerPhone,"问题详情为空",response.body().asString()));
}
@Test(description = "放弃客户进入回收池",priority = 48)
@Test(description = "查看客户面访状态为尚未约到",priority = 48)
public void 查看客户面访状态为尚未约到(){
getHasFirstInvite(2);
}
@Test(description = "获取客户适用场景",priority = 49)
public void 获取客户适用场景(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
Response response =network.getResponse(params,BasicConfig.WORK_getAllSceneConfs);
int scene = response.jsonPath().getInt("data.findAll{it.id == 378}.size()");
Assert.assertEquals(scene,1 ,network.message(params,BasicConfig.WORK_getAllSceneConfs,"面访场景不包含大清谷参观",response.body().asString()));
}
@Test(description = "修改客户面访承诺时间为1天后",priority = 50)
public void 修改客户面访承诺时间为1天后(){
updateInvite(1,System.currentTimeMillis()+86400000);
getHasFirstInvite(1);
getCallCustInfo(1);
}
@Test(description = "查看确认准客户面访列表",priority = 51)
public void 查看确认准客户面访列表(){
taskList(0,1);
}
@Test(description = "修改客户行程状态为已确认",priority = 52)
public void 修改客户行程状态为已确认(){
HashMap<String,Object> params = new HashMap<>();
params.put("id",taskId);
params.put("inviteStatus",2);
Response response =network.postResponse(params,BasicConfig.WORK_invite_confirm);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data ,network.message(params,BasicConfig.WORK_invite_confirm,"修改客户行程状态为【已确认】失败",response.body().asString()));
taskList(1,2);
getHasFirstInvite(1);
getCallCustInfo(1);
}
@Test(description = "修改客户行程状态为未确认",priority = 53)
public void 修改客户行程状态为未确认(){
HashMap<String,Object> params = new HashMap<>();
params.put("id",taskId);
params.put("inviteStatus",1);
Response response =network.postResponse(params,BasicConfig.WORK_invite_confirm);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data ,network.message(params,BasicConfig.WORK_invite_confirm,"修改客户行程状态为【已确认】失败",response.body().asString()));
taskList(0,1);
getHasFirstInvite(1);
getCallCustInfo(1);
}
@Test(description = "修改客户具体时间客户状态不变",priority = 54)
public void 修改客户具体时间客户状态不变(){
updateInvite(1,System.currentTimeMillis()+86400000+3600000);
taskList(0,1);
getHasFirstInvite(1);
getCallCustInfo(1);
}
@Test(description = "修改客户具体日期客户状态变为已改期",priority = 55)
public void 修改客户具体日期客户状态变为已改期(){
updateInvite(1,System.currentTimeMillis()+86400000*2);
taskList(1,6);
getHasFirstInvite(1);
getCallCustInfo(1);
}
@Test(description = "修改客户未约到客户状态变为已鸽",priority = 56)
public void 修改客户未约到客户状态变为已鸽(){
updateInvite(0,System.currentTimeMillis()+3600000);
taskList(1,3);
getHasFirstInvite(0);
getCallCustInfo(0);
}
@Test(description = "修改客户已约到客户状态变为未确认",priority =58)
public void 修改客户已约到客户状态变为未确认(){
updateInvite(1,System.currentTimeMillis()+3600000);
taskList(0,1);
getHasFirstInvite(1);
getCallCustInfo(1);
}
@Test(description = "查询客户的面访上传记录<1",priority = 59)
public void 查询客户的面访上传记录(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
Response response =network.getResponse(params,BasicConfig.WORK_invire);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertFalse(data ,network.message(params,BasicConfig.WORK_invire,"上传面访记录>=1",response.body().asString()));
}
@Test(description = "生成加微邀请函二维码",priority = 60)
public void 生成加微邀请函二维码(){
HashMap<String,Object> params = new HashMap<>();
params.put("content",inviteUrl);
params.put("height",209);
params.put("width",209);
Response response =network.postResponse(params,BasicConfig.WORK_generate);
String data = response.jsonPath().getString("data");
Assert.assertNotNull(data ,network.message(params,BasicConfig.WORK_generate,"二维码生成失败",response.body().asString()));
}
@Test(description = "查看邀请函客户信息",priority = 61)
public void 查看邀请函客户信息(){
agent2Tku();
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.encodingId((long)custId));
Response response =network.postResponse(params,BasicConfig.WX_look);
String visitDate = response.jsonPath().getString("data.visitDate");
int visitorNum = response.jsonPath().getInt("data.visitorNum");
boolean confirmFlag = response.jsonPath().getBoolean("data.confirmFlag");
Assert.assertNotNull(visitDate ,network.message(params,BasicConfig.WX_look,"约面状态未更新为【已约到】",response.body().asString()));
Assert.assertEquals(visitorNum ,10,network.message(params,BasicConfig.WX_look,"约面状态未更新为【已约到】",response.body().asString()));
Assert.assertFalse(confirmFlag ,network.message(params,BasicConfig.WX_look,"约面状态未更新为【已约到】",response.body().asString()));
}
@Test(description = "客户确认邀请函",priority = 62)
public void 客户确认邀请函(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.encodingId((long)custId));
Response response =network.postResponse(params, WX_confirm);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data ,network.message(params,BasicConfig.WX_confirm,"客户确认邀请函失败",response.body().asString()));
params.clear();
params.put("custId",custId);
response =network.getResponse(params,BasicConfig.WORK_getHasFirstInvite);
boolean haveMealFlag = response.jsonPath().getBoolean("data.haveMealFlag");
String interviewTime = response.jsonPath().getString("data.interviewTime");
Assert.assertTrue(haveMealFlag ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"约面状态未更新为【已约到】",response.body().asString()));
Assert.assertNotNull(interviewTime ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"面访承诺时间不为空",response.body().asString()));
taskList(1,1);
}
@Test(description = "邀约组拨打电话回填面访信息正常",priority = 63)
public void 邀约组拨打电话回填面访信息正常(){
getCallCustInfo(1);
getHasFirstInvite(1);
//取消日程
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
Response response =network.postResponse(params,BasicConfig.WORK_cancelSchedule);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(BasicConfig.WORK_cancelSchedule,"取消日程失败",response.body().asString()));
}
@Test(description = "放弃客户进入回收池",priority = 64)
public void 放弃客户进入回收池(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
......@@ -608,14 +771,14 @@ public class Work implements Authorization {
}
@Test(description = "查询投放池刷新配置",priority = 49)
@Test(description = "查询投放池刷新配置",priority = 65)
public void 查询投放池刷新配置(){
Response response = network.getResponse(BasicConfig.WORK_leadsConfig);
int dayAssignLimit = response.jsonPath().getInt("data.dayAssignLimit");
Assert.assertNotNull(dayAssignLimit,network.message(BasicConfig.WORK_leadsConfig,"查询投放池刷新配置失败",response.body().asString()));
}
@Test(description = "查看投放池客户列表",priority = 50)
@Test(description = "查看投放池客户列表",priority = 66)
public void 查看投放池客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
......@@ -625,7 +788,7 @@ public class Work implements Authorization {
Assert.assertNotNull(list,network.message(params,BasicConfig.WORK_freshList,"查看投放池客户不为空",response.body().asString()));
}
@Test(description = "查看回收池客户列表",priority = 51)
@Test(description = "查看回收池客户列表",priority = 67)
public void 查看回收池客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
......@@ -637,7 +800,7 @@ public class Work implements Authorization {
Assert.assertEquals(result,1,network.message(params,BasicConfig.WORK_recycleList,"回收池客户列表不包含刚刚的回收客户",response.body().asString()));
}
@Test(description = "认领回收池客户",priority = 52)
@Test(description = "认领回收池客户",priority = 68)
public void 认领回收池客户(){
sleep(2000);
HashMap<String,Object> params = new HashMap<>();
......@@ -652,7 +815,7 @@ public class Work implements Authorization {
Assert.assertEquals(totalCoefficient,coefficient.get("totalCoefficient"),network.message(BasicConfig.WORK_coefficient_detail,"放弃客户销售总系数变化",response.body().asString()));
}
@Test(description = "认领回收池客户总数更新",priority = 53)
@Test(description = "认领回收池客户总数更新",priority = 69)
public void 认领回收池客户总数更新(){
sleep(1000);
Response response = network.getResponse(BasicConfig.WORK_staticHeader);
......@@ -661,7 +824,12 @@ public class Work implements Authorization {
Assert.assertEquals(totalNum, num,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString()));
}
@Test(description = "查询认领客户评价清空",priority = 54)
@Test(description = "带看组回显邀约信息",priority = 70)
public void 带看组回显邀约信息(){
getHasFirstInvite(1);
}
@Test(description = "查询认领客户评价清空",priority = 71)
public void 查询认领客户评价清空(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
......@@ -672,7 +840,7 @@ public class Work implements Authorization {
Assert.assertNull(followWeight,network.message(params,BasicConfig.WORK_header,"客户权重未清空",response.body().asString()));
}
@Test(description = "总监查看名下销售列表",priority = 55)
@Test(description = "总监查看名下销售列表",priority = 72)
public void 总监查看名下销售列表(){
otoLeaderAuth();
HashMap<String,Object> params = new HashMap<>();
......@@ -683,7 +851,7 @@ public class Work implements Authorization {
Assert.assertEquals(size,1,network.message(params,BasicConfig.WORK_attendanceList,"总监名下销售列表为空",response.body().asString()));
}
@Test(description = "总监修改名下销售工作状态",priority = 56)
@Test(description = "总监修改名下销售工作状态",priority = 73)
public void 总监修改名下销售工作状态(){
HashMap<String,Object> params = new HashMap<>();
params.put("sellerId", SELLER_ID);
......@@ -693,7 +861,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(BasicConfig.WORK_logout,"总监修改名下销售工作状态失败",response.body().asString()));
}
@Test(description = "总监修改非名下销售工作状态",priority = 57)
@Test(description = "总监修改非名下销售工作状态",priority = 74)
public void 总监修改非名下销售工作状态(){
HashMap<String,Object> params = new HashMap<>();
params.put("sellerId", 1);
......@@ -703,7 +871,7 @@ public class Work implements Authorization {
Assert.assertFalse(success,network.message(BasicConfig.WORK_logout,"总监修改非名下销售工作状态成功",response.body().asString()));
}
@Test(description = "销售间客户动态取消隔离",priority = 58)
@Test(description = "销售间客户动态取消隔离",priority = 75)
public void 销售间客户动态取消隔离(){
//将客户重新分配给总监
HashMap<String,Object> params = new HashMap<>();
......@@ -728,7 +896,7 @@ public class Work implements Authorization {
response = network.postResponse(params,BasicConfig.MANAGER_oto_assignSeller);
}
@Test(description = "关闭总监的新客户认领权限和回收客户认领权限",priority = 59)
@Test(description = "关闭总监的新客户认领权限和回收客户认领权限",priority = 76)
public void 关闭总监的新客户认领权限和回收客户认领权限(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", LEADER_ID);
......@@ -742,7 +910,7 @@ public class Work implements Authorization {
Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"关闭总监的新客户认领权限和回收客户认领权限失败",response.body().asString()));
}
@Test(description = "无新客户认领权限不可查看新客户列表",priority = 60)
@Test(description = "无新客户认领权限不可查看新客户列表",priority = 77)
public void 无新客户认领权限不可查看新客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
......@@ -752,7 +920,7 @@ public class Work implements Authorization {
Assert.assertFalse(success,network.message(BasicConfig.WORK_freshList,"无新客户认领权限可查看新客户列表",response.body().asString()));
}
@Test(description = "无查看微信权限不可查看客户号码",priority = 60)
@Test(description = "无查看微信权限不可查看客户号码",priority = 78)
public void 无查看微信权限不可查看客户号码(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
......@@ -761,7 +929,7 @@ public class Work implements Authorization {
Assert.assertFalse(success,network.message(BasicConfig.WORK_phone,"无查看微信权限可查看客户号码",response.body().asString()));
}
@Test(description = "无回收客户认领权限不可查看回收客户列表",priority = 61)
@Test(description = "无回收客户认领权限不可查看回收客户列表",priority = 79)
public void 无回收客户认领权限不可查看回收客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
......@@ -771,7 +939,7 @@ public class Work implements Authorization {
Assert.assertFalse(success,network.message(BasicConfig.WORK_logout,"无回收客户认领权限可查看回收客户列表",response.body().asString()));
}
@Test(description = "开启总监的新客户认领权限和回收客户认领权限",priority = 62)
@Test(description = "开启总监的新客户认领权限和回收客户认领权限",priority = 80)
public void 开启总监的新客户认领权限和回收客户认领权限(){
HashMap<String,Object> params = new HashMap<>();
params.put("id", LEADER_ID);
......@@ -786,7 +954,7 @@ public class Work implements Authorization {
}
@Test(description = "新建日程",priority = 63)
@Test(description = "新建日程",priority = 81)
public void 新建日程(){
//获取日程提醒数量
Response listRes = network.getResponse(BasicConfig.WORK_notifyList);
......@@ -807,7 +975,7 @@ public class Work implements Authorization {
Assert.assertTrue(size<size2,network.message(BasicConfig.WORK_notifyList,"日程通知未展示新建日程",listRes.body().asString()));
}
@Test(description = "取消日程",priority = 64)
@Test(description = "取消日程",priority = 82)
public void 取消日程(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
......@@ -816,7 +984,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(BasicConfig.WORK_cancelSchedule,"取消日程失败",response.body().asString()));
}
@Test(description = "普通销售不可查看审批管理",priority = 65)
@Test(description = "普通销售不可查看审批管理",priority =83)
public void 普通销售不可查看审批管理(){
otosellerAuth();
HashMap<String,Object> params = new HashMap<>();
......@@ -827,7 +995,7 @@ public class Work implements Authorization {
Assert.assertEquals(size,0,network.message(BasicConfig.WORK_interviewAuditList,"查看审批列表不为空",response.body().asString()));
}
@Test(description ="获取任务管理列表",priority = 66)
@Test(description ="获取任务管理列表",priority = 84)
public void 获取任务管理列表(){
otoManagerAuth();
Response response = network.getResponse(BasicConfig.WORK_taskConfList);
......@@ -835,7 +1003,7 @@ public class Work implements Authorization {
Assert.assertTrue(size==4,network.message(BasicConfig.WORK_taskConfList,"获取任务配置数量错误",response.body().asString()));
}
@Test(description = "修改任务配置",priority = 67)
@Test(description = "修改任务配置",priority = 85)
public void 修改任务配置(){
HashMap<String,Object> params = new HashMap<>();
List list = new ArrayList();
......@@ -871,7 +1039,7 @@ public class Work implements Authorization {
Assert.assertTrue(acqData,network.message(params,BasicConfig.WORK_modifyTaskConf,"修改任务失败",acqRes.body().asString()));
}
@Test(description = "客户总览_销售查看任务",priority = 68)
@Test(description = "客户总览_销售查看任务",priority = 86)
public void 销售查看任务(){
otosellerAuth();
sleep(2000);
......@@ -881,7 +1049,7 @@ public class Work implements Authorization {
Assert.assertEquals(finishCustNum,0,network.message(BasicConfig.WORK_statisticHeader,"销售任务统计错误",response.body().asString()));
}
@Test(description = "查看联系新客户任务明细",priority = 69)
@Test(description = "查看联系新客户任务明细",priority = 87)
public void 查看联系新客户任务明细(){
HashMap<String,Object> params = new HashMap<>();
params.put("taskConfId",4); //任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
......@@ -894,7 +1062,7 @@ public class Work implements Authorization {
Assert.assertTrue(listSize>0,network.message(params,BasicConfig.WORK_taskDetailsList,"待完成客户数统计错误",response.body().asString()));
}
@Test(description = "查看我的预约订单列表",priority = 70)
@Test(description = "查看我的预约订单列表",priority = 88)
public void 查看我的预约订单列表(){
agent2Tku();
HashMap<String,Object> params = new HashMap<>();
......@@ -908,7 +1076,7 @@ public class Work implements Authorization {
Assert.assertEquals(bookingStatus,0,network.message(BasicConfig.PHONE_getReservationList,"预约状态错误:非待参观",response.body().asString()));
}
@Test(description = "新增见面场景",priority = 71)
@Test(description = "新增见面场景",priority = 89)
public void 新增见面场景(){
otoManagerAuth();
int companyIds[] = {1,5};
......@@ -925,7 +1093,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"新增见面场景失败",response.body().asString()));
}
@Test(description = "查看见面场景列表",priority = 72)
@Test(description = "查看见面场景列表",priority = 90)
public void 查看见面场景列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex",1);
......@@ -941,7 +1109,7 @@ public class Work implements Authorization {
sceneId = response.jsonPath().getLong("data.list[0].id");
}
@Test(description = "修改见面场景",priority = 73)
@Test(description = "修改见面场景",priority = 91)
public void 修改见面场景(){
int companyIds[] ={5};
int custFlows[] = {1,2,3,4,5};
......@@ -958,7 +1126,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_custConfSave,"修改自动化场景失败",response.body().asString()));
}
@Test(description = "关闭见面场景状态",priority = 74)
@Test(description = "关闭见面场景状态",priority = 92)
public void 关闭见面场景状态(){
HashMap<String,Object> params = new HashMap<>();
params.put("id",sceneId);
......@@ -968,7 +1136,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.PHONE_updateStatus,"关闭见面场景失败",response.body().asString()));
}
@Test(description = "修改客户的产品组",priority = 75)
@Test(description = "修改客户的产品组",priority = 93)
public void 修改客户产品组(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
......@@ -978,7 +1146,7 @@ public class Work implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.MANAGER_customer_update,"修改客户的产品组失败",response.body().asString()));
}
@Test(description = "查询所有产品列表",priority = 76)
@Test(description = "查询所有产品列表",priority = 94)
public void 查询所有产品列表(){
Response response =network.getResponse(BasicConfig.MANAGER_product_listAll);
int size = response.jsonPath().getInt("data.list.size()");
......@@ -986,6 +1154,94 @@ public class Work implements Authorization {
}
//修改客户的约面情况
public void updateInvite(int interviewFlag,long time){
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
params.put("eventType",2);
params.put("firstInterviewFlag",interviewFlag);
if(interviewFlag == 1){ //1为已约到需要填写时间地点
params.put("interviewConfId",378);
params.put("interviewTime",time);
params.put("haveMealFlag",1);
params.put("pickTakeFlag",1);
params.put("custNum",10);
params.put("pickTakeAddress","杭州数字娱乐大厦");
}else{ //0表示未约到
params.put("nextContactTime",time);
}
Response response =network.postResponse(params,BasicConfig.WORK_invite_submit);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data ,network.message(params,BasicConfig.WORK_invite_submit,"修改客户面访失败",response.body().asString()));
}
//确认准客户面访任务列表
public void taskList(int finish,int status){
sleep(1000);
HashMap<String,Object> params = new HashMap<>();
params.put("taskConfId",7);
Response response =network.getResponse(params,BasicConfig.WORK_invitation_list);
int goalCount = response.jsonPath().getInt("data.goalCount");
int finishCustNum = response.jsonPath().getInt("data.finishCustNum");
int size = response.jsonPath().getInt("data.list.size()");
int inviteStatus = response.jsonPath().getInt("data.list[0].inviteStatus");
Assert.assertEquals(goalCount,1 ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的目标数量不为1",response.body().asString()));
Assert.assertEquals(finishCustNum,finish ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的完成数量不为"+finish,response.body().asString()));
Assert.assertEquals(size,1 ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的客户数量不为1",response.body().asString()));
Assert.assertEquals(inviteStatus,status ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的客户数量不为"+status,response.body().asString()));
taskId = response.jsonPath().getInt("data.list[0].id");
}
public void getCallCustInfo(int interviewFlag){
sleep(1000);
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response =network.getResponse(params,BasicConfig.WORK_getCallCustInfo);
int firstInterviewFlag = response.jsonPath().getInt("data.firstInterviewFlag");
Assert.assertEquals(firstInterviewFlag ,interviewFlag ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态回显非"+"",response.body().asString()));
if(interviewFlag == 1){
String interviewTime = response.jsonPath().getString("data.interviewTime");
Assert.assertNotNull(interviewTime ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态未更新为【已约到】",response.body().asString()));
}else {
String nextContactTime = response.jsonPath().getString("data.nextContactTime");
Assert.assertNotNull(nextContactTime ,network.message(params,BasicConfig.WORK_getCallCustInfo,"约面状态未更新为【已约到】",response.body().asString()));
}
}
public void getHasFirstInvite(int interviewFlag){
sleep(1000);
HashMap<String,Object> params = new HashMap<>();
params.put("custId",custId);
Response response =network.getResponse(params,BasicConfig.WORK_getHasFirstInvite);
if(interviewFlag == 1){
int firstInterviewFlag = response.jsonPath().getInt("data.firstInterviewFlag");
String interviewTime = response.jsonPath().getString("data.interviewTime");
inviteUrl = response.jsonPath().getString("data.invLetterUrl");
Assert.assertEquals(firstInterviewFlag ,interviewFlag ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"约面状态回显非"+"",response.body().asString()));
Assert.assertNotNull(interviewTime ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"面访承诺时间为空",response.body().asString()));
Assert.assertNotNull(inviteUrl ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"邀请函链接为空",response.body().asString()));
}else if(interviewFlag == 0){
int firstInterviewFlag = response.jsonPath().getInt("data.firstInterviewFlag");
String interviewTime = response.jsonPath().getString("data.interviewTime");
String nextContactTime = response.jsonPath().getString("data.nextContactTime");
String invLetterUrl = response.jsonPath().getString("data.invLetterUrl");
Assert.assertEquals(firstInterviewFlag ,interviewFlag ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"约面状态回显非"+"",response.body().asString()));
Assert.assertNull(interviewTime ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"面访承诺时间不为空",response.body().asString()));
Assert.assertNotNull(nextContactTime ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"下次联系时间为空",response.body().asString()));
Assert.assertNull(invLetterUrl ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"邀请函链接不为空",response.body().asString()));
} else
{
String firstInterviewFlag = response.jsonPath().getString("data.firstInterviewFlag");
String interviewTime = response.jsonPath().getString("data.interviewTime");
String nextContactTime = response.jsonPath().getString("data.nextContactTime");
String invLetterUrl = response.jsonPath().getString("data.invLetterUrl");
Assert.assertNull(firstInterviewFlag ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"约面状态回显非"+"",response.body().asString()));
Assert.assertNull(interviewTime ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"面访承诺时间不为空",response.body().asString()));
Assert.assertNull(nextContactTime ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"下次联系时间不为空",response.body().asString()));
Assert.assertNull(invLetterUrl ,network.message(params,BasicConfig.WORK_getHasFirstInvite,"邀请函链接不为空",response.body().asString()));
}
}
}
......@@ -163,6 +163,20 @@ public class BasicConfig {
public static final String WORK_coefficient_detail= WORK_HOST + "/kjy/oto/manager/customer/coefficient/detail";
public static final String WORK_customer_detail= WORK_HOST + "/kjy/oto/manager/customer/claimDetail";
public static final String WORK_customer_claim= WORK_HOST +"/kjy/oto/manager/customer/claim";
public static final String WORK_getHasFirstInvite= WORK_HOST + "/kjy/oto/manager/customer/getHasFirstInvite";
public static final String WORK_getAllSceneConfs= WORK_HOST + "/kjy/oto/manager/customer/call/getAllSceneConfs";
public static final String WORK_invite_submit= WORK_HOST + "/kjy/oto/manager/customer/call/cust/invite/submit";
public static final String WORK_invitation_list= WORK_HOST + "/kjy/oto/manager/customer/invitation/list";
public static final String WORK_invite_confirm= WORK_HOST + "/kjy/oto/manager/customer/invite/confirm";
public static final String WORK_invire= WORK_HOST + "/kjy/oto/customer/invire/record/list";
public static final String WORK_generate= WORK_HOST + "/kjy/oto/manager/qrcode/generate";
public static final String WORK_getCallCustInfo= WORK_HOST + "/kjy/oto/manager/customer/call/getCallCustInfo";
//*************************客集集营销平台******************************
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
public static final String PHONE_submitEvaluate = HOST + "/kjy/oto/interview/submitEvaluate";
public static final String WX_look= HOST + "/kjy/mp/oto/risk/invLetter/look";
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";
......@@ -188,8 +202,6 @@ public class BasicConfig {
public static final String PHONE_custExtDetail = PHONE_HOST + "/kjy/oto/interview/custExtDetail";
public static final String PHONE_interviewFeedback = PHONE_HOST + "/kjy/oto/interview/feedback";
public static final String PHONE_interviewDetail = PHONE_HOST + "/kjy/oto/interview/edit/detail";
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
public static final String PHONE_submitEvaluate = HOST + "/kjy/oto/interview/submitEvaluate";
public static final String PHONE_listBysellComp = PHONE_HOST + "/kjy/oto/manager/customer/listBysellComp";
public static final String PHONE_address = PHONE_HOST + "/kjy/oto/h5/v1/save/address";
public static final String PHONE_getUnusualTypes = PHONE_HOST + "/kjy/oto/h5/v1/getUnusualTypes";
......
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