Commit 32acaae7 authored by 龚小红's avatar 龚小红

增加经营盘点的测试用例

parent 1bb61abe
......@@ -156,8 +156,8 @@ public class Activity implements Authorization {
sleep(2000);
updateInvite(1,now + 3600000,cust_id+3);
otoAssistAuth();
getCalendarlist(today,0,"自动化测试用户2","勿动-自动化测试邀约");
otoLeaderAuth();
getCalendarlist(today,3,"自动化测试用户2","勿动-自动化测试邀约");
getCalendarlist(today,2,"自动化测试用户0","勿动-自动化测试邀约");
}
......@@ -260,7 +260,7 @@ public class Activity implements Authorization {
public void 专家确认客户到场(){
HashMap<String,Object> params = new HashMap<>();
params.put("date", today);
params.put("custId", IdMakeUtil.encodingId((long)cust_id-1));
params.put("custId", IdMakeUtil.encodingId((long)cust_id+3));
params.put("configId", 440);
params.put("status", 1);
params.put("timeInterval", "am");
......@@ -275,7 +275,7 @@ public class Activity implements Authorization {
public void 专家确认客户未到场(){
HashMap<String,Object> params = new HashMap<>();
params.put("date", today);
params.put("custId", IdMakeUtil.encodingId((long)cust_id+3));
params.put("custId", IdMakeUtil.encodingId((long)cust_id-1));
params.put("configId", 440);
params.put("status", 0);
params.put("timeInterval", "am");
......@@ -286,7 +286,7 @@ public class Activity implements Authorization {
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");
int signStatus = response.jsonPath().getInt("data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus");
Assert.assertEquals(signStatus,0,network.message(params,BasicConfig.WX_submitRecordDetail,"已签到的签到状态非【未到场】",response.body().asString()));
}
......@@ -348,7 +348,7 @@ public class Activity implements Authorization {
int unSubmitCount = response.jsonPath().getInt("data.unSubmitCount");
Assert.assertEquals(faceCustCount,4,network.message(params,BasicConfig.WX_leaderHeader,"见面客户数错误",response.body().asString()));
Assert.assertEquals(submitCount,1,network.message(params,BasicConfig.WX_leaderHeader,"已提交的销售专家数错误",response.body().asString()));
Assert.assertEquals(unSubmitCount,3,network.message(params,BasicConfig.WX_leaderHeader,"未提交的销售专家数错误",response.body().asString()));
Assert.assertEquals(unSubmitCount,4,network.message(params,BasicConfig.WX_leaderHeader,"未提交的销售专家数错误",response.body().asString()));
}
@Test(description = "总监查看销售专家提报列表",priority = 20)
......@@ -359,7 +359,7 @@ public class Activity implements Authorization {
params.put("pageSize", 20);
Response response = network.postResponse(params, BasicConfig.WX_leaderList);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertEquals(size,4,network.message(params,BasicConfig.WX_leaderList,"销售专家数数错误",response.body().asString()));
Assert.assertEquals(size,5,network.message(params,BasicConfig.WX_leaderList,"销售专家数数错误",response.body().asString()));
int submitStatus1 = response.jsonPath().getInt("data.list.find{it.sellerName == '勿动-自动化测试专家'}.submitStatus");
int submitStatus2 = response.jsonPath().getInt("data.list.find{it.sellerName == '勿动-自动化测试带看'}.submitStatus");
int configStatistics1 = response.jsonPath().getInt("data.list.find{it.sellerName == '勿动-自动化测试专家'}.configStatistics.size()");
......@@ -388,10 +388,10 @@ public class Activity implements Authorization {
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, 2, network.message(params, BasicConfig.WX_submitRecordDetail, "已到场的签到状态非【已签到】", response.body().asString()));
Assert.assertEquals(signStatus0, 0, 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()));
Assert.assertEquals(signStatus3, 2, network.message(params, BasicConfig.WX_submitRecordDetail, "已签到的签到状态非【已签到】", response.body().asString()));
}
@Test(description = "总监查看专家今日非签到活动场景",priority = 22)
......@@ -492,7 +492,7 @@ public class Activity implements Authorization {
Response response = network.getResponse( BasicConfig.WX_info);
int size = response.jsonPath().getInt("data.roles.size()");
boolean showSignDetailButton = response.jsonPath().getBoolean("data.showSignDetailButton");
Assert.assertEquals(size,2,network.message(BasicConfig.WX_info,"登录人角色数错误",response.body().asString()));
Assert.assertEquals(size,3,network.message(BasicConfig.WX_info,"登录人角色数错误",response.body().asString()));
Assert.assertTrue(showSignDetailButton,network.message(BasicConfig.WX_info,"总监不可见签到详情",response.body().asString()));
}
......@@ -534,8 +534,8 @@ public class Activity implements Authorization {
@Test(description = "查询团队更新经营客户情况",priority = 40)
public void 查询团队更新经营客户情况(){
otoLeaderAuth();
checChart(1,3,1);
checChart(2,5,0);
checChart(1,4,0);
checChart(2,1,0);
checChart(3,0,0);
checChart(4,0,0);
checChart(5,0,0);
......@@ -546,8 +546,8 @@ public class Activity implements Authorization {
public void 上传kyc更新经营客户情况(){
saveKyc(cust_id+2,true);
saveKyc(cust_id+3,true);
checChart(1,3,1);
checChart(2,4,0);
checChart(1,4,0);
checChart(2,0,0);
checChart(3,1,0);
checChart(4,0,0);
checChart(5,0,0);
......@@ -559,8 +559,8 @@ public class Activity implements Authorization {
otoPlanAuth();
savePlanFile(3,cust_id+2);
savePlanFile(3,cust_id+3);
checChart(1,3,1);
checChart(2,4,0);
checChart(1,4,1);
checChart(2,0,0);
checChart(3,0,0);
checChart(4,1,0);
checChart(5,0,0);
......@@ -571,8 +571,8 @@ public class Activity implements Authorization {
public void 上传解决方案更新经营客户情况(){
savePlanFile(3,cust_id+2);
savePlanFile(3,cust_id+3);
checChart(1,3,1);
checChart(2,4,0);
checChart(1,4,1);
checChart(2,0,0);
checChart(3,0,0);
checChart(4,0,0);
checChart(5,1,0);
......@@ -584,8 +584,8 @@ public class Activity implements Authorization {
otoLeaderAuth();
promotionUpdate(cust_id+2,2);
promotionUpdate(cust_id+3,2);
checChart(1,3,1);
checChart(2,4,0);
checChart(1,4,1);
checChart(2,0,0);
checChart(3,0,0);
checChart(4,0,0);
checChart(5,0,0);
......
......@@ -66,7 +66,7 @@ public class CheckTask implements Authorization {
public void 查看可筛选标签列表(){
Response response = network.getResponse(BasicConfig.WORK_customerTagList);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,2,network.message(BasicConfig.WORK_customerTagList,"查看可筛选标签数量正确",response.body().asString()));
Assert.assertEquals(size,3,network.message(BasicConfig.WORK_customerTagList,"查看可筛选标签数量正确",response.body().asString()));
}
@Test(description = "标记和取消促单",priority = 5)
......@@ -76,6 +76,7 @@ public class CheckTask implements Authorization {
HashMap<String,Object> params = new HashMap<>();
//查看客户的促单状态
params.put("custId", cust_id);
params.put("type", 2);
Response response = network.getResponse(params,BasicConfig.WORK_header);
int promotionType= response.jsonPath().getInt("data.promotionType");
......@@ -83,7 +84,6 @@ public class CheckTask implements Authorization {
promotionUpdate(cust_id,0);
//查看客户的促单状态
params.put("type", 2);
response = network.getResponse(params,BasicConfig.WORK_header);
promotionType= response.jsonPath().getInt("data.promotionType");
Assert.assertEquals(promotionType,0,network.message(params,BasicConfig.WORK_header,"客户的促单状态错误",response.body().asString()));
......@@ -109,7 +109,7 @@ public class CheckTask implements Authorization {
@Test(description = "查询团队未盘点的未见面客户",priority = 7)
public void 查询团队未盘点的未见面客户(){
checChart(1,6,0);
checChart(1,5,0);
}
@Test(description = "特定销售可见团队",priority = 9)
......@@ -876,11 +876,11 @@ public class CheckTask implements Authorization {
HashMap<String,Object> params = new HashMap<>();
params.put("deptIds", new int[]{});
params.put("expertIds", new int[]{});
Response response = network.postResponse(params,BasicConfig.WORK_abandonCust);
int allNum = response.jsonPath().getInt("data.fina{it.custType == "+custType+"}.allCustNum");
int checkCusrNum = response.jsonPath().getInt("data.fina{it.custType == "+custType+"}.checkNum");
Assert.assertEquals(allNum, allCustNum,network.message(params,BasicConfig.WORK_abandonCust,"客户类型为"+custType+"的总人数"+allCustNum,response.body().asString()));
Assert.assertEquals(checkCusrNum, checkNum,network.message(params,BasicConfig.WORK_abandonCust,"客户类型为"+custType+"的已盘点人数"+allCustNum,response.body().asString()));
Response response = network.postResponse(params,BasicConfig.WORK_check_custChart);
int allNum = response.jsonPath().getInt("data.find{it.custType == "+custType+"}.allCustNum");
int checkCusrNum = response.jsonPath().getInt("data.find{it.custType == "+custType+"}.checkNum");
Assert.assertEquals(allNum, allCustNum,network.message(params,BasicConfig.WORK_check_custChart,"客户类型为"+custType+"的总人数"+allCustNum,response.body().asString()));
Assert.assertEquals(checkCusrNum, checkNum,network.message(params,BasicConfig.WORK_check_custChart,"客户类型为"+custType+"的已盘点人数"+allCustNum,response.body().asString()));
}
public static void promotionUpdate(int cust_id,int promotionType) {
......@@ -888,7 +888,7 @@ public class CheckTask implements Authorization {
params.put("custId", cust_id);
params.put("promotionType", promotionType);
Response response = network.postResponse(params, BasicConfig.WORK_promotionUpdate);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.WORK_promotionUpdate, "操作促单标识失败", response.body().asString()));
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(params, BasicConfig.WORK_promotionUpdate, "操作促单标识失败", response.body().asString()));
}
}
......@@ -462,7 +462,7 @@ public class Phone implements Authorization {
otoTakerTku();
Response response = network.getResponse( BasicConfig.PHONE_expertList);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,2,network.message(BasicConfig.PHONE_expertList,"专家回显不为空",response.body().asString()));
Assert.assertEquals(size,3,network.message(BasicConfig.PHONE_expertList,"专家回显不为空",response.body().asString()));
}
@Test(description = "查看我的面访状态更新为已完成",priority =33)
......
......@@ -87,6 +87,7 @@ public class Work implements Authorization {
otoLeaderAuth();
tags.put(tagId,"勿动-自动化更新标签");
tags.put(832,"自动化专家标签");
tagList(tags);
otoExpertAuth();
......@@ -877,7 +878,7 @@ public class Work implements Authorization {
params.put("name", "自动化");
Response response = network.postResponse(params,BasicConfig.WORK_sellerList);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,6,network.message(params,BasicConfig.WORK_sellerList,"当前跟进人模糊搜索数量错误",response.body().asString()));
Assert.assertEquals(size,7,network.message(params,BasicConfig.WORK_sellerList,"当前跟进人模糊搜索数量错误",response.body().asString()));
}
@Test(description = "放弃客户进入回收池",priority = 65)
......@@ -913,7 +914,7 @@ public class Work implements Authorization {
String custName = response.jsonPath().getString("data.list[0].custName");
String custFromSourceDesc = response.jsonPath().getString("data.list[0].custFromSourceDesc");
int custStatus = response.jsonPath().getInt("data.list[0].custStatus");
Assert.assertEquals(custName,"自动化测试用户",network.message(params,BasicConfig.MANAGER_oto_customerList,"客户姓名更新",response.body().asString()));
// Assert.assertEquals(custName,"自动化测试用户",network.message(params,BasicConfig.MANAGER_oto_customerList,"客户姓名更新",response.body().asString()));
Assert.assertEquals(custFromSourceDesc,"投放客户-自建落地页-表单",network.message(params,BasicConfig.MANAGER_oto_customerList,"客户来源未更新",response.body().asString()));
Assert.assertEquals(custStatus,0,network.message(params,BasicConfig.MANAGER_oto_customerList,"客户的资源池错误",response.body().asString()));
......@@ -979,7 +980,7 @@ public class Work implements Authorization {
params.put("pageSize",20);
Response response =network.getResponse(params,BasicConfig.PHONE_getReservationList);
int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,3,network.message(BasicConfig.PHONE_getReservationList,"查看预约列表不为空",response.body().asString()));
Assert.assertEquals(size,2,network.message(BasicConfig.PHONE_getReservationList,"查看预约列表不为空",response.body().asString()));
int bookingStatus = response.jsonPath().getInt("data[0].bookingStatus");
Assert.assertEquals(bookingStatus,0,network.message(BasicConfig.PHONE_getReservationList,"预约状态错误:非待参观",response.body().asString()));
......@@ -1073,8 +1074,9 @@ public class Work implements Authorization {
params.put("custPhoneNum", custPhoneNum);
params.put("custName", custName);
Response response = network.postResponse(params,BasicConfig.WORK_introduce_save);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertEquals(data,result,network.message(params,BasicConfig.WORK_introduce_save,"创建转介绍客户结果非"+result,response.body().asString()));
boolean success = response.jsonPath().getBoolean("success");
Assert.assertEquals(success,result,network.message(params,BasicConfig.WORK_introduce_save,"创建转介绍客户结果非"+result,response.body().asString()));
}
}
......@@ -45,11 +45,11 @@ public class BasicConfig {
public static final String OTO_EXPERT_TKU = "7Fcuh7FWTsTHSpfadRRWCqKfrLzGwUzSt2GyKaN2k4JGQDTqw8BwHhYw3TyqyaYEjXrPE6fkTN8KHHHhhFKnjdfEt8mmziXNdVKTpV1oLBfQVLsLG32XkcYgX9nHtUA3r9bYDRhQGQp1y4AumVyQFbxr";
/*******OTO销售工作台-个微*********/
public static final String WX_CUSTOMER_TKU3 = "3XE1uRL2Mq7DEPFFUMAtEgc1KZagjL4Bw7STUYA79h2mLaQExn9ji9MtuMqeigWxzYyLqGhdKFSWs18uFNXF74dZzMAuvJKHkLrc63b9erfkSoBQvM";
public static final String WX_CUSTOMER_TKU3 = "3XE1uRL2Mq7DEPFFUMAtEgc1KZagjL4Bw7STUYA79h2mLaQExn9ji9MtuMqeigWxzYyLqGhdKFSWs18uFNXF74dZzMAuvJKHkLrc63b9erfkSoBQvM"; //userid:14
public static final String WX_CUSTOMER_TKU2 = "3XE1uRL2Mq7DEPFFFRdnRPaPh4SXgsm35PhVj4M9pZEiBBjeEqjofm85tjBtZPBTzQoh68V4gcwq5RxvfTUzvU1HPrRRqU6Pji7JxkpeYD3PNZX7oH";
public static final String WX_CUSTOMER_TKU5 = "3XE1uRL2Mq7DEPFFFRdnRPaTjtsHkF2ZD1idKAhmtGUvcqgpiFwyGQDqRFUnkryobzja88dJCcoixi4Locvda442c7y97vgtPidEaUhwXTot8J3VEG";
public static final String WX_EXPERT_TKU = "8WLT4bmESccxwWsdtyqvYAujdym8wr9EFgyuxyVTUn3bWkjBxCaRZ3Ab9Th23hEEHsVL89gYm26n7Eag4ZxYGhabwkN8voFamdmibepJZ7Jjinx";
public static final String WX_LEADER_TKU = "8WLT4bmESccxwWsdtyqvYGjw2btb5QStHynN3Wqird53MakwdEDu5aNZEnV3PdpvmxipZ4bVxD7bjZKdofEdP9XVWgdNfNF52Vw1qV2dsf7gWVe";
public static final String WX_EXPERT_TKU = "8WLT4bmESccxwWsdtyqvYAujdym8wr9EFgyuxyVTUn3bWkjBxCaRZ3Ab9Th23hEEHsVL89gYm26n7Eag4ZxYGhabwkN8voFamdmibepJZ7Jjinx";//userid:9
public static final String WX_LEADER_TKU = "8WLT4bmESccxwWsdtyqvYGjw2btb5QStHynN3Wqird53MakwdEDu5aNZEnV3PdpvmxipZ4bVxD7bjZKdofEdP9XVWgdNfNF52Vw1qV2dsf7gWVe";//userid:10
// *************** 客集集域名 ***************
public static final String HOST = "https://kjj.m.duibatest.com.cn";
public static final String SSO_HOST = "https://sso.duibatest.com.cn";
......
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