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

Merge branch 'Feature/kycScheme' into 'master'

Feature/kyc scheme

See merge request !75
parents b2a785e6 a2e74249
...@@ -15,47 +15,47 @@ public interface Authorization { ...@@ -15,47 +15,47 @@ public interface Authorization {
//oto销售工作台-邀约 //oto销售工作台-邀约
default void otoInviterAuth() { default void otoInviterAuth() {
network.agentCookies.put("otoToken", "2vXGWopQHdBw2ifGx4KaGu3oDuCNeQkrq11MV7YDzQetPhb7yMBLLCD5FKnzJQEZzX7jf"); network.agentCookies.put("otoToken", "2vXGWopQHdBw2ifGx4KaGu3oGwruawqbVaPTWaSvzVXDhEbtDMVg6Y73PgyWCoRqEbAVW");
} }
//oto销售工作台-总监 //oto销售工作台-总监
default void otoLeaderAuth() { default void otoLeaderAuth() {
network.agentCookies.put("otoToken", "2vXGWopQHdBw2ifGx4KaGu3oDuCNeQeNWCTY6pbw6dgTowRdyB9yx2vH9Ms1s2ZytDfvx"); network.agentCookies.put("otoToken", "2vXGWopQHdBw2ifGx4KaGu3oGwruawqbUrhodscqs9qejuqga4ou2yMiXFZGdWrLVc3Mw");
} }
//oto销售工作台-管理员 //oto销售工作台-管理员
default void otoManagerAuth() { default void otoManagerAuth() {
network.agentCookies.put("otoToken", "2vXGWopQHdBw2ifGx4KaGu3oDuCNeQoDwhdxY78o9v7UciHLhaX3DFVMwLQ4Uf2qhY43R"); network.agentCookies.put("otoToken", "2vXGWopQHdBw2ifGx4KaGu3oGwruawqbUgv4FHxyLwXK7faKmz1mfC2L9P9ygTdYt4nf7");
} }
//oto销售工作台-备用邀约 //oto销售工作台-备用邀约
default void otoInviterAuth2() { default void otoInviterAuth2() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNVjwh6sB2NhFTCLqa73T6ydgm2vDRuM3giYDdvUr21HgWYq"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3PVp7AUefDS6XLWZkTgnAcFKES52c6S2yEjUBnB3A");
} }
//oto销售工作台-带看销售 //oto销售工作台-带看销售
default void otoTakerAuth() { default void otoTakerAuth() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvEnnavAmCTRjviosF96LJpxnM56edCVyxitFFHA3dGsMCRba"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3yTUdzNq7jona9UPk2YKpGAEorzUNzkuJzg5e67mU");
} }
//oto销售工作台-专家 //oto销售工作台-专家
default void otoExpertAuth() { default void otoExpertAuth() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvEnnavAmn1XJJP5h7NK6dZxn7af14AMnwtdM7XYhZYmJQjoB"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3yvHhYdQzSRouz7mdzwUGKurBup1t66zc9HCnNnoV");
} }
//oto销售工作台-内勤 //oto销售工作台-内勤
default void otoAssistAuth() { default void otoAssistAuth() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNVjQg7ddk4UAPJduNEEUBStfPsn3BPxEccQaD8WUiVzNx3y"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3PQBzFLHr5xKiF5vn787yqGVtpnUo4yWayLgSj8AE");
} }
//oto销售工作台-区域总 //oto销售工作台-区域总
default void otoAreaAuth() { default void otoAreaAuth() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNVjQg7ddmpT5XefzaPg6vb8wgK44s4orSoDKaA23DggJTVf"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3PUL8QvscAYKpFE3LbMY7HBz8KdmcPKZ7G8XebPFR");
} }
//oto销售工作台-PM //oto销售工作台-PM
default void otoPMAuth() { default void otoPMAuth() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNVjQg7ddoq9MJVFKvYaVp1z9n134RNirRVwZYqTQL6PLSVv"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3cVdcpuYrJL6cAszqvnhjut1r1J2h5fBPPiVwGygx");
} }
//久久保管理员-正常权限模式 //久久保管理员-正常权限模式
default void jjbManagerAuth() { default void jjbManagerAuth() {
......
...@@ -21,8 +21,9 @@ import static com.oto.utils.ThreadSleepUtils.sleep; ...@@ -21,8 +21,9 @@ import static com.oto.utils.ThreadSleepUtils.sleep;
public class CheckTask implements Authorization { public class CheckTask implements Authorization {
private static final NetworkUtils network = NetworkUtils.getInstance(); private static final NetworkUtils network = NetworkUtils.getInstance();
public String wxUserKey; //外部联系人ID策略 public String wxUserKey; //外部联系人ID
public static String planIds; //计划ids public static String planIds; //计划ids
public static int kycId; //kycID
public static String beginTime; //周一日期 public static String beginTime; //周一日期
public static int tomorrowWeek; //明日周几 public static int tomorrowWeek; //明日周几
public int strategyId; //盘点策略ID public int strategyId; //盘点策略ID
...@@ -112,35 +113,6 @@ public class CheckTask implements Authorization { ...@@ -112,35 +113,6 @@ public class CheckTask implements Authorization {
Assert.assertEquals(custStar,1,network.message(params,BasicConfig.WORK_header,"标记客户星标失败",response.body().asString())); Assert.assertEquals(custStar,1,network.message(params,BasicConfig.WORK_header,"标记客户星标失败",response.body().asString()));
} }
@Test(description = "上传KYC",priority = 7)
public void 上传KYC(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("kycImages", new String[]{"//yun.dui88.com/kjy/image/20230113/523669708b5043f5bb4641252e125cb5.jpg","//yun.dui88.com/kjy/image/20230113/edd2e950a8aa4fb2a15ae7400b768fed.jpg"});
Response response = network.postResponse(params,BasicConfig.WORK_kycUpload);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_kycUpload,"上传KYC失败",response.body().asString()));
}
@Test(description = "上传客户方案",priority = 8)
public void 上传客户方案(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("planFiles",new String[]{"//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc","//yun.dui88.com/kjy/media/file/20230131/20230131111229/4.ppt"} );
Response response = network.postResponse(params,BasicConfig.WORK_planFileUpload);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_planFileUpload,"上传客户方案失败",response.body().asString()));
params.clear();
params.put("custId", cust_id);
params.put("type", 2);
response = network.getResponse(params,BasicConfig.WORK_header);
int kycImages= response.jsonPath().getInt("data.kycImages.size()");
int planFiles= response.jsonPath().getInt("data.planFiles.size()");
Assert.assertEquals(kycImages,2,network.message(params,BasicConfig.WORK_header,"上传KYC为空",response.body().asString()));
Assert.assertEquals(planFiles,2,network.message(params,BasicConfig.WORK_header,"上传客户方案为空",response.body().asString()));
}
@Test(description = "特定销售可见团队",priority = 9) @Test(description = "特定销售可见团队",priority = 9)
public void 特定销售可见团队(){ public void 特定销售可见团队(){
otoManagerAuth(); otoManagerAuth();
...@@ -400,10 +372,10 @@ public class CheckTask implements Authorization { ...@@ -400,10 +372,10 @@ 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_updateAddWxStatus,"转介绍客户的介绍人错误",response.body().asString())); Assert.assertEquals(introducer,"自动化激活用户",network.message(params,BasicConfig.WORK_header,"转介绍客户的介绍人错误",response.body().asString()));
Assert.assertNull(inviteName,network.message(params,BasicConfig.WORK_updateAddWxStatus,"转介绍客户的当前邀约与介绍人不一致",response.body().asString())); Assert.assertNull(inviteName,network.message(params,BasicConfig.WORK_header,"转介绍客户的当前邀约与介绍人不一致",response.body().asString()));
Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_updateAddWxStatus,"转介绍客户的当前销售与介绍人不一致",response.body().asString())); Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.WORK_header,"转介绍客户的当前销售与介绍人不一致",response.body().asString()));
Assert.assertEquals(sellerName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_updateAddWxStatus,"转介绍客户的当前专家与介绍人不一致",response.body().asString())); Assert.assertEquals(sellerName,"勿动-自动化测试带看",network.message(params,BasicConfig.WORK_header,"转介绍客户的当前专家与介绍人不一致",response.body().asString()));
} }
...@@ -604,6 +576,106 @@ public class CheckTask implements Authorization { ...@@ -604,6 +576,106 @@ public class CheckTask implements Authorization {
Assert.assertEquals(size,5,network.message(params,BasicConfig.WORK_getPlanList,"总计划数量错误",response.body().asString())); Assert.assertEquals(size,5,network.message(params,BasicConfig.WORK_getPlanList,"总计划数量错误",response.body().asString()));
} }
@Test(description = "查看新客户的方案进展模块",priority = 50)
public void 查看新客户的方案进展模块(){
getSchemeNum(0,0,0,null);
}
@Test(description = "上传KYC",priority = 51)
public void 上传KYC(){
//仅管理员/PM/内勤可上传kyc
otoManagerAuth();
saveKyc(true);
otoPMAuth();
saveKyc(true);
otoAssistAuth();
saveKyc(true);
//其他角色不可上传kyc
otoInviterAuth();
saveKyc(false);
otoTakerAuth();
saveKyc(false);
otoExpertAuth();
saveKyc(false);
otoLeaderAuth();
saveKyc(false);
otoAreaAuth();
saveKyc(false);
sleep(1000);
getSchemeNum(3,0,0,null);
}
@Test(description = "上传客户方案",priority = 52)
public void 上传客户方案(){
//仅管理员/PM可上传方案
otoManagerAuth();
savePlanFile(true);
otoPMAuth();
savePlanFile(true);
//其他角色不可上传方案
otoAssistAuth();
savePlanFile(false);
otoInviterAuth();
savePlanFile(false);
otoTakerAuth();
savePlanFile(false);
otoExpertAuth();
savePlanFile(false);
otoLeaderAuth();
savePlanFile(false);
otoAreaAuth();
savePlanFile(false);
sleep(1000);
getSchemeNum(3,2,0,null);
}
@Test(description = "查看kyc和方案上传历史列表",priority = 53)
public void 查看kyc和方案上传历史列表(){
//查看kys上传历史
getSchemeList(1,3,null);
//查看方案上传历史
getSchemeList(2,2,null);
//查看方案讲解历史
getSchemeList(3,0,null);
}
@Test(description = "标记KYC合格状态",priority = 54)
public void 标记KYC合格状态(){
//仅管理员/PM可标记kyc
otoManagerAuth();
qualifiedKyc(1,true);
sleep(1000);
getSchemeNum(3,3,0,1);
getSchemeList(1,3,1);
otoPMAuth();
qualifiedKyc(0,true);
sleep(1000);
getSchemeNum(3,3,0,0);
getSchemeList(1,3,0);
//其他角色不可标记kyc
otoAssistAuth();
qualifiedKyc(1,false);
otoInviterAuth();
qualifiedKyc(1,false);
otoTakerAuth();
qualifiedKyc(1,false);
otoExpertAuth();
qualifiedKyc(1,false);
otoLeaderAuth();
qualifiedKyc(1,false);
otoAreaAuth();
qualifiedKyc(1,false);
}
//获取销售个人工作计划 //获取销售个人工作计划
public static void getSellerPlan(int amFinish,int amTotal,int pmFinish,int pmTotal,int pStatus,int unFinishTypes){ public static void getSellerPlan(int amFinish,int amTotal,int pmFinish,int pmTotal,int pStatus,int unFinishTypes){
HashMap<String, Object> params = new HashMap<>(); HashMap<String, Object> params = new HashMap<>();
...@@ -636,4 +708,84 @@ public class CheckTask implements Authorization { ...@@ -636,4 +708,84 @@ public class CheckTask implements Authorization {
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,count,network.message(params,BasicConfig.WORK_check_sellerList,"结果列表错误",response.body().asString())); Assert.assertEquals(size,count,network.message(params,BasicConfig.WORK_check_sellerList,"结果列表错误",response.body().asString()));
} }
public void saveKyc(boolean result){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("kycImages", new String[]{"//yun.dui88.com/kjy/image/20230113/523669708b5043f5bb4641252e125cb5.jpg","//yun.dui88.com/kjy/image/20230113/edd2e950a8aa4fb2a15ae7400b768fed.jpg"});
Response response = network.postResponse(params,BasicConfig.WORK_scheme_saveKyc);
if(result) {
boolean data = response.jsonPath().getBoolean("data");
Assert.assertEquals(data, result, network.message(params, BasicConfig.WORK_scheme_saveKyc, "上传KYC结果非" + result, response.body().asString()));
}else{
boolean success = response.jsonPath().getBoolean("success");
Assert.assertEquals(success, result, network.message(params, BasicConfig.WORK_scheme_saveKyc, "上传KYC结果非" + result, response.body().asString()));
}
}
public void savePlanFile(boolean result){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("planFiles",new String[]{"//yun.dui88.com/kjy/media/file/20230113/20230113145555/1.doc","//yun.dui88.com/kjy/media/file/20230131/20230131111229/4.ppt"} );
Response response = network.postResponse(params,BasicConfig.WORK_scheme_savePlanFile);
if(result) {
boolean data = response.jsonPath().getBoolean("data");
Assert.assertEquals(data, result, network.message(params, BasicConfig.WORK_scheme_savePlanFile, "上传方案结果非" + result, response.body().asString()));
}else{
boolean success = response.jsonPath().getBoolean("success");
Assert.assertEquals(success, result, network.message(params, BasicConfig.WORK_scheme_savePlanFile, "上传方案结果非" + result, response.body().asString()));
}
}
public void qualifiedKyc(int isQualified,boolean result){
HashMap<String,Object> params = new HashMap<>();
params.put("id", kycId);
params.put("isQualified",isQualified); // 0不合格 1合格
Response response = network.postResponse(params,BasicConfig.WORK_scheme_qualified);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertEquals(data,result,network.message(params,BasicConfig.WORK_scheme_qualified,"标记KYC结果非"+result,response.body().asString()));
}
public static void getSchemeNum(int kycNum,int schemeNum,int commitPlanNum,Integer hasQualifiedKyc){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
Response response = network.getResponse(params,BasicConfig.WORK_scheme_getNum);
int kyc = response.jsonPath().getInt("data.kycNum");
int scheme = response.jsonPath().getInt("data.schemeNum");
int commitPlan = response.jsonPath().getInt("data.commitPlanNum");
Assert.assertEquals(kyc,kycNum,network.message(params,BasicConfig.WORK_scheme_getNum,"上传KYC次数非"+kycNum,response.body().asString()));
Assert.assertEquals(scheme,schemeNum,network.message(params,BasicConfig.WORK_scheme_getNum,"上传方案次数非"+schemeNum,response.body().asString()));
Assert.assertEquals(commitPlan,commitPlanNum,network.message(params,BasicConfig.WORK_scheme_getNum,"讲解方案次数非"+commitPlanNum,response.body().asString()));
if (hasQualifiedKyc == null) {
Object QualifiedKyc = response.jsonPath().getJsonObject("data.hasQualifiedKyc");
Assert.assertNull(QualifiedKyc,network.message(params,BasicConfig.WORK_scheme_getNum,"KYC合格状态非"+hasQualifiedKyc,response.body().asString()));
}else{
boolean QualifiedKyc = response.jsonPath().getBoolean("data.hasQualifiedKyc");
Assert.assertEquals(QualifiedKyc,hasQualifiedKyc,network.message(params,BasicConfig.WORK_scheme_getNum,"KYC合格状态非"+hasQualifiedKyc,response.body().asString()));
}
}
public static void getSchemeList(int type,int count,Integer kycStatus){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id);
params.put("type", type);
params.put("pageIndex", 1);
params.put("pageSize", 999);
Response response = network.getResponse(params,BasicConfig.WORK_scheme_list);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertEquals(size,count,network.message(params,BasicConfig.WORK_scheme_list,"列表数量非"+count,response.body().asString()));
if(type==1){//1-kyc上传历史,2-方案上传历史,3-方案讲解历史
kycId = response.jsonPath().getInt("data.list[0].id");
//1表示合格,0表示不合格,null表示未评价
if(kycStatus == null){
Object isQualified = response.jsonPath().getJsonObject("data.list[0].isQualified");
Assert.assertNull(isQualified, network.message(params, BasicConfig.WORK_scheme_list, "最新上传的kyc合格状态非" + count, response.body().asString()));
}else {
Integer isQualified = response.jsonPath().getInt("data.list[0].isQualified");
Assert.assertEquals(isQualified, kycStatus, network.message(params, BasicConfig.WORK_scheme_list, "最新上传的kyc合格状态非" + count, response.body().asString()));
}
}
}
} }
...@@ -19,8 +19,7 @@ import java.util.Map; ...@@ -19,8 +19,7 @@ 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.assignSeller;
import static com.oto.config.BasicConfig.INVITE_ID; import static com.oto.config.BasicConfig.*;
import static com.oto.config.BasicConfig.WX_confirm;
import static com.oto.utils.ThreadSleepUtils.sleep; import static com.oto.utils.ThreadSleepUtils.sleep;
public class Invite implements Authorization { public class Invite implements Authorization {
...@@ -277,8 +276,8 @@ public class Invite implements Authorization { ...@@ -277,8 +276,8 @@ public class Invite implements Authorization {
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
otoInviterAuth(); otoInviterAuth();
params.put("recordId",recordItem.recordId); params.put("recordId",recordItem.recordId);
params.put("takeLookId",290); params.put("takeLookId",SELLER_ID);
params.put("expertId",284); params.put("expertId",EXPERT_ID);
Response response =network.postResponse(params,BasicConfig.WORK_calendar_preAssign); Response response =network.postResponse(params,BasicConfig.WORK_calendar_preAssign);
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()));
...@@ -334,8 +333,8 @@ public class Invite implements Authorization { ...@@ -334,8 +333,8 @@ public class Invite implements Authorization {
//立即分配 //立即分配
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("recordId",recordItem.recordId); params.put("recordId",recordItem.recordId);
params.put("takeLookId",290); params.put("takeLookId",SELLER_ID);
params.put("expertId",284); params.put("expertId",EXPERT_ID);
Response response =network.postResponse(params,BasicConfig.WORK_calendar_nowAssign); Response response =network.postResponse(params,BasicConfig.WORK_calendar_nowAssign);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
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()));
...@@ -358,6 +357,11 @@ public class Invite implements Authorization { ...@@ -358,6 +357,11 @@ public class Invite implements Authorization {
takerCoefficient = leadertotalCoefficient; takerCoefficient = leadertotalCoefficient;
} }
@Test(description = "邀约记录未到场盘点详情不可重新分配专家",priority = 26)
public void 邀约记录未到场盘点详情不可重新分配专家(){
assignSeller(cust_id,479,false,3,"check");
}
//获取销售系数 //获取销售系数
public Double getSellertotalCoefficient(){ public Double getSellertotalCoefficient(){
sleep(1000); sleep(1000);
......
...@@ -277,7 +277,6 @@ public class Phone implements Authorization { ...@@ -277,7 +277,6 @@ public class Phone implements Authorization {
params.put("custAddress", "杭州市文新地铁站"); params.put("custAddress", "杭州市文新地铁站");
params.put("followWeight", 3); params.put("followWeight", 3);
params.put("expertId", IdMakeUtil.encodingId(43L)); params.put("expertId", IdMakeUtil.encodingId(43L));
params.put("giveProspectusFlag", 1);
params.put("commitPlanFlag", 1); params.put("commitPlanFlag", 1);
params.put("prospectusAmount", "计划书金额20W"); params.put("prospectusAmount", "计划书金额20W");
params.put("prospectusDesc", "计划书确认情况良好"); params.put("prospectusDesc", "计划书确认情况良好");
...@@ -428,8 +427,9 @@ public class Phone implements Authorization { ...@@ -428,8 +427,9 @@ public class Phone implements Authorization {
params.put("custAddress", "杭州市文新地铁站"); params.put("custAddress", "杭州市文新地铁站");
params.put("followWeight", 2); params.put("followWeight", 2);
params.put("expertId", IdMakeUtil.encodingId(284L)); params.put("expertId", IdMakeUtil.encodingId(284L));
params.put("giveProspectusFlag", 1); params.put("prospectusAmount", "方案金额");
params.put("commitPlanFlag", 0); params.put("prospectusDesc", "方案确认情况");
params.put("commitPlanFlag", 1);
params.put("isNormal", false); params.put("isNormal", false);
params.put("unusualTypes", unusualTypes); params.put("unusualTypes", unusualTypes);
params.put("unusualExplain", "手机号不一致的情况说明"); params.put("unusualExplain", "手机号不一致的情况说明");
...@@ -507,11 +507,9 @@ public class Phone implements Authorization { ...@@ -507,11 +507,9 @@ public class Phone implements Authorization {
params.put("id", interviewIds.get(2)); params.put("id", interviewIds.get(2));
Response response = network.getResponse(params, BasicConfig.PHONE_custExtDetail); Response response = network.getResponse(params, BasicConfig.PHONE_custExtDetail);
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag"); int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag");
int giveProspectusFlag = response.jsonPath().getInt("data.giveProspectusFlag");
String expertName = response.jsonPath().getString("data.expertName"); String expertName = response.jsonPath().getString("data.expertName");
Assert.assertEquals(giveProspectusFlag,1,network.message(params,BasicConfig.PHONE_custExtDetail,"是否可送计划书不为空",response.body().asString())); Assert.assertEquals(commitPlanFlag,1,network.message(params,BasicConfig.PHONE_custExtDetail,"是否讲解方案不为否",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_custExtDetail,"是否已送计划书不为否",response.body().asString())); Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.PHONE_custExtDetail,"陪同专家错误",response.body().asString()));
Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.PHONE_custExtDetail,"是否已送计划书不为否",response.body().asString()));
} }
@Test(description = "二次正常扫码面访异常类型为空",priority = 37) @Test(description = "二次正常扫码面访异常类型为空",priority = 37)
...@@ -571,7 +569,7 @@ public class Phone implements Authorization { ...@@ -571,7 +569,7 @@ public class Phone implements Authorization {
params.put("birthdayTime", "1960-01-03"); params.put("birthdayTime", "1960-01-03");
params.put("custAddress", "杭州市文新地铁站"); params.put("custAddress", "杭州市文新地铁站");
params.put("followWeight", 1); params.put("followWeight", 1);
params.put("giveProspectusFlag", 0); params.put("commitPlanFlag", 0);
params.put("isNormal", true); params.put("isNormal", true);
Response response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback); Response response = network.postResponse(params, BasicConfig.PHONE_interviewFeedback);
boolean success = response.jsonPath().getBoolean("success"); boolean success = response.jsonPath().getBoolean("success");
...@@ -592,7 +590,7 @@ public class Phone implements Authorization { ...@@ -592,7 +590,7 @@ public class Phone implements Authorization {
@Test(description = "查看面访详情",priority = 53) @Test(description = "查看面访详情",priority = 53)
public void 查看面访详情(){ public void 查看面访详情(){
interviewdetail(interviewIds.get(0),3,2,"手机号不一致且非面对面扫码的情况说明",1,1,"勿动-自动化测试总监"); interviewdetail(interviewIds.get(0),3,2,"手机号不一致且非面对面扫码的情况说明",1,1,"勿动-自动化测试总监");
interviewdetail(interviewIds.get(1),2,1,"手机号不一致的情况说明",1,0,"勿动-自动化测试专家"); interviewdetail(interviewIds.get(1),2,1,"手机号不一致的情况说明",1,1,"勿动-自动化测试专家");
interviewdetail(interviewIds.get(2),1,0,"",0,0,null); interviewdetail(interviewIds.get(2),1,0,"",0,0,null);
} }
...@@ -726,6 +724,12 @@ public class Phone implements Authorization { ...@@ -726,6 +724,12 @@ public class Phone implements Authorization {
Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_getDirectorPlanCalendarList,"销售的当前计划包含不在库客户",response.body().asString())); Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_getDirectorPlanCalendarList,"销售的当前计划包含不在库客户",response.body().asString()));
} }
@Test(description = "方案讲解历史更新",priority = 67)
public void 方案讲解历史更新(){
getSchemeNum(3,2,2,0);
getSchemeList(3,2,0);
}
...@@ -859,14 +863,12 @@ public class Phone implements Authorization { ...@@ -859,14 +863,12 @@ public class Phone implements Authorization {
params.put("id", interviewId); params.put("id", interviewId);
Response response = network.getResponse(params, BasicConfig.PHONE_feedbackDetail); Response response = network.getResponse(params, BasicConfig.PHONE_feedbackDetail);
int followWeight = response.jsonPath().getInt("data.followWeight"); int followWeight = response.jsonPath().getInt("data.followWeight");
int giveProspectusFlag = response.jsonPath().getInt("data.giveProspectusFlag");
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag"); int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag");
String expertName = response.jsonPath().getString("data.expertName"); String expertName = response.jsonPath().getString("data.expertName");
String unusualExplain = response.jsonPath().getString("data.unusualExplain"); String unusualExplain = response.jsonPath().getString("data.unusualExplain");
Assert.assertEquals(followWeight,weight,network.message(params,BasicConfig.PHONE_feedbackDetail,"关注度显示错误",response.body().asString())); Assert.assertEquals(followWeight,weight,network.message(params,BasicConfig.PHONE_feedbackDetail,"关注度显示错误",response.body().asString()));
Assert.assertEquals(giveProspectusFlag,giveProspectus,network.message(params,BasicConfig.PHONE_feedbackDetail,"关注度显示错误",response.body().asString())); Assert.assertEquals(commitPlanFlag,commitPlan,network.message(params,BasicConfig.PHONE_feedbackDetail,"是否讲解方案显示错误",response.body().asString()));
Assert.assertEquals(commitPlanFlag,commitPlan,network.message(params,BasicConfig.PHONE_feedbackDetail,"关注度显示错误",response.body().asString())); Assert.assertEquals(expertName,expert,network.message(params,BasicConfig.PHONE_feedbackDetail,"专家名称显示错误",response.body().asString()));
Assert.assertEquals(expertName,expert,network.message(params,BasicConfig.PHONE_feedbackDetail,"关注度显示错误",response.body().asString()));
Assert.assertEquals(unusualExplain, explain, network.message(params, BasicConfig.PHONE_feedbackDetail, "异常情况说明显示错误", response.body().asString()));; Assert.assertEquals(unusualExplain, explain, network.message(params, BasicConfig.PHONE_feedbackDetail, "异常情况说明显示错误", response.body().asString()));;
if(unusualTypes>0) { if(unusualTypes>0) {
int size = response.jsonPath().getInt("data.unusualTypes.size()"); int size = response.jsonPath().getInt("data.unusualTypes.size()");
......
...@@ -441,37 +441,36 @@ public class Work implements Authorization { ...@@ -441,37 +441,36 @@ public class Work implements Authorization {
Assert.assertEquals(label,"今日查看微信",network.message(BasicConfig.PHONE_paper_getCustomers,"日报提交状态非0:未提交",response.body().asString())); Assert.assertEquals(label,"今日查看微信",network.message(BasicConfig.PHONE_paper_getCustomers,"日报提交状态非0:未提交",response.body().asString()));
} }
@Test(description = "修改客户基础信息",priority = 34) @Test(description = "修改客户个人信息",priority = 31)
public void 修改客户基础信息(){ public void 修改客户个人信息(){
otoInviterAuth();
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
ArrayList<Integer> array = new ArrayList<>(); long birthday = System.currentTimeMillis()-86400000;
params.put("custId", cust_id); params.put("custId", cust_id);
Customer custInfo = customer; params.put("birthdayTime", System.currentTimeMillis()-86400000);
custInfo.otoCustInfo4Base.put("age",65); params.put("custAddress", "老的客户住址");
custInfo.otoCustInfo4Base.put("custAddress","客户的家庭住址"); params.put("custGender", 1);
custInfo.otoCustInfo4Base.put("considerAgedForWho","为谁考虑养老"); Response response = network.getResponse(params,BasicConfig.WORK_updateInfo);
custInfo.otoCustInfo4Base.put("attentionOldCommunity","客户最关注养老社区什么"); int size = response.jsonPath().getInt("data.liveDynamicListVoList.size()");
params.put("otoCustInfo4Base", custInfo.otoCustInfo4Base); Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_updateInfo,"直播动态错误",response.body().asString()));
params.put("otoCustInfo4Insurance", custInfo.otoCustInfo4Insurance);
params.put("otoCustInfo4Manage", custInfo.otoCustInfo4Manage);
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.clear();
params.put("custId", cust_id); params.put("custId", cust_id);
response = network.getResponse(params,BasicConfig.WORK_detail_v2); params.put("type", 1);
String age = response.jsonPath().getString("data.otoCustInfo4Base.age"); response = network.getResponse(params,BasicConfig.WORK_header);
String custAddress = response.jsonPath().getString("data.otoCustInfo4Base.custAddress"); long birthdayTime= response.jsonPath().getLong("data.birthdayTime");
String considerAgedForWho = response.jsonPath().getString("data.otoCustInfo4Base.considerAgedForWho"); String custAddress= response.jsonPath().getString("data.custAddress");
String attentionOldCommunity = response.jsonPath().getString("data.otoCustInfo4Base.attentionOldCommunity"); int age= response.jsonPath().getInt("data.age");
Assert.assertEquals(age,"65",network.message(params,BasicConfig.WORK_detail_v2,"客户的年龄未更新",response.body().asString())); int custGender= response.jsonPath().getInt("data.custGender");
Assert.assertEquals(custAddress,"客户的家庭住址",network.message(params,BasicConfig.WORK_detail_v2,"客户的家庭住址未更新",response.body().asString())); Assert.assertEquals(birthdayTime,birthday,network.message(params,BasicConfig.WORK_header,"出生年月日更新失败",response.body().asString()));
Assert.assertEquals(considerAgedForWho,"为谁考虑养老",network.message(params,BasicConfig.WORK_detail_v2,"客户的为谁考虑养老未更新",response.body().asString())); Assert.assertEquals(age,0,network.message(params,BasicConfig.WORK_header,"年纪更新失败",response.body().asString()));
Assert.assertEquals(attentionOldCommunity,"客户最关注养老社区什么",network.message(params,BasicConfig.WORK_detail_v2,"客户的客户最关注养老社区什么未更新",response.body().asString())); Assert.assertEquals(custAddress,"老的客户住址",network.message(params,BasicConfig.WORK_header,"家庭住址更新失败",response.body().asString()));
customer = JsonUtil.parseResponseToBean(response,Customer.class); Assert.assertEquals(custGender,1,network.message(params,BasicConfig.WORK_header,"性别更新失败",response.body().asString()));
}
@Test(description = "修改客户基础信息",priority = 34)
public void 修改客户基础信息(){
//
} }
@Test(description = "编辑客户备注",priority = 35) @Test(description = "编辑客户备注",priority = 35)
...@@ -952,6 +951,8 @@ public class Work implements Authorization { ...@@ -952,6 +951,8 @@ public class Work implements Authorization {
} }
@Test(description = "公域引流_删除标签",priority = 88) @Test(description = "公域引流_删除标签",priority = 88)
public void 公域引流_删除标签(){ public void 公域引流_删除标签(){
ssoLogin(); ssoLogin();
......
...@@ -228,6 +228,7 @@ public class BasicConfig { ...@@ -228,6 +228,7 @@ public class BasicConfig {
public static final String WORK_assignSeller= WORK_HOST + "/kjy/oto/manager/customer/assignSeller"; public static final String WORK_assignSeller= WORK_HOST + "/kjy/oto/manager/customer/assignSeller";
public static final String WORK_liveDynamic= WORK_HOST + "/kjy/oto/manager/customer/liveDynamic"; public static final String WORK_liveDynamic= WORK_HOST + "/kjy/oto/manager/customer/liveDynamic";
public static final String WORK_minimumDept= WORK_HOST + "/kjy/oto/manager/customer/minimum/dept/list"; public static final String WORK_minimumDept= WORK_HOST + "/kjy/oto/manager/customer/minimum/dept/list";
public static final String WORK_updateInfo= WORK_HOST + "/kjy/oto/manager/customer/info/update";
//*************************我的审批**************************** //*************************我的审批****************************
public static final String WORK_findMySellerByFuzzyName= WORK_HOST + "/kjy/oto/manager/audit/findMySellerByFuzzyName"; public static final String WORK_findMySellerByFuzzyName= WORK_HOST + "/kjy/oto/manager/audit/findMySellerByFuzzyName";
...@@ -239,6 +240,11 @@ public class BasicConfig { ...@@ -239,6 +240,11 @@ public class BasicConfig {
public static final String WORK_liveSearch= WORK_HOST + "/kjy/oto/manager/customer/liveSearch"; public static final String WORK_liveSearch= WORK_HOST + "/kjy/oto/manager/customer/liveSearch";
public static final String WORK_roleSellerList= WORK_HOST + "/kjy/oto/manager/customer/roleSellerList"; public static final String WORK_roleSellerList= WORK_HOST + "/kjy/oto/manager/customer/roleSellerList";
public static final String WORK_check_sellerList= WORK_HOST + "/kjy/oto/manager/customer/check/sellerList"; public static final String WORK_check_sellerList= WORK_HOST + "/kjy/oto/manager/customer/check/sellerList";
public static final String WORK_scheme_getNum= WORK_HOST + "/kjy/oto/manager/customer/kyc/scheme/num/get";
public static final String WORK_scheme_list= WORK_HOST + "/kjy/oto/manager/customer/kyc/scheme/list";
public static final String WORK_scheme_qualified= WORK_HOST + "/kjy/oto/manager/customer/kyc/qualified/update";
public static final String WORK_scheme_savePlanFile= WORK_HOST + "/kjy/oto/manager/customer/planFile/save";
public static final String WORK_scheme_saveKyc = WORK_HOST + "/kjy/oto/manager/customer/kyc/save";
//*************************会话管理*************************** //*************************会话管理***************************
public static final String WORK_wxList= WORK_HOST + "/kjy/oto/manager/wx/conversation/list"; public static final String WORK_wxList= WORK_HOST + "/kjy/oto/manager/wx/conversation/list";
......
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