Commit 44fd5c44 authored by 龚小红's avatar 龚小红

增加绑定企微、导入外部客户、全部客户列表的接口用例

parent 6d6c3c52
......@@ -883,15 +883,62 @@ public class Manager implements Authorization {
response = network.getResponse(params,BasicConfig.MANAGER_oto_customerList);
int companySize = response.jsonPath().getInt("data.list[0].companyIds.size()");
Assert.assertEquals(companySize,2,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的产品组错误",response.body().asString()));
}
@Test(description = "查询所有产品列表",priority = 57)
public void 查询所有产品列表(){
Response response =network.getResponse(BasicConfig.MANAGER_product_listAll);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_product_listAll,"查看产品列表不为空",response.body().asString()));
Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_product_listAll,"查看产品列表为空",response.body().asString()));
}
@Test(description = "查询可导入的客户来源列表",priority = 58)
public void 查询可导入的客户来源列表(){
Response response =network.getResponse(BasicConfig.MANAGER_getCustSourceEnum);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,3 ,network.message(BasicConfig.MANAGER_getCustSourceEnum,"查看可导入的客户来源列表",response.body().asString()));
}
@Test(description = "导入客户文件并成功",priority = 59)
public void 导入客户文件(){
HashMap<String,Object> params = new HashMap<>();
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");
Response response =network.postResponse(params,BasicConfig.MANAGER_importOtoCustomer);
int result = response.jsonPath().getInt("data");
Assert.assertNotNull(result,network.message(params,BasicConfig.MANAGER_importOtoCustomer,"启动导入客户程序失败",response.body().asString()));
params.clear();
boolean succecss = false;
params.put("taskId",result);
for (int i = 0;i<10;i++){
sleep(1000);
response =network.getResponse(params,BasicConfig.MANAGER_result);
boolean hasFinish = response.jsonPath().getBoolean("data.hasFinish");
if(hasFinish) {
String failureExcelUrl = response.jsonPath().getString("data.failureExcelUrl");
int successCount = response.jsonPath().getInt("data.successCount");
Assert.assertNotNull(failureExcelUrl, network.message(params, BasicConfig.MANAGER_result, "失败原因链接不为空", response.body().asString()));
Assert.assertEquals(successCount, 1,network.message(params, BasicConfig.MANAGER_result, "导入成功数量不为1", response.body().asString()));
succecss = true;
break;
}
}
Assert.assertTrue(succecss,network.message(params,BasicConfig.MANAGER_result,"导入客户结果失败",response.body().asString()));
}
@Test(description = "查询导入的文件上传记录",priority = 60)
public void 查询导入的文件上传记录(){
HashMap<String,Object> params = new HashMap<>();
params.put("taskType", 34);
params.put("pageIndex", 1);
params.put("pageSize", 5);
Response response =network.getResponse(params,BasicConfig.MANAGER_listForType);
int size = response.jsonPath().getInt("data.size()");
Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_listForType,"查看导入文件上传记录不为空",response.body().asString()));
}
public int searchCustName(String custName){
......
......@@ -652,13 +652,13 @@ public class Phone implements Authorization {
Assert.assertEquals(size,0,network.message(params,BasicConfig.PHONE_interviewList,"邀约面访列表不为空",response.body().asString()));
}
@Test(description = "邀约查看历史备注包含面访备注",priority = 56)
public void 邀约查看历史备注包含面访备注(){
@Test(description = "邀约查看历史备注包含各种备注",priority = 56)
public void 邀约查看历史备注包含各种备注(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", IdMakeUtil.decodingId(cust_id));
Response response = network.getResponse(params, BasicConfig.WORK_historyRecord);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,5,network.message(params,BasicConfig.WORK_historyRecord,"邀约面访列表不为空",response.body().asString()));
Assert.assertEquals(size,7,network.message(params,BasicConfig.WORK_historyRecord,"邀约面访列表不为空",response.body().asString()));
}
@Test(description = "专家能查看关联自己的面访",priority = 57)
......@@ -675,7 +675,7 @@ public class Phone implements Authorization {
@Test(description = "删除客户",priority = 79)
public void 删除客户(){
long id= IdMakeUtil.decodingId(cust_id);
for(int i = (int)id;i<id+6;i++){
for(int i = (int)id;i<id+7;i++){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", i);
Response response = network.postResponse(params,BasicConfig.WORK_delCust);
......
......@@ -130,6 +130,10 @@ public class BasicConfig {
public static final String MANAGER_tagUpdate = MANAGER_HOST + "/kjy/manager/pub/form/customer/tag/update";
public static final String MANAGER_custName = MANAGER_HOST + "/kjy/manager/pub/form/customer/fuzzy/custName";
public static final String MANAGER_updateDealFlag = MANAGER_HOST + "/kjy/manager/pub/form/customer/updateDealFlag";
public static final String MANAGER_getCustSourceEnum = MANAGER_HOST + "/kjy/manager/pub/form/customer/import/getCustSourceEnum";
public static final String MANAGER_listForType = MANAGER_HOST + "/kjy/manager/live/import/listForType";
public static final String MANAGER_importOtoCustomer = MANAGER_HOST + "/kjy/manager/pub/form/importOtoCustomer";
public static final String MANAGER_result = MANAGER_HOST + "/kjy/manager/live/import/result";
//*************** OTO销售工作台 ***************
public static final String WORK_getCaptcha = WORK_HOST + "/kjy/oto/manager/auth/captcha";
......@@ -210,6 +214,11 @@ public class BasicConfig {
public static final String WORK_checkCustList = WORK_HOST + "/kjy/oto/manager/customer/check/custList";
public static final String WORK_checkList = WORK_HOST + "/kjy/oto/manager/customer/check/list";
public static final String WORK_historyRecord = WORK_HOST + "/kjy/oto/manager/customer/log/historyRecord";
public static final String WORK_inviterCustList = WORK_HOST + "/kjy/oto/manager/customer/invite/custList";
public static final String WORK_SellerCustList = WORK_HOST + "/kjy/oto/manager/customer/sellerOrExpert/custList";
public static final String WORK_sellerList = WORK_HOST + "/kjy/oto/manager/customer/role/sellerList";
public static final String WORK_getWxCustByName = WORK_HOST + "/kjy/oto/manager/customer/getWxCustByName";
public static final String WORK_bindWxCust = WORK_HOST + "/kjy/oto/manager/customer/bindWxCust";
//*************************客集集营销平台******************************
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
......
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