Commit 16084acd authored by 龚小红's avatar 龚小红

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

parent 963ec98e
......@@ -5,6 +5,7 @@ import lombok.Data;
@Data
public class InvitationRecord {
public int recordId;
public int deptId;
public String custName;
public boolean hasAssignFlag;
public String takeLookName;
......
......@@ -188,7 +188,7 @@ public class Activity implements Authorization {
public void 查询活动签到配置(){
WXCustomerTku();
HashMap<String,Object> params = new HashMap<>();
params.put("activityId", IdMakeUtil.encodingId((long) acitityId+1));
params.put("activityId", IdMakeUtil.encodingId((long) acitityId-1));
Response response = network.getResponse(params, BasicConfig.WX_signDetail);
int signStatus = response.jsonPath().getInt("data.signStatus");
boolean sign = response.jsonPath().getBoolean("data.sign");
......@@ -200,7 +200,7 @@ public class Activity implements Authorization {
public void 活动签到(){
HashMap<String,Object> params = new HashMap<>();
params.put("firstSubmit", true);
params.put("activityId", IdMakeUtil.encodingId((long) acitityId+1));
params.put("activityId", IdMakeUtil.encodingId((long) acitityId-1));
Response response = network.postResponse(params, BasicConfig.WX_signSubmit);
boolean needExtra = response.jsonPath().getBoolean("data.needExtra");
Assert.assertFalse(needExtra,network.message(params,BasicConfig.WX_signSubmit,"用户签到失败,在库手机号需要二次填写",response.body().asString()));
......@@ -373,10 +373,47 @@ public class Activity implements Authorization {
Assert.assertEquals(vosSize,1,network.message(params,BasicConfig.WX_otherDetailForLeader,"其他见面场景的客户数错误",response.body().asString()));
}
@Test(description = "微信创建转介绍客户",priority = 23)
public void 微信创建转介绍客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化微信转介绍客户");//客户姓名or客户id
params.put("custPhoneNum", "15136361011");
params.put("introducerId", IdMakeUtil.encodingId((long) cust_id));
params.put("custActionType", "05");
params.put("community", false);
Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建转介绍客户失败",response.body().asString()));
}
@Test(description = "微信创建社区客户",priority = 24)
public void 微信创建社区客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化微信社区客户");//客户姓名or客户id
params.put("custPhoneNum", "15136361012");
params.put("custActionType", "05");
params.put("community", true);
Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建社区客户失败",response.body().asString()));
}
@Test(description = "微信创建缘故客户",priority = 25)
public void 微信创建缘故客户(){
HashMap<String,Object> params = new HashMap<>();
params.put("custName", "自动化微信缘故客户");//客户姓名or客户id
params.put("custPhoneNum", "15136361012");
params.put("custActionType", "04");
params.put("community", true);
Response response = network.postResponse(params, BasicConfig.WX_saveIntroduce);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_saveIntroduce,"创建转介绍客户失败",response.body().asString()));
}
public void sellerSubmitRecord(int status,int count){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("custName", 1);
params.put("pagesize",20);
Response response = network.postResponse(params, BasicConfig.WX_sellerSubmitRecordList);
int submitStatus = response.jsonPath().getInt("data.list[0].submitStatus");
......
......@@ -325,7 +325,7 @@ public class Depts implements Authorization {
params.put("companyIds", new int[]{5});
params.put("source", 1);
params.put("fileName", "自动化导入客户.xlsx");
params.put("excelUrl", "https://yun.dui88.com/kjy/media/file/20221114/1499deb6eb5222f02ab88facaa0db316.xlsx");
params.put("excelUrl", "https://yun.dui88.com/kjy/media/file/20230421/7c0a1b45b098772326330b4adf7165fc.xlsx");
Response response =network.postResponse(params,BasicConfig.WORK_MNG_importOtoCustomer);
int result = response.jsonPath().getInt("data");
Assert.assertNotNull(result,network.message(params,BasicConfig.WORK_MNG_importOtoCustomer,"启动导入客户程序失败",response.body().asString()));
......@@ -689,6 +689,26 @@ public class Depts implements Authorization {
Assert.assertEquals(size,12,network.message(params,BasicConfig.WORK_findMySellerByFuzzyName,"问题详情为空",response.body().asString()));
}
@Test(description = "分配团队",priority = 48)
public void 分配团队(){
HashMap<String,Object> params = new HashMap<>();
params.put("customerId", cust_id);
params.put("deptId", 47);
params.put("pageSource", 2);
Response response = network.postResponse(params, BasicConfig.WORK_MNG_team);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.WORK_MNG_team, "客户分配团队失败", response.body().asString()));
HashMap<String,Object> selectParams = new HashMap<String,Object>();
selectParams.put("pageIndex", 1);
selectParams.put("pageSize", 10);
selectParams.put("phoneNum", "15136361301");
response = network.getResponse(selectParams,BasicConfig.WORK_MNG_customerList);
int deptId = response.jsonPath().getInt("data.list[0].deptId");
Assert.assertEquals(deptId,47,network.message(selectParams, BasicConfig.WORK_MNG_customerList, "客户所属团队错误", response.body().asString()));
}
public void dimissionStatus(int sellreid){
HashMap<String,Object> params = new HashMap<>();
params.put("id", sellreid);
......
......@@ -128,6 +128,7 @@ public class Invite implements Authorization {
@Test(description = "查看约面日历为已确认",priority = 9)
public void 查看约面日历为已确认(){
getCalendarlist(today+86400000,2,"自动化激活用户","勿动-自动化测试邀约");
Assert.assertEquals(recordItem.deptId, 47,network.message(BasicConfig.WORK_getAllSceneConfs,"面访场景包含场景未根据产品组关联",""));
}
......
......@@ -775,7 +775,7 @@ public class Phone implements Authorization {
@Test(description = "删除客户",priority = 90)
public void 删除客户(){
int id= cust_id;
for(int i = id-1;i<id+10;i++){
for(int i = id-1;i<id+13;i++){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", i);
Response response = network.postResponse(params,BasicConfig.WORK_delCust);
......
......@@ -312,6 +312,7 @@ public class BasicConfig {
public static final String WORK_MNG_searchSeller = WORK_HOST + "/kjy/oto/mng/pub/form/customer/searchSeller";
public static final String WORK_MNG_custName = WORK_HOST + "/kjy/oto/mng/pub/form/customer/fuzzy/custName";
public static final String WORK_MNG_qaDetail = WORK_HOST + "/kjy/oto/mng/pub/form/customer/qaDetail";
public static final String WORK_MNG_team = WORK_HOST + "/kjy/oto/manager/customer/assign/dept/team";
//*************************成员管理****************************
public static final String WORK_MNG_sellerList = WORK_HOST + "/kjy/oto/mng/seller/list";
......@@ -353,6 +354,7 @@ public class BasicConfig {
public static final String WX_deptList = WX_HOST + "/oto/seller/dept/minimum/list";
public static final String WX_searchCust = WX_HOST + "/oto/seller/submitRecord/searchCust";
public static final String WX_submitRecord = WX_HOST + "/oto/seller/submitRecord/submit";
public static final String WX_saveIntroduce= WX_HOST + "/oto/customer/introduce/save";
//*************************销售工作台企微端**********************
public static final String PHONE_getCustPhase = WORK_HOST + "/kjy/oto/manager/customer/getCustPhase";
......
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