Commit 4d8f65d4 authored by 龚小红's avatar 龚小红

增加创建用户和分配团队的测试用例

parent 42643df2
...@@ -153,7 +153,7 @@ public class Activity implements Authorization { ...@@ -153,7 +153,7 @@ public class Activity implements Authorization {
sleep(2000); sleep(2000);
assignSeller(cust_id+3,INVITE_ID,true,1,"crm"); assignSeller(cust_id+3,INVITE_ID,true,1,"crm");
sleep(2000); sleep(2000);
updateInvite(1,now + 3600000,cust_id+2); updateInvite(1,now + 3600000,cust_id+3);
otoAssistAuth(); otoAssistAuth();
getCalendarlist(today,0,"自动化测试用户2","勿动-自动化测试邀约"); getCalendarlist(today,0,"自动化测试用户2","勿动-自动化测试邀约");
...@@ -270,7 +270,7 @@ public class Activity implements Authorization { ...@@ -270,7 +270,7 @@ public class Activity implements Authorization {
sellerSubmitRecord(0,2); sellerSubmitRecord(0,2);
} }
@Test(description = "专家确认客户未到场",priority = 13) @Test(description = "专家确认客户未到场",priority = 14)
public void 专家确认客户未到场(){ public void 专家确认客户未到场(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("date", today); params.put("date", today);
...@@ -410,38 +410,38 @@ public class Activity implements Authorization { ...@@ -410,38 +410,38 @@ public class Activity implements Authorization {
@Test(description = "微信创建转介绍客户",priority = 23) @Test(description = "微信创建转介绍客户",priority = 23)
public void 微信创建转介绍客户(){ public void 微信创建转介绍客户(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化微信转介绍客户");//客户姓名or客户id params.put("custName", "自动化微信转介绍客户");
params.put("custPhoneNum", "15136361011"); params.put("custPhoneNum", "15136361011");
params.put("introducerId", IdMakeUtil.encodingId((long) cust_id)); params.put("introducerId", IdMakeUtil.encodingId((long) cust_id));
params.put("custActionType", "05"); params.put("custActionType", "05");
params.put("community", false); params.put("community", false);
Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce); Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce);
boolean data = response.jsonPath().getBoolean("data"); String data = response.jsonPath().getString("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建转介绍客户失败",response.body().asString())); Assert.assertNotNull(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建转介绍客户失败",response.body().asString()));
} }
@Test(description = "微信创建社区客户",priority = 24) @Test(description = "微信创建社区客户",priority = 24)
public void 微信创建社区客户(){ public void 微信创建社区客户(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化微信社区客户");//客户姓名or客户id params.put("custName", "自动化微信社区客户");
params.put("custPhoneNum", "15136361012"); params.put("custPhoneNum", "15136361012");
params.put("custActionType", "05"); params.put("custActionType", "05");
params.put("community", true); params.put("community", true);
Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce); Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce);
boolean data = response.jsonPath().getBoolean("data"); String data = response.jsonPath().getString("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建社区客户失败",response.body().asString())); Assert.assertNotNull(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建社区客户失败",response.body().asString()));
} }
@Test(description = "微信创建缘故客户",priority = 25) @Test(description = "微信创建缘故客户",priority = 25)
public void 微信创建缘故客户(){ public void 微信创建缘故客户(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化微信缘故客户");//客户姓名or客户id params.put("custName", "自动化微信缘故客户");
params.put("custPhoneNum", "15136361012"); params.put("custPhoneNum", "15136361013");
params.put("custActionType", "04"); params.put("custActionType", "04");
params.put("community", true); params.put("community", true);
Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce); Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce);
boolean data = response.jsonPath().getBoolean("data"); String data = response.jsonPath().getString("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建转介绍客户失败",response.body().asString())); Assert.assertNotNull(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建转介绍客户失败",response.body().asString()));
} }
...@@ -453,6 +453,6 @@ public class Activity implements Authorization { ...@@ -453,6 +453,6 @@ public class Activity implements Authorization {
int submitStatus = response.jsonPath().getInt("data.list[0].submitStatus"); int submitStatus = response.jsonPath().getInt("data.list[0].submitStatus");
int custCount = response.jsonPath().getInt("data.list[0].configStatistics.find{it.configId == 440}.custCount"); int custCount = response.jsonPath().getInt("data.list[0].configStatistics.find{it.configId == 440}.custCount");
Assert.assertEquals(submitStatus,status,network.message(params,BasicConfig.WX_sellerSubmitRecordList,"专家提报状态错误",response.body().asString())); Assert.assertEquals(submitStatus,status,network.message(params,BasicConfig.WX_sellerSubmitRecordList,"专家提报状态错误",response.body().asString()));
Assert.assertEquals(custCount,count,network.message(params,BasicConfig.WX_sellerSubmitRecordList,"已签到数量非1",response.body().asString())); Assert.assertEquals(custCount,count,network.message(params,BasicConfig.WX_sellerSubmitRecordList,"已签到数量非"+count,response.body().asString()));
} }
} }
...@@ -128,7 +128,7 @@ public class Invite implements Authorization { ...@@ -128,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,"自动化激活用户","勿动-自动化测试邀约");
Assert.assertEquals(recordItem.deptId, 47,network.message(BasicConfig.WORK_getAllSceneConfs,"面访场景包含场景未根据产品组关联","")); Assert.assertEquals(recordItem.deptId, 47,network.message(BasicConfig.WORK_getAllSceneConfs,"未回显部门id",""));
} }
......
...@@ -49,22 +49,22 @@ public class Work implements Authorization { ...@@ -49,22 +49,22 @@ public class Work implements Authorization {
menuList(3); menuList(3);
otoAssistAuth(); otoAssistAuth();
menuList(10); menuList(11);
otoLeaderAuth(); otoLeaderAuth();
menuList(15); menuList(16);
otoPMAuth(); otoPMAuth();
menuList(12); menuList(13);
otoAreaAuth(); otoAreaAuth();
menuList(11); menuList(12);
otoPlanAuth(); otoPlanAuth();
menuList(3); menuList(3);
otoManagerAuth(); otoManagerAuth();
menuList(20); menuList(21);
} }
@Test(description = "工作台_标签列表",priority = 5) @Test(description = "工作台_标签列表",priority = 5)
......
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