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

Merge branch 'Feature/acitityAndOa_20230417' into 'master'

Feature/acitity and oa 20230417

See merge request !89
parents 34b4b4a2 42643df2
......@@ -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;
......
......@@ -149,6 +149,12 @@ public class Activity implements Authorization {
sleep(2000);
updateInvite(1,now + 3600000,cust_id+2);
abandonCust(cust_id+3);//自动化客户4
sleep(2000);
assignSeller(cust_id+3,INVITE_ID,true,1,"crm");
sleep(2000);
updateInvite(1,now + 3600000,cust_id+2);
otoAssistAuth();
getCalendarlist(today,0,"自动化测试用户2","勿动-自动化测试邀约");
getCalendarlist(today,2,"自动化测试用户0","勿动-自动化测试邀约");
......@@ -181,6 +187,13 @@ public class Activity implements Authorization {
response =network.postResponse(params,BasicConfig.WORK_calendar_nowAssign);
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_nowAssign,"立即分配失败",response.body().asString()));
//立即分配客户4
getCalendarlist(today,2,"自动化测试用户4","勿动-自动化测试邀约");
params.put("recordId",recordItem.recordId);
response =network.postResponse(params,BasicConfig.WORK_calendar_nowAssign);
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_calendar_nowAssign,"立即分配失败",response.body().asString()));
}
......@@ -188,7 +201,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 +213,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()));
......@@ -222,7 +235,7 @@ public class Activity implements Authorization {
int size = response.jsonPath().getInt("data.list[0].custList.size");
int configId = response.jsonPath().getInt("data.list[0].configId");
Assert.assertEquals(configId,440,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动的见面场景错误",response.body().asString()));
Assert.assertEquals(size,3,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动量数错误",response.body().asString()));
Assert.assertEquals(size,4,network.message(params,BasicConfig.WX_submitRecordDetail,"签到活动量数错误",response.body().asString()));
int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus");
int signStatus1 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus");
int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus");
......@@ -257,6 +270,25 @@ public class Activity implements Authorization {
sellerSubmitRecord(0,2);
}
@Test(description = "专家确认客户未到场",priority = 13)
public void 专家确认客户未到场(){
HashMap<String,Object> params = new HashMap<>();
params.put("date", today);
params.put("custId", IdMakeUtil.encodingId((long)cust_id+3));
params.put("configId", 440);
params.put("status", 1);
params.put("timeInterval", "am");
Response response = network.postResponse(params, BasicConfig.WX_checkSign);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WX_checkSign,"确认客户未到场失败",response.body().asString()));
sellerSubmitRecord(0,2);
//查询今日到场状态变为未到场
response = network.postResponse(params, BasicConfig.WX_submitRecordDetail);
int signStatus = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus");
Assert.assertEquals(signStatus,0,network.message(params,BasicConfig.WX_submitRecordDetail,"已签到的签到状态非【未到场】",response.body().asString()));
}
@Test(description = "专家查看提报可选择的其他见面场景",priority = 14)
public void 专家查看提报可选择的其他见面场景(){
HashMap<String,Object> params = new HashMap<>();
......@@ -350,13 +382,15 @@ public class Activity implements Authorization {
int size = response.jsonPath().getInt("data.list[0].custList.size");
int configId = response.jsonPath().getInt("data.list[0].configId");
Assert.assertEquals(configId, 440, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动的见面场景错误", response.body().asString()));
Assert.assertEquals(size, 3, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动量数错误", response.body().asString()));
Assert.assertEquals(size, 4, network.message(params, BasicConfig.WX_submitRecordDetail, "签到活动量数错误", response.body().asString()));
int signStatus0 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus");
int signStatus1 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus");
int signStatus2 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus");
int signStatus3 = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus");
Assert.assertEquals(signStatus0, 1, network.message(params, BasicConfig.WX_submitRecordDetail, "已到场的签到状态非【已到场】", response.body().asString()));
Assert.assertEquals(signStatus1, 0, network.message(params, BasicConfig.WX_submitRecordDetail, "已鸽的签到状态非【未到场】", response.body().asString()));
Assert.assertEquals(signStatus2, 2, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【已签到】", response.body().asString()));
Assert.assertEquals(signStatus3, 0, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【未到场】", response.body().asString()));
}
@Test(description = "总监查看专家今日非签到活动场景",priority = 22)
......@@ -373,10 +407,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