Commit 956c6264 authored by 龚小红's avatar 龚小红

Merge branch 'Feature/seller_plan' into 'master'

增加盘点计划回收和新平台销售的测试用例

See merge request !52
parents 10bb4ec3 45285156
...@@ -3,7 +3,7 @@ package com.oto.bean; ...@@ -3,7 +3,7 @@ package com.oto.bean;
import lombok.Data; import lombok.Data;
@Data @Data
public class invitationRecord { public class InvitationRecord {
public int recordId; public int recordId;
public String custName; public String custName;
public boolean hasAssignFlag; public boolean hasAssignFlag;
......
...@@ -5,7 +5,7 @@ import lombok.Data; ...@@ -5,7 +5,7 @@ import lombok.Data;
import java.util.List; import java.util.List;
@Data @Data
public class inviteDay { public class InviteDay {
public long calendarTime; public long calendarTime;
public List<invitationRecord> invitationInfo; public List<InvitationRecord> invitationInfo;
} }
package com.oto.bean;
import lombok.Data;
@Data
public class Plan {
public String planActionType;
public String actionTime;
public int actionSeller;
public Integer interviewSceneConfId;
public Plan(String planActionType, String actionTime, int actionSeller, Integer interviewSceneConfId) {
this.planActionType = planActionType;
this.actionTime = actionTime;
this.actionSeller = actionSeller;
this.interviewSceneConfId = interviewSceneConfId;
}
}
...@@ -83,6 +83,7 @@ public class Manager implements Authorization { ...@@ -83,6 +83,7 @@ public class Manager implements Authorization {
params.put("sellerLevel", 2); params.put("sellerLevel", 2);
params.put("workStatus", 1); params.put("workStatus", 1);
params.put("parentId", 28); params.put("parentId", 28);
params.put("thirdParty",new int[]{1,2});
System.out.println(JSONObject.toJSONString(params)); System.out.println(JSONObject.toJSONString(params));
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updateSeller); Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updateSeller);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
...@@ -106,6 +107,7 @@ public class Manager implements Authorization { ...@@ -106,6 +107,7 @@ public class Manager implements Authorization {
params.put("sellerLevel", 1); params.put("sellerLevel", 1);
params.put("roles", new int[]{5,}); params.put("roles", new int[]{5,});
params.put("parentId", LEADER_ID); params.put("parentId", LEADER_ID);
params.put("thirdParty",new int[]{1});
params.put("sellerName", "勿动-自动化测试邀约"); params.put("sellerName", "勿动-自动化测试邀约");
response = network.postResponse(params, BasicConfig.MANAGER_oto_updateSeller); response = network.postResponse(params, BasicConfig.MANAGER_oto_updateSeller);
data = response.jsonPath().getBoolean("data"); data = response.jsonPath().getBoolean("data");
...@@ -133,6 +135,7 @@ public class Manager implements Authorization { ...@@ -133,6 +135,7 @@ public class Manager implements Authorization {
params.put("workStatus", 1); params.put("workStatus", 1);
params.put("assignNewCustPermission", 1); params.put("assignNewCustPermission", 1);
params.put("assignRecycleCustPermission", 1); params.put("assignRecycleCustPermission", 1);
params.put("thirdParty",new int[]{1,2});
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_saveSeller); Response response = network.postResponse(params, BasicConfig.MANAGER_oto_saveSeller);
boolean success = response.jsonPath().getBoolean("success"); boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_saveSeller,"新增同一手机号销售成功",response.body().asString())); Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_saveSeller,"新增同一手机号销售成功",response.body().asString()));
...@@ -938,7 +941,40 @@ public class Manager implements Authorization { ...@@ -938,7 +941,40 @@ public class Manager implements Authorization {
params.put("pageSize", 5); params.put("pageSize", 5);
Response response =network.getResponse(params,BasicConfig.MANAGER_listForType); Response response =network.getResponse(params,BasicConfig.MANAGER_listForType);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_listForType,"查看导入文件上传记录不为空",response.body().asString())); Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_listForType,"查看导入文件上传记录为空",response.body().asString()));
}
@Test(description = "查询设备列表",priority = 61)
public void 查询设备列表(){
Response response =network.getResponse(BasicConfig.MANAGER_ykAvailableList);
int size = response.jsonPath().getInt("data.size()");
Assert.assertTrue(size>0 ,network.message(BasicConfig.MANAGER_ykAvailableList,"查看设备列表为空",response.body().asString()));
}
@Test(description = "绑定设备",priority = 62)
public void 绑定设备(){
HashMap<String,Object> params = new HashMap<>();
params.put("accountName", "imei4");
params.put("sellerId", SELLER_ID);
Response response =network.postResponse(params,BasicConfig.MANAGER_ykBind);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data ,network.message(BasicConfig.MANAGER_ykBind,"绑定设备失败",response.body().asString()));
}
@Test(description = "解绑设备",priority = 63)
public void 解绑设备(){
HashMap<String,Object> params = new HashMap<>();
params.put("sellerId", SELLER_ID);
Response response =network.postResponse(params,BasicConfig.MANAGER_ykUnbind);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data ,network.message(BasicConfig.MANAGER_ykUnbind,"解绑设备失败",response.body().asString()));
}
@Test(description = "刷新设备绑定情况",priority = 64)
public void 刷新设备绑定情况(){
Response response =network.postResponse(BasicConfig.MANAGER_ykSyncBind);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data ,network.message(BasicConfig.MANAGER_ykSyncBind,"刷新设备失败",response.body().asString()));
} }
public int searchCustName(String custName){ public int searchCustName(String custName){
......
...@@ -14,6 +14,8 @@ import org.testng.annotations.Test; ...@@ -14,6 +14,8 @@ import org.testng.annotations.Test;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.*; import java.util.*;
import static com.oto.cases.otoseller.Work.getSellerPlan;
import static com.oto.cases.otoseller.Work.planIds;
import static com.oto.utils.BaseUtils.*; import static com.oto.utils.BaseUtils.*;
import static com.oto.utils.ThreadSleepUtils.sleep; import static com.oto.utils.ThreadSleepUtils.sleep;
//手机端 //手机端
...@@ -246,12 +248,12 @@ public class Phone implements Authorization { ...@@ -246,12 +248,12 @@ public class Phone implements Authorization {
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("id", interviewIds.get(0)); params.put("id", interviewIds.get(0));
Response response = network.getResponse(params, BasicConfig.PHONE_custExtDetail); Response response = network.getResponse(params, BasicConfig.PHONE_custExtDetail);
int followWeight = response.jsonPath().getInt("data.followWeight"); String followWeight = response.jsonPath().getString("data.followWeight");
String interviewAddress = response.jsonPath().getString("data.interviewAddress"); String interviewAddress = response.jsonPath().getString("data.interviewAddress");
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag"); int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag");
String giveProspectusFlag = response.jsonPath().getString("data.giveProspectusFlag"); String giveProspectusFlag = response.jsonPath().getString("data.giveProspectusFlag");
String expertName = response.jsonPath().getString("data.expertName"); String expertName = response.jsonPath().getString("data.expertName");
Assert.assertEquals(followWeight,1,network.message(params,BasicConfig.PHONE_custExtDetail,"客户权重回显不为1",response.body().asString())); Assert.assertNull(followWeight,network.message(params,BasicConfig.PHONE_custExtDetail,"客户权重回显不为1",response.body().asString()));
Assert.assertNotNull(interviewAddress,network.message(params,BasicConfig.PHONE_custExtDetail,"客户地址回显为空",response.body().asString())); Assert.assertNotNull(interviewAddress,network.message(params,BasicConfig.PHONE_custExtDetail,"客户地址回显为空",response.body().asString()));
Assert.assertNull(giveProspectusFlag,network.message(params,BasicConfig.PHONE_custExtDetail,"是否可送计划书回显不为空",response.body().asString())); Assert.assertNull(giveProspectusFlag,network.message(params,BasicConfig.PHONE_custExtDetail,"是否可送计划书回显不为空",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_custExtDetail,"是否已送计划书回显不为否",response.body().asString())); Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_custExtDetail,"是否已送计划书回显不为否",response.body().asString()));
...@@ -398,11 +400,11 @@ public class Phone implements Authorization { ...@@ -398,11 +400,11 @@ public class Phone implements Authorization {
Response response = network.getResponse(params, BasicConfig.PHONE_custExtDetail); Response response = network.getResponse(params, BasicConfig.PHONE_custExtDetail);
String interviewAddress = response.jsonPath().getString("data.interviewAddress"); String interviewAddress = response.jsonPath().getString("data.interviewAddress");
int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag"); int commitPlanFlag = response.jsonPath().getInt("data.commitPlanFlag");
int followWeight = response.jsonPath().getInt("data.followWeight"); String followWeight = response.jsonPath().getString("data.followWeight");
String giveProspectusFlag = response.jsonPath().getString("data.giveProspectusFlag"); String giveProspectusFlag = response.jsonPath().getString("data.giveProspectusFlag");
String expertName = response.jsonPath().getString("data.expertName"); String expertName = response.jsonPath().getString("data.expertName");
Assert.assertNotNull(interviewAddress,network.message(params,BasicConfig.PHONE_custExtDetail,"客户地址回显不为空",response.body().asString())); Assert.assertNotNull(interviewAddress,network.message(params,BasicConfig.PHONE_custExtDetail,"客户地址回显不为空",response.body().asString()));
Assert.assertNotNull(followWeight,network.message(params,BasicConfig.PHONE_custExtDetail,"客户等级回显不为1",response.body().asString())); Assert.assertNull(followWeight,network.message(params,BasicConfig.PHONE_custExtDetail,"客户等级回显不为1",response.body().asString()));
Assert.assertNull(giveProspectusFlag,network.message(params,BasicConfig.PHONE_custExtDetail,"是否可送计划书不为空",response.body().asString())); Assert.assertNull(giveProspectusFlag,network.message(params,BasicConfig.PHONE_custExtDetail,"是否可送计划书不为空",response.body().asString()));
Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_custExtDetail,"是否已送计划书不为否",response.body().asString())); Assert.assertEquals(commitPlanFlag,0,network.message(params,BasicConfig.PHONE_custExtDetail,"是否已送计划书不为否",response.body().asString()));
Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.PHONE_custExtDetail,"专家回显错误,非【勿动-自动化测试专家】",response.body().asString())); Assert.assertEquals(expertName,"勿动-自动化测试专家",network.message(params,BasicConfig.PHONE_custExtDetail,"专家回显错误,非【勿动-自动化测试专家】",response.body().asString()));
...@@ -658,7 +660,7 @@ public class Phone implements Authorization { ...@@ -658,7 +660,7 @@ public class Phone implements Authorization {
params.put("custId", IdMakeUtil.decodingId(cust_id)); params.put("custId", IdMakeUtil.decodingId(cust_id));
Response response = network.getResponse(params, BasicConfig.WORK_historyRecord); Response response = network.getResponse(params, BasicConfig.WORK_historyRecord);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,7,network.message(params,BasicConfig.WORK_historyRecord,"邀约面访列表不为空",response.body().asString())); Assert.assertEquals(size,6,network.message(params,BasicConfig.WORK_historyRecord,"邀约面访列表不为空",response.body().asString()));
} }
@Test(description = "专家能查看关联自己的面访",priority = 57) @Test(description = "专家能查看关联自己的面访",priority = 57)
...@@ -672,6 +674,19 @@ public class Phone implements Authorization { ...@@ -672,6 +674,19 @@ public class Phone implements Authorization {
Assert.assertEquals(size,1,network.message(params,BasicConfig.PHONE_interviewList,"专家面访列表为空",response.body().asString())); Assert.assertEquals(size,1,network.message(params,BasicConfig.PHONE_interviewList,"专家面访列表为空",response.body().asString()));
} }
@Test(description = "上传面访后完成见面计划",priority = 58)
public void 上传面访后完成见面计划(){
otoTakerAuth();
HashMap<String,Object> params = new HashMap<>();
params.put("ids", planIds);
Response response = network.getResponse(params,BasicConfig.WORK_getPlanDetail);
int phoneStatus = response.jsonPath().getInt("data.meets[0].planStatus");
Assert.assertEquals(phoneStatus,2,network.message(params,BasicConfig.WORK_getPlanDetail,"见面计划状态非已完成",response.body().asString()));
params.clear();
getSellerPlan(1,1,1,1,2,0);
}
@Test(description = "删除客户",priority = 79) @Test(description = "删除客户",priority = 79)
public void 删除客户(){ public void 删除客户(){
long id= IdMakeUtil.decodingId(cust_id); long id= IdMakeUtil.decodingId(cust_id);
......
...@@ -134,6 +134,10 @@ public class BasicConfig { ...@@ -134,6 +134,10 @@ public class BasicConfig {
public static final String MANAGER_listForType = MANAGER_HOST + "/kjy/manager/live/import/listForType"; 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_importOtoCustomer = MANAGER_HOST + "/kjy/manager/pub/form/importOtoCustomer";
public static final String MANAGER_result = MANAGER_HOST + "/kjy/manager/live/import/result"; public static final String MANAGER_result = MANAGER_HOST + "/kjy/manager/live/import/result";
public static final String MANAGER_ykAvailableList = MANAGER_HOST + "/kjy/manager/oto/seller/account/yk/availableList";
public static final String MANAGER_ykBind = MANAGER_HOST + "/kjy/manager/oto/seller/account/yk/bind";
public static final String MANAGER_ykUnbind = MANAGER_HOST + "/kjy/manager/oto/seller/account/yk/unbind";
public static final String MANAGER_ykSyncBind = MANAGER_HOST + "/kjy/manager/oto/seller/account/yk/syncBind";
//*************** OTO销售工作台 *************** //*************** OTO销售工作台 ***************
public static final String WORK_getCaptcha = WORK_HOST + "/kjy/oto/manager/auth/captcha"; public static final String WORK_getCaptcha = WORK_HOST + "/kjy/oto/manager/auth/captcha";
...@@ -220,6 +224,12 @@ public class BasicConfig { ...@@ -220,6 +224,12 @@ public class BasicConfig {
public static final String WORK_getWxCustByName = WORK_HOST + "/kjy/oto/manager/customer/getWxCustByName"; 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 WORK_bindWxCust = WORK_HOST + "/kjy/oto/manager/customer/bindWxCust";
public static final String WORK_updateFollowUp = WORK_HOST + "/kjy/oto/manager/customer/updateFollowUp"; public static final String WORK_updateFollowUp = WORK_HOST + "/kjy/oto/manager/customer/updateFollowUp";
public static final String WORK_getFollowInfo = WORK_HOST + "/kjy/oto/manager/customer/getFollowInfo";
public static final String WORK_getSellerPlanCalendarList = WORK_HOST + "/kjy/oto/manager/customer/getSellerPlanCalendarList";
public static final String WORK_getDirectorPlanCalendarList = WORK_HOST + "/kjy/oto/manager/customer/getDirectorPlanCalendarList";
public static final String WORK_getPlanDetail = WORK_HOST + "/kjy/oto/manager/customer/getPlanDetail";
public static final String WORK_getPlanList = WORK_HOST + "/kjy/oto/manager/customer/getPlanList";
public static final String WORK_callSubmit = WORK_HOST + "/kjy/oto/manager/customer/call/cust/info/submit";
//*************************客集集营销平台****************************** //*************************客集集营销平台******************************
public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser"; public static final String PHONE_bindWxUser = HOST + "/kjy/oto/interview/bindWxUser";
...@@ -265,7 +275,7 @@ public class BasicConfig { ...@@ -265,7 +275,7 @@ public class BasicConfig {
public static final String WORK_verifyCode = WORK_HOST + "/kjy/oto/auto/test/verifyCode"; public static final String WORK_verifyCode = WORK_HOST + "/kjy/oto/auto/test/verifyCode";
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust"; public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust";
public static final String WORK_delPubFormRecord = WORK_HOST + "/kjy/oto/auto/test/delPubFormRecord"; public static final String WORK_delPubFormRecord = WORK_HOST + "/kjy/oto/auto/test/delPubFormRecord";
public static final String CALL_BACK_1 = WORK_HOST + "/kjy/oto/notify/record?CallSheetID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallType=dialout&CallNo=18248405155&CalledNo="; public static final String CALL_BACK_1 = WORK_HOST + "/kjy/oto/notify/record?CallSheetID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallType=dialout&CallNo=";
public static final String CALL_BACK_2 = "&Ring=2022-11-07%2013:57:06&RingingTime=&Begin=2022-11-07%2013:57:14&End=2022-11-07%2013:57:28&CallTimeLength="; public static final String CALL_BACK_2 = "&Ring=2022-11-07%2013:57:06&RingingTime=&Begin=2022-11-07%2013:57:14&End=2022-11-07%2013:57:28&CallTimeLength=";
public static final String CALL_BACK_3 = "&MonitorFilename=http://work-phone-record.oss-cn-beijing.aliyuncs.com/20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&RecordFile=20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&FileServer=http://work-phone-record.oss-cn-beijing.aliyuncs.com/&ring=2022-11-07%2013:57:06"; public static final String CALL_BACK_3 = "&MonitorFilename=http://work-phone-record.oss-cn-beijing.aliyuncs.com/20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&RecordFile=20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&FileServer=http://work-phone-record.oss-cn-beijing.aliyuncs.com/&ring=2022-11-07%2013:57:06";
......
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