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

1.增加方案进度

parent cf573c84
...@@ -372,10 +372,10 @@ public class CheckTask implements Authorization { ...@@ -372,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()));
} }
...@@ -607,7 +607,7 @@ public class CheckTask implements Authorization { ...@@ -607,7 +607,7 @@ public class CheckTask implements Authorization {
getSchemeNum(3,0,0,null); getSchemeNum(3,0,0,null);
} }
@Test(description = "上传客户方案",priority = 51) @Test(description = "上传客户方案",priority = 52)
public void 上传客户方案(){ public void 上传客户方案(){
//仅管理员/PM可上传方案 //仅管理员/PM可上传方案
otoManagerAuth(); otoManagerAuth();
...@@ -630,10 +630,10 @@ public class CheckTask implements Authorization { ...@@ -630,10 +630,10 @@ public class CheckTask implements Authorization {
savePlanFile(false); savePlanFile(false);
sleep(1000); sleep(1000);
getSchemeNum(3,3,0,null); getSchemeNum(3,2,0,null);
} }
@Test(description = "查看kyc和方案上传历史列表",priority = 40) @Test(description = "查看kyc和方案上传历史列表",priority = 53)
public void 查看kyc和方案上传历史列表(){ public void 查看kyc和方案上传历史列表(){
//查看kys上传历史 //查看kys上传历史
getSchemeList(1,3,null); getSchemeList(1,3,null);
...@@ -645,7 +645,7 @@ public class CheckTask implements Authorization { ...@@ -645,7 +645,7 @@ public class CheckTask implements Authorization {
getSchemeList(3,0,null); getSchemeList(3,0,null);
} }
@Test(description = "标记KYC合格状态",priority = 50) @Test(description = "标记KYC合格状态",priority = 54)
public void 标记KYC合格状态(){ public void 标记KYC合格状态(){
//仅管理员/PM可标记kyc //仅管理员/PM可标记kyc
otoManagerAuth(); otoManagerAuth();
...@@ -714,8 +714,13 @@ public class CheckTask implements Authorization { ...@@ -714,8 +714,13 @@ public class CheckTask implements Authorization {
params.put("custId", cust_id); 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"}); 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); Response response = network.postResponse(params,BasicConfig.WORK_scheme_saveKyc);
boolean data = response.jsonPath().getBoolean("data"); if(result) {
Assert.assertEquals(data,result,network.message(params,BasicConfig.WORK_scheme_saveKyc,"上传KYC结果非"+result,response.body().asString())); 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){ public void savePlanFile(boolean result){
...@@ -723,8 +728,13 @@ public class CheckTask implements Authorization { ...@@ -723,8 +728,13 @@ public class CheckTask implements Authorization {
params.put("custId", cust_id); 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"} ); 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); Response response = network.postResponse(params,BasicConfig.WORK_scheme_savePlanFile);
boolean data = response.jsonPath().getBoolean("data"); if(result) {
Assert.assertEquals(data,result,network.message(params,BasicConfig.WORK_scheme_savePlanFile,"上传方案结果非"+result,response.body().asString())); 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){ public void qualifiedKyc(int isQualified,boolean result){
...@@ -743,11 +753,16 @@ public class CheckTask implements Authorization { ...@@ -743,11 +753,16 @@ public class CheckTask implements Authorization {
int kyc = response.jsonPath().getInt("data.kycNum"); int kyc = response.jsonPath().getInt("data.kycNum");
int scheme = response.jsonPath().getInt("data.schemeNum"); int scheme = response.jsonPath().getInt("data.schemeNum");
int commitPlan = response.jsonPath().getInt("data.commitPlanNum"); int commitPlan = response.jsonPath().getInt("data.commitPlanNum");
Integer QualifiedKyc = response.jsonPath().getInt("data.hasQualifiedKyc");
Assert.assertEquals(kyc,kycNum,network.message(params,BasicConfig.WORK_scheme_getNum,"上传KYC次数非"+kycNum,response.body().asString())); 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(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())); Assert.assertEquals(commitPlan,commitPlanNum,network.message(params,BasicConfig.WORK_scheme_getNum,"讲解方案次数非"+commitPlanNum,response.body().asString()));
Assert.assertEquals(QualifiedKyc,hasQualifiedKyc,network.message(params,BasicConfig.WORK_scheme_getNum,"KYC合格状态非"+hasQualifiedKyc,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){ public static void getSchemeList(int type,int count,Integer kycStatus){
...@@ -762,8 +777,13 @@ public class CheckTask implements Authorization { ...@@ -762,8 +777,13 @@ public class CheckTask implements Authorization {
if(type==1){//1-kyc上传历史,2-方案上传历史,3-方案讲解历史 if(type==1){//1-kyc上传历史,2-方案上传历史,3-方案讲解历史
kycId = response.jsonPath().getInt("data.list[0].id"); kycId = response.jsonPath().getInt("data.list[0].id");
//1表示合格,0表示不合格,null表示未评价 //1表示合格,0表示不合格,null表示未评价
Integer isQualified = response.jsonPath().getInt("data.list[0].isQualified"); if(kycStatus == null){
Assert.assertEquals(isQualified,kycStatus,network.message(params,BasicConfig.WORK_scheme_list,"最新上传的kyc合格状态非"+count,response.body().asString())); 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()));
}
} }
......
...@@ -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)
...@@ -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);
} }
...@@ -729,7 +727,7 @@ public class Phone implements Authorization { ...@@ -729,7 +727,7 @@ public class Phone implements Authorization {
@Test(description = "方案讲解历史更新",priority = 67) @Test(description = "方案讲解历史更新",priority = 67)
public void 方案讲解历史更新(){ public void 方案讲解历史更新(){
getSchemeNum(3,3,2,0); getSchemeNum(3,2,2,0);
getSchemeList(3,2,0); getSchemeList(3,2,0);
} }
...@@ -865,14 +863,12 @@ public class Phone implements Authorization { ...@@ -865,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()");
......
...@@ -449,9 +449,9 @@ public class Work implements Authorization { ...@@ -449,9 +449,9 @@ public class Work implements Authorization {
params.put("birthdayTime", System.currentTimeMillis()-86400000); params.put("birthdayTime", System.currentTimeMillis()-86400000);
params.put("custAddress", "老的客户住址"); params.put("custAddress", "老的客户住址");
params.put("custGender", 1); params.put("custGender", 1);
Response response = network.getResponse(params,BasicConfig.WORK_liveDynamic); Response response = network.getResponse(params,BasicConfig.WORK_updateInfo);
int size = response.jsonPath().getInt("data.liveDynamicListVoList.size()"); int size = response.jsonPath().getInt("data.liveDynamicListVoList.size()");
Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_liveDynamic,"直播动态错误",response.body().asString())); Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_updateInfo,"直播动态错误",response.body().asString()));
params.clear(); params.clear();
params.put("custId", cust_id); params.put("custId", cust_id);
...@@ -470,34 +470,7 @@ public class Work implements Authorization { ...@@ -470,34 +470,7 @@ public class Work implements Authorization {
@Test(description = "修改客户基础信息",priority = 34) @Test(description = "修改客户基础信息",priority = 34)
public void 修改客户基础信息(){ public void 修改客户基础信息(){
otoInviterAuth(); //
HashMap<String,Object> params = new HashMap<>();
ArrayList<Integer> array = new ArrayList<>();
params.put("custId", cust_id);
Customer custInfo = customer;
custInfo.otoCustInfo4Base.put("custAddress","客户的家庭住址");
custInfo.otoCustInfo4Base.put("considerAgedForWho","为谁考虑养老");
custInfo.otoCustInfo4Base.put("attentionOldCommunity","客户最关注养老社区什么");
params.put("otoCustInfo4Base", custInfo.otoCustInfo4Base);
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.put("custId", cust_id);
response = network.getResponse(params, WORK_header);
String age = response.jsonPath().getString("data.otoCustInfo4Base.age");
String custAddress = response.jsonPath().getString("data.otoCustInfo4Base.custAddress");
String considerAgedForWho = response.jsonPath().getString("data.otoCustInfo4Base.considerAgedForWho");
String attentionOldCommunity = response.jsonPath().getString("data.otoCustInfo4Base.attentionOldCommunity");
Assert.assertEquals(age,"65",network.message(params,BasicConfig.WORK_detail_v2,"客户的年龄未更新",response.body().asString()));
Assert.assertEquals(custAddress,"客户的家庭住址",network.message(params,BasicConfig.WORK_detail_v2,"客户的家庭住址未更新",response.body().asString()));
Assert.assertEquals(considerAgedForWho,"为谁考虑养老",network.message(params,BasicConfig.WORK_detail_v2,"客户的为谁考虑养老未更新",response.body().asString()));
Assert.assertEquals(attentionOldCommunity,"客户最关注养老社区什么",network.message(params,BasicConfig.WORK_detail_v2,"客户的客户最关注养老社区什么未更新",response.body().asString()));
customer = JsonUtil.parseResponseToBean(response,Customer.class);
} }
@Test(description = "编辑客户备注",priority = 35) @Test(description = "编辑客户备注",priority = 35)
......
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