Commit 82e84144 authored by 龚小红's avatar 龚小红

Merge branch 'Feature/signDetailAndExpert_20220424' into 'master'

增加服务专家的测试用例

See merge request !94
parents d38fb4ca 5f25bddd
...@@ -318,8 +318,8 @@ public class Activity implements Authorization { ...@@ -318,8 +318,8 @@ public class Activity implements Authorization {
public void 添加非签到活动和其他见面客户并提报(){ public void 添加非签到活动和其他见面客户并提报(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();
list.add(new SignCustomer(IdMakeUtil.encodingId((long)cust_id+3),"pm", 226 ,0)); list.add(new SignCustomer(IdMakeUtil.encodingId((long)cust_id+3),"am", 226 ,0));
list.add(new SignCustomer(IdMakeUtil.encodingId((long)cust_id+4),"am", 17,2)); list.add(new SignCustomer(IdMakeUtil.encodingId((long)cust_id+4),"pm", 17,2));
params.put("date", today); params.put("date", today);
params.put("params", list); params.put("params", list);
Response response = network.postResponse(params, BasicConfig.WX_submitRecord); Response response = network.postResponse(params, BasicConfig.WX_submitRecord);
......
...@@ -582,7 +582,7 @@ public class CheckTask implements Authorization { ...@@ -582,7 +582,7 @@ public class CheckTask implements Authorization {
@Test(description = "查看新客户的方案进展模块",priority = 50) @Test(description = "查看新客户的方案进展模块",priority = 50)
public void 查看新客户的方案进展模块(){ public void 查看新客户的方案进展模块(){
otoExpertAuth(); otoExpertAuth();
getTree(4,null,0,0,null); getTree(4,null,0,0,null,null);
} }
@Test(description = "销售上传KYC",priority = 51) @Test(description = "销售上传KYC",priority = 51)
...@@ -609,15 +609,12 @@ public class CheckTask implements Authorization { ...@@ -609,15 +609,12 @@ public class CheckTask implements Authorization {
@Test(description = "查看客户报告进度为总监审批中",priority = 54) @Test(description = "查看客户报告进度为总监审批中",priority = 54)
public void 查看客户报告进度为总监审批中(){ public void 查看客户报告进度为总监审批中(){
getTree(2,1,0,0,2); getTree(2,1,0,0,2,2);
} }
@Test(description = "登录人查看待审批数量",priority = 55) @Test(description = "登录人查看待审批数量",priority = 55)
public void 登录人查看待审批数量(){ public void 登录人查看待审批数量(){
otoAreaAuth();//区域总待审批为0 otoAreaAuth();//区域总待审批为0
getAuditNum(0);
otoLeaderAuth();
getAuditNum(1); getAuditNum(1);
} }
...@@ -635,7 +632,7 @@ public class CheckTask implements Authorization { ...@@ -635,7 +632,7 @@ public class CheckTask implements Authorization {
otoLeaderAuth(); otoLeaderAuth();
audit(0); audit(0);
getAuditList(3,2,0,0,0); getAuditList(3,2,0,0,0);
getTree(2,3,0,0,2); getTree(2,3,0,0,2,2);
otoExpertAuth(); otoExpertAuth();
getAuditList(3,2,0,1,0); getAuditList(3,2,0,1,0);
...@@ -656,48 +653,57 @@ public class CheckTask implements Authorization { ...@@ -656,48 +653,57 @@ public class CheckTask implements Authorization {
public void 总监区域总解决方案通过审批(){ public void 总监区域总解决方案通过审批(){
otoLeaderAuth();//总监审批前 otoLeaderAuth();//总监审批前
getAuditList(1,2,1,0,0); getAuditList(1,2,1,0,0);
getTree(2,1,0,0,2); getTree(2,1,0,0,2,2);
audit(1);//总监通过审批后 audit(1);//总监通过审批后
getAuditList(1,7,0,0,0); getAuditList(1,7,0,0,0);
getTree(2,2,0,0,7); getTree(2,2,0,0,7,2);
sleep(1000); sleep(1000);
otoAreaAuth();//区域总审批前 otoAreaAuth();//区域总审批前
getAuditList(1,7,1,0,0); getAuditList(1,7,1,0,0);
getTree(7,1,0,0,7); getTree(7,1,0,0,7,2);
audit(1);//区域总通过审批后 audit(1);//区域总通过审批后
getAuditList(1,9,0,0,0); getAuditList(1,9,0,0,0);
getTree(7,2,0,0,9); getTree(7,2,0,0,9,2);
sleep(1000); sleep(1000);
otoPlanAuth();//解决方案审批前 otoPlanAuth();//解决方案审批前
getAuditList(1,9,1,0,0); getAuditList(1,9,1,0,0);
getTree(9,1,0,0,9); getTree(9,1,0,0,9,2);
audit(1);//解决方案通过审批后 audit(1);//解决方案通过审批后
getAuditList(2,99,0,0,1); getAuditList(2,99,0,0,1);
getTree(9,2,0,0,99); getTree(9,2,0,0,99,2);
} }
@Test(description = "解决方案上传客户方案",priority = 60) @Test(description = "解决方案上传风险评估报告",priority = 60)
public void 解决方案上传风险评估报告(){
savePlanFile(3);
sleep(1000);
getAuditList(4,99,0,0,1);
getTree(9,2,0,1,99,3);
}
@Test(description = "解决方案上传客户方案",priority = 61)
public void 解决方案上传客户方案(){ public void 解决方案上传客户方案(){
savePlanFile(true); savePlanFile(2);
sleep(1000); sleep(1000);
getAuditList(4,99,0,0,1); getAuditList(4,99,0,0,1);
getTree(9,2,0,1,99,2);
} }
@Test(description = "查看kyc和方案上传历史列表",priority = 61) @Test(description = "查看kyc和方案上传历史列表",priority = 62)
public void 查看kyc和方案上传历史列表(){ public void 查看kyc和方案上传历史列表(){
//查看kys上传历史 //查看kys上传历史
getSchemeList(1,1); getSchemeList(1,1);
//查看方案上传历史 //查看方案上传历史
getSchemeList(2,1); getSchemeList(2,2);
//查看方案讲解历史 //查看方案讲解历史
getSchemeList(3,0); getSchemeList(3,0);
} }
@Test(description = "查询当前跟进专家姓名",priority = 62) @Test(description = "查询当前跟进专家姓名",priority = 63)
public void 查询当前跟进专家姓名(){ public void 查询当前跟进专家姓名(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("name", "自动化"); params.put("name", "自动化");
...@@ -706,7 +712,7 @@ public class CheckTask implements Authorization { ...@@ -706,7 +712,7 @@ public class CheckTask implements Authorization {
Assert.assertEquals(size,2,network.message(params,BasicConfig.WORK_OA_expertName,"活动不可签到",response.body().asString())); Assert.assertEquals(size,2,network.message(params,BasicConfig.WORK_OA_expertName,"活动不可签到",response.body().asString()));
} }
@Test(description = "查询团队跟进客户姓名",priority = 63) @Test(description = "查询团队跟进客户姓名",priority = 64)
public void 查询团队跟进客户姓名(){ public void 查询团队跟进客户姓名(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("name", "自动化"); params.put("name", "自动化");
...@@ -763,18 +769,19 @@ public class CheckTask implements Authorization { ...@@ -763,18 +769,19 @@ public class CheckTask implements Authorization {
} }
} }
public void savePlanFile(boolean result){ public void savePlanFile(int uploadType){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id); params.put("custId", cust_id);
params.put("uploadType", uploadType);
if(uploadType == 2){
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);
if(result) {
boolean data = response.jsonPath().getBoolean("data");
Assert.assertEquals(data, result, network.message(params, BasicConfig.WORK_scheme_savePlanFile, "上传方案结果非" + result, response.body().asString()));
}else{ }else{
boolean success = response.jsonPath().getBoolean("success"); params.put("planFiles",new String[]{"//yun.dui88.com/kjy/media/file/20230426/20230426103441/工作簿3.xlsx"} );
Assert.assertEquals(success, result, network.message(params, BasicConfig.WORK_scheme_savePlanFile, "上传方案结果非" + result, response.body().asString()));
} }
Response response = network.postResponse(params,BasicConfig.WORK_scheme_savePlanFile);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.WORK_scheme_savePlanFile, "上传方案结果失败", response.body().asString()));
} }
public void qualifiedKyc(int isQualified,boolean result){ public void qualifiedKyc(int isQualified,boolean result){
...@@ -791,18 +798,20 @@ public class CheckTask implements Authorization { ...@@ -791,18 +798,20 @@ public class CheckTask implements Authorization {
} }
} }
public static void getTree(int roleType,Object auditStatus,int planExplainStatus,int planUploadStatus,Object curRoleType){ public static void getTree(int roleType,Object auditStatus,int planExplainStatus,int planUploadStatus,Object curRoleType,Object uploadType){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", cust_id); params.put("custId", cust_id);
Response response = network.getResponse(params,BasicConfig.WORK_OA_tree); Response response = network.getResponse(params,BasicConfig.WORK_OA_tree);
Object curRole = response.jsonPath().getObject("data.curRoleType",Integer.class); Object curRole = response.jsonPath().getObject("data.curRoleType",Integer.class);
Object aStatus = response.jsonPath().getObject("data.list.find{it.roleType == " + roleType + "}.auditStatus",Integer.class); Object aStatus = response.jsonPath().getObject("data.list.find{it.roleType == " + roleType + "}.auditStatus",Integer.class);
int uploadStatus = response.jsonPath().getInt("data.planUploadStatus"); int planStatus = response.jsonPath().getInt("data.planUploadStatus");
int explainStatus = response.jsonPath().getInt("data.planExplainStatus"); int explainStatus = response.jsonPath().getInt("data.planExplainStatus");
Object upload = response.jsonPath().getObject("data.uploadType",Integer.class);
Assert.assertEquals(curRole,curRoleType,network.message(params,BasicConfig.WORK_OA_tree,"当前审批环节非"+curRoleType,response.body().asString())); Assert.assertEquals(curRole,curRoleType,network.message(params,BasicConfig.WORK_OA_tree,"当前审批环节非"+curRoleType,response.body().asString()));
Assert.assertEquals(aStatus,auditStatus,network.message(params,BasicConfig.WORK_OA_tree,"角色为"+roleType+"的审批状态非"+auditStatus,response.body().asString())); Assert.assertEquals(aStatus,auditStatus,network.message(params,BasicConfig.WORK_OA_tree,"角色为"+roleType+"的审批状态非"+auditStatus,response.body().asString()));
Assert.assertEquals(uploadStatus,planExplainStatus,network.message(params,BasicConfig.WORK_OA_tree,"上传方案次数非"+planExplainStatus,response.body().asString())); Assert.assertEquals(planStatus,planExplainStatus,network.message(params,BasicConfig.WORK_OA_tree,"上传方案状态非"+planExplainStatus,response.body().asString()));
Assert.assertEquals(explainStatus,planUploadStatus,network.message(params,BasicConfig.WORK_OA_tree,"讲解方案次数非"+planUploadStatus,response.body().asString())); Assert.assertEquals(explainStatus,planUploadStatus,network.message(params,BasicConfig.WORK_OA_tree,"讲解方案状态非"+planUploadStatus,response.body().asString()));
Assert.assertEquals(upload,uploadType,network.message(params,BasicConfig.WORK_OA_tree,"方案上传类型非"+uploadType,response.body().asString()));
} }
public static void audit(int audit){ public static void audit(int audit){
......
...@@ -717,7 +717,7 @@ public class Phone implements Authorization { ...@@ -717,7 +717,7 @@ public class Phone implements Authorization {
@Test(description = "方案讲解历史更新",priority = 67) @Test(description = "方案讲解历史更新",priority = 67)
public void 方案讲解历史更新(){ public void 方案讲解历史更新(){
getTree(4,null,1,1,99); getTree(4,null,1,1,99,2);
getSchemeList(3,1); getSchemeList(3,1);
} }
......
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