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

增加测试自用文件,与自动化文件分隔

parent 62e4ea25
package com.oto.bean;
public class SignCustomer {
public String custId;
public String timeInterval;
public int configId;
public int custPhase;
public SignCustomer(String custId, String timeInterval, int configId, int custPhase) {
this.custId = custId;
this.timeInterval = timeInterval;
this.configId = configId;
this.custPhase = custPhase;
}
}
...@@ -58,7 +58,12 @@ public interface Authorization { ...@@ -58,7 +58,12 @@ public interface Authorization {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3cVdcpuYrJL6cAszqvnhjut1r1J2h5fBPPiVwGygx"); network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNUjY4j3cVdcpuYrJL6cAszqvnhjut1r1J2h5fBPPiVwGygx");
} }
//oto销售工作台-PM //oto销售工作台-解决方案
default void otoPlanAuth() {
network.agentCookies.put("otoToken", "eTd1Af5HRGuUtkXq6ZtdzRwvNaxSg2py4fAHgG5BZHUqMYASBeFsh1upbrjbRMz7t2MJWkt");
}
//oto销售工作台-测试用户
default void otoTestAuth() { default void otoTestAuth() {
network.agentCookies.put("otoToken", "SGU5VHBG6UrQ3eDgD5fMNJrTGe62AyXGxMf4CVZAwGxg8E8D4hrGJP52sv8v36MaYoA"); network.agentCookies.put("otoToken", "SGU5VHBG6UrQ3eDgD5fMNJrTGe62AyXGxMf4CVZAwGxg8E8D4hrGJP52sv8v36MaYoA");
} }
...@@ -67,16 +72,26 @@ public interface Authorization { ...@@ -67,16 +72,26 @@ public interface Authorization {
network.agentCookies.put(JJBManagerCookieKey,JJBManagerCookieValue); network.agentCookies.put(JJBManagerCookieKey,JJBManagerCookieValue);
} }
//oto销售工作台手机端-邀约 //oto销售工作台企微端-邀约
default void otoInviterTku() { network.agentCookies.put("tku", OTO_INVITER_TKU); } default void otoInviterTku() { network.agentCookies.put("tku", OTO_INVITER_TKU); }
//oto销售工作台手机端-带看销售 //oto销售工作台企微端-带看销售
default void otoTakerTku() { network.agentCookies.put("tku", OTO_TAKER_TKU); } default void otoTakerTku() { network.agentCookies.put("tku", OTO_TAKER_TKU); }
//oto销售工作台手机端-专家 //oto销售工作台企微端-专家
default void otoEpertTku() { network.agentCookies.put("tku", OTO_EXPERT_TKU); } default void otoEpertTku() { network.agentCookies.put("tku", OTO_EXPERT_TKU); }
//oto销售工作台个微端-客户
default void WXCustomerTku() { network.agentCookies.put("ototku", WX_CUSTOMER_TKU); }
//oto销售工作台个微端-专家
default void WXExpertTTku() { network.agentCookies.put("ototku", WX_EXPERT_TKU); }
//oto销售工作台个微端-总监
default void WXLeaderTku() { network.agentCookies.put("ototku", WX_LEADER_TKU); }
/** /**
* 集客助手相关授权 * 集客助手相关授权
*/ */
......
This diff is collapsed.
...@@ -25,8 +25,8 @@ public class Depts implements Authorization { ...@@ -25,8 +25,8 @@ public class Depts implements Authorization {
public void setUp(){ public void setUp(){
otoManagerAuth(); otoManagerAuth();
custids = new ArrayList<Integer>(); custids = new ArrayList<Integer>();
custids.add(cust_id+2);
custids.add(cust_id+3); custids.add(cust_id+3);
custids.add(cust_id+4);
} }
@Test(description = "新建部门",priority = 1) @Test(description = "新建部门",priority = 1)
...@@ -214,7 +214,7 @@ public class Depts implements Authorization { ...@@ -214,7 +214,7 @@ public class Depts implements Authorization {
@Test(description = "修改客户标签",priority = 17) @Test(description = "修改客户标签",priority = 17)
public void 修改客户标签(){ public void 修改客户标签(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custids.get(0)); params.put("custId", custids.get(1));
params.put("tagIds", new int[]{22}); params.put("tagIds", new int[]{22});
Response response = network.postResponse(params, BasicConfig.WORK_MNG_updateTag); Response response = network.postResponse(params, BasicConfig.WORK_MNG_updateTag);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
...@@ -225,7 +225,7 @@ public class Depts implements Authorization { ...@@ -225,7 +225,7 @@ public class Depts implements Authorization {
@Test(description = "标记成单",priority = 18) @Test(description = "标记成单",priority = 18)
public void 标记成单(){ public void 标记成单(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custids.get(0)); params.put("custId", custids.get(1));
params.put("applicantName", "测试投保人"); params.put("applicantName", "测试投保人");
params.put("comeIntoFacetime", "2023-03-23"); params.put("comeIntoFacetime", "2023-03-23");
params.put("costOption", 3); params.put("costOption", 3);
...@@ -274,7 +274,7 @@ public class Depts implements Authorization { ...@@ -274,7 +274,7 @@ public class Depts implements Authorization {
@Test(description = "取消成单",priority = 20) @Test(description = "取消成单",priority = 20)
public void 取消成单(){ public void 取消成单(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId", custids.get(0)); params.put("custId", custids.get(1));
params.put("dealFlag", 0); params.put("dealFlag", 0);
Response response = network.postResponse(params, BasicConfig.WORK_MNG_cancelDealFlag); Response response = network.postResponse(params, BasicConfig.WORK_MNG_cancelDealFlag);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
...@@ -299,7 +299,7 @@ public class Depts implements Authorization { ...@@ -299,7 +299,7 @@ public class Depts implements Authorization {
params.put("otoSidList", 42); params.put("otoSidList", 42);
Response response = network.getResponse(params, BasicConfig.WORK_MNG_customerList); Response response = network.getResponse(params, BasicConfig.WORK_MNG_customerList);
int size = response.jsonPath().getInt("data.list.size()"); int size = response.jsonPath().getInt("data.list.size()");
Assert.assertEquals(size, 6,network.message(params, BasicConfig.WORK_MNG_customerList, "邀约人筛选结果错误", response.body().asString())); Assert.assertEquals(size, 5,network.message(params, BasicConfig.WORK_MNG_customerList, "邀约人筛选结果错误", response.body().asString()));
params.put("otoSidList", 284); params.put("otoSidList", 284);
response = network.getResponse(params, BasicConfig.WORK_MNG_customerList); response = network.getResponse(params, BasicConfig.WORK_MNG_customerList);
...@@ -309,7 +309,7 @@ public class Depts implements Authorization { ...@@ -309,7 +309,7 @@ public class Depts implements Authorization {
params.put("otoSidList", 290); params.put("otoSidList", 290);
response = network.getResponse(params, BasicConfig.WORK_MNG_customerList); response = network.getResponse(params, BasicConfig.WORK_MNG_customerList);
size = response.jsonPath().getInt("data.list.size()"); size = response.jsonPath().getInt("data.list.size()");
Assert.assertEquals(size, 5,network.message(params, BasicConfig.WORK_MNG_customerList, "带看人筛选结果错误", response.body().asString())); Assert.assertEquals(size, 4,network.message(params, BasicConfig.WORK_MNG_customerList, "带看人筛选结果错误", response.body().asString()));
} }
@Test(description = "查询可导入的客户来源列表",priority = 21) @Test(description = "查询可导入的客户来源列表",priority = 21)
...@@ -373,7 +373,7 @@ public class Depts implements Authorization { ...@@ -373,7 +373,7 @@ public class Depts implements Authorization {
int assignNewCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ INVITE_ID +"}.assignNewCustPermission"); int assignNewCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ INVITE_ID +"}.assignNewCustPermission");
int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ INVITE_ID +"}.assignRecycleCustPermission"); int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ INVITE_ID +"}.assignRecycleCustPermission");
int callPermission = response.jsonPath().getInt("data.list.find{it.id == "+ INVITE_ID +"}.callPermission"); int callPermission = response.jsonPath().getInt("data.list.find{it.id == "+ INVITE_ID +"}.callPermission");
Assert.assertEquals(size,11,network.message(params,BasicConfig.WORK_MNG_sellerList,"销数成员错误",response.body().asString())); Assert.assertEquals(size,12,network.message(params,BasicConfig.WORK_MNG_sellerList,"销数成员错误",response.body().asString()));
Assert.assertEquals(workStatus,1,network.message(params,BasicConfig.WORK_MNG_sellerList,"工作状态错误",response.body().asString())); Assert.assertEquals(workStatus,1,network.message(params,BasicConfig.WORK_MNG_sellerList,"工作状态错误",response.body().asString()));
Assert.assertEquals(assignNewCustPermission,1,network.message(params,BasicConfig.WORK_MNG_sellerList,"认领新客户及强制分配权限错误",response.body().asString())); Assert.assertEquals(assignNewCustPermission,1,network.message(params,BasicConfig.WORK_MNG_sellerList,"认领新客户及强制分配权限错误",response.body().asString()));
Assert.assertEquals(assignRecycleCustPermission,1,network.message(params,BasicConfig.WORK_MNG_sellerList,"认领回收客户权限错误",response.body().asString())); Assert.assertEquals(assignRecycleCustPermission,1,network.message(params,BasicConfig.WORK_MNG_sellerList,"认领回收客户权限错误",response.body().asString()));
...@@ -584,8 +584,8 @@ public class Depts implements Authorization { ...@@ -584,8 +584,8 @@ public class Depts implements Authorization {
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_MNG_changeSellerPhone,"换绑手机号失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_MNG_changeSellerPhone,"换绑手机号失败",response.body().asString()));
} }
@Test(description = "查看销售部门详情",priority = 38) @Test(description = "查看销售的部门ID",priority = 38)
public void 查看销售部门详情(){ public void 查看销售的部门ID(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("id", INVITE_ID); params.put("id", INVITE_ID);
Response response = network.postResponse(params, BasicConfig.WORK_MNG_sellerDetail); Response response = network.postResponse(params, BasicConfig.WORK_MNG_sellerDetail);
...@@ -680,13 +680,13 @@ public class Depts implements Authorization { ...@@ -680,13 +680,13 @@ public class Depts implements Authorization {
Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_ykList,"微信会话不为空",response.body().asString())); Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_ykList,"微信会话不为空",response.body().asString()));
} }
@Test(description = "我的审批搜索成员",priority = 47) @Test(description = "面访审批搜索成员",priority = 47)
public void 我的审批搜索成员(){ public void 面访审批搜索成员(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("sellerName","自动化" ); params.put("sellerName","自动化" );
Response response = network.getResponse(params,BasicConfig.WORK_findMySellerByFuzzyName);; Response response = network.getResponse(params,BasicConfig.WORK_findMySellerByFuzzyName);;
int size = response.jsonPath().getInt("data.list.size()"); int size = response.jsonPath().getInt("data.list.size()");
Assert.assertEquals(size,11,network.message(params,BasicConfig.WORK_findMySellerByFuzzyName,"问题详情为空",response.body().asString())); Assert.assertEquals(size,12,network.message(params,BasicConfig.WORK_findMySellerByFuzzyName,"问题详情为空",response.body().asString()));
} }
public void dimissionStatus(int sellreid){ public void dimissionStatus(int sellreid){
......
...@@ -47,7 +47,7 @@ public class FormSubmit implements Authorization { ...@@ -47,7 +47,7 @@ public class FormSubmit implements Authorization {
paramsFrom.put("title", "勿动-自动化资料组"); paramsFrom.put("title", "勿动-自动化资料组");
Response response = network.postResponse(paramsFrom, BasicConfig.WORK_saveFormDetail); Response response = network.postResponse(paramsFrom, BasicConfig.WORK_saveFormDetail);
boolean success = response.jsonPath().getBoolean("success"); boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(paramsFrom,BasicConfig.WORK_saveFormDetail,"修改资料组状态失败",response.body().asString())); Assert.assertFalse(success,network.message(paramsFrom,BasicConfig.WORK_saveFormDetail,"开启空资料组状态成功",response.body().asString()));
} }
@Test(description = "获取资料组的配置详情",priority = 4) @Test(description = "获取资料组的配置详情",priority = 4)
...@@ -63,6 +63,17 @@ public class FormSubmit implements Authorization { ...@@ -63,6 +63,17 @@ public class FormSubmit implements Authorization {
custDetail(8,false,false); custDetail(8,false,false);
} }
@Test(description = "移动资料组",priority = 5)
public void 移动资料组(){
HashMap<String,Object> paramsFrom = new HashMap<>();
paramsFrom.put("from", 8);
paramsFrom.put("to", 7);
Response response = network.postResponse(paramsFrom, BasicConfig.WORK_formOrder);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(paramsFrom,BasicConfig.WORK_formOrder,"移动资料组状态失败",response.body().asString()));
response = network.postResponse(paramsFrom, BasicConfig.WORK_formOrder);
}
@Test(description = "新增资料组题目",priority = 6) @Test(description = "新增资料组题目",priority = 6)
......
...@@ -20,6 +20,7 @@ import java.util.Map; ...@@ -20,6 +20,7 @@ import java.util.Map;
import static com.oto.cases.otoseller.Manager.cust_id; import static com.oto.cases.otoseller.Manager.cust_id;
import static com.oto.cases.otoseller.Work.assignSeller; import static com.oto.cases.otoseller.Work.assignSeller;
import static com.oto.cases.otoseller.Work.now;
import static com.oto.config.BasicConfig.*; import static com.oto.config.BasicConfig.*;
import static com.oto.utils.BaseUtils.ssoLogin; import static com.oto.utils.BaseUtils.ssoLogin;
import static com.oto.utils.ThreadSleepUtils.sleep; import static com.oto.utils.ThreadSleepUtils.sleep;
...@@ -29,8 +30,7 @@ public class Invite implements Authorization { ...@@ -29,8 +30,7 @@ public class Invite implements Authorization {
public static Map<String,Integer> header; public static Map<String,Integer> header;
public Map<String,Double> coefficient; public Map<String,Double> coefficient;
public static long sceneId; public static long sceneId;
public String inviteUrl;//邀请函链接 public static String inviteUrl;//邀请函链接
public static long now; //当前时间戳
public static long today; //当前日期0点时间戳 public static long today; //当前日期0点时间戳
public static long sunndayWeek; //当前周日日期 public static long sunndayWeek; //当前周日日期
public double takerCoefficient; public double takerCoefficient;
...@@ -40,8 +40,6 @@ public class Invite implements Authorization { ...@@ -40,8 +40,6 @@ public class Invite implements Authorization {
public void setUp(){ public void setUp(){
header = new HashMap<>(); header = new HashMap<>();
coefficient = new HashMap<>(); coefficient = new HashMap<>();
now = System.currentTimeMillis();
today = now-(now + 8*3600 * 1000) % (60*60*24*1000);
otoManagerAuth(); otoManagerAuth();
Sunday(); Sunday();
} }
...@@ -98,13 +96,13 @@ public class Invite implements Authorization { ...@@ -98,13 +96,13 @@ public class Invite implements Authorization {
@Test(description = "修改客户面访状态为明确拒绝",priority = 5) @Test(description = "修改客户面访状态为明确拒绝",priority = 5)
public void 修改客户面访状态为明确拒绝(){ public void 修改客户面访状态为明确拒绝(){
updateInvite(0,now+86400000); updateInvite(0,now+86400000,cust_id);
getHasFirstInvite(0,true); getHasFirstInvite(0,true);
} }
@Test(description = "修改客户面访状态为已约到时间未定",priority = 6) @Test(description = "修改客户面访状态为已约到时间未定",priority = 6)
public void 修改客户面访状态为已约到时间未定(){ public void 修改客户面访状态为已约到时间未定(){
updateInvite(2,now+86400000); updateInvite(2,now+86400000,cust_id);
getHasFirstInvite(2,true); getHasFirstInvite(2,true);
} }
...@@ -115,13 +113,13 @@ public class Invite implements Authorization { ...@@ -115,13 +113,13 @@ public class Invite implements Authorization {
Response response =network.getResponse(params,BasicConfig.WORK_getAllSceneConfs); Response response =network.getResponse(params,BasicConfig.WORK_getAllSceneConfs);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
int confUsableSize = response.jsonPath().getInt("data.findAll{it.confUsable == 1}.size()"); int confUsableSize = response.jsonPath().getInt("data.findAll{it.confUsable == 1}.size()");
Assert.assertEquals(size,3 ,network.message(params,BasicConfig.WORK_getAllSceneConfs,"面访场景包含场景未根据产品组关联",response.body().asString())); Assert.assertEquals(size,4 ,network.message(params,BasicConfig.WORK_getAllSceneConfs,"面访场景包含场景未根据产品组关联",response.body().asString()));
Assert.assertEquals(confUsableSize,2 ,network.message(params,BasicConfig.WORK_getAllSceneConfs,"面访场景包含场景未根据产品组关联",response.body().asString())); Assert.assertEquals(confUsableSize,3 ,network.message(params,BasicConfig.WORK_getAllSceneConfs,"面访场景包含场景未根据产品组关联",response.body().asString()));
} }
@Test(description = "修改客户面访承诺时间为1天后",priority = 8) @Test(description = "修改客户面访承诺时间为1天后",priority = 8)
public void 修改客户面访承诺时间为1天后(){ public void 修改客户面访承诺时间为1天后(){
updateInvite(1,now+86400000); updateInvite(1,now+86400000,cust_id);
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
...@@ -135,7 +133,7 @@ public class Invite implements Authorization { ...@@ -135,7 +133,7 @@ public class Invite implements Authorization {
@Test(description = "修改客户具体时间客户状态不变",priority = 10) @Test(description = "修改客户具体时间客户状态不变",priority = 10)
public void 修改客户具体时间客户状态不变(){ public void 修改客户具体时间客户状态不变(){
updateInvite(1,now + 86400000+3600000); updateInvite(1,now + 86400000+3600000,cust_id);
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
...@@ -144,7 +142,7 @@ public class Invite implements Authorization { ...@@ -144,7 +142,7 @@ public class Invite implements Authorization {
@Test(description = "修改客户具体日期,老邀约为已鸽",priority = 11) @Test(description = "修改客户具体日期,老邀约为已鸽",priority = 11)
public void 修改客户具体日期老邀约变为已鸽(){ public void 修改客户具体日期老邀约变为已鸽(){
updateInvite(1,now + 86400000*2); updateInvite(1,now + 86400000*2,cust_id);
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
...@@ -154,7 +152,7 @@ public class Invite implements Authorization { ...@@ -154,7 +152,7 @@ public class Invite implements Authorization {
@Test(description = "修改客户未约到客户状态变为已鸽",priority = 12) @Test(description = "修改客户未约到客户状态变为已鸽",priority = 12)
public void 修改客户未约到客户状态变为已鸽(){ public void 修改客户未约到客户状态变为已鸽(){
updateInvite(0,now + 3600000); updateInvite(0,now + 3600000,cust_id);
getHasFirstInvite(0,true); getHasFirstInvite(0,true);
getCallCustInfo(0);; getCallCustInfo(0);;
...@@ -163,7 +161,7 @@ public class Invite implements Authorization { ...@@ -163,7 +161,7 @@ public class Invite implements Authorization {
@Test(description = "修改客户已约到客户状态时间今天后变为已确认",priority =13) @Test(description = "修改客户已约到客户状态时间今天后变为已确认",priority =13)
public void 修改客户已约到客户状态时间今天后变为已确认(){ public void 修改客户已约到客户状态时间今天后变为已确认(){
updateInvite(1,now + 3600000); updateInvite(1,now + 3600000,cust_id);
getHasFirstInvite(1,true); getHasFirstInvite(1,true);
getCallCustInfo(1); getCallCustInfo(1);
...@@ -328,8 +326,8 @@ public class Invite implements Authorization { ...@@ -328,8 +326,8 @@ public class Invite implements Authorization {
@Test(description = "立即分配邀约客户",priority = 25) @Test(description = "立即分配邀约客户",priority = 25)
public void 立即分配邀约客户(){ public void 立即分配邀约客户(){
updateInvite(0,now + 3600000); updateInvite(0,now + 3600000,cust_id);
updateInvite(1,now + 3600000); updateInvite(1,now + 3600000,cust_id);
getCalendarlist(today,2,"自动化激活用户","勿动-自动化测试邀约"); getCalendarlist(today,2,"自动化激活用户","勿动-自动化测试邀约");
otoManagerAuth(); otoManagerAuth();
...@@ -394,9 +392,9 @@ public class Invite implements Authorization { ...@@ -394,9 +392,9 @@ public class Invite implements Authorization {
} }
//修改客户的约面情况 //修改客户的约面情况
public void updateInvite(int interviewFlag,long time){ public static void updateInvite(int interviewFlag,long time,int customer_id){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId",cust_id); params.put("custId",customer_id);
params.put("eventType",2); params.put("eventType",2);
params.put("firstInterviewFlag",interviewFlag); params.put("firstInterviewFlag",interviewFlag);
if(interviewFlag == 1){ //1为已约到需要填写时间地点 if(interviewFlag == 1){ //1为已约到需要填写时间地点
...@@ -421,7 +419,7 @@ public class Invite implements Authorization { ...@@ -421,7 +419,7 @@ public class Invite implements Authorization {
//获取客户详情回填的客户约面信息 //获取客户详情回填的客户约面信息
public void getHasFirstInvite(int interviewFlag,boolean isinviter){ public static void getHasFirstInvite(int interviewFlag,boolean isinviter){
sleep(1000); sleep(1000);
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("custId",cust_id); params.put("custId",cust_id);
...@@ -489,11 +487,13 @@ public class Invite implements Authorization { ...@@ -489,11 +487,13 @@ public class Invite implements Authorization {
} }
} }
if(flag == 0){ if(flag == 0 && inviteStatus!=0){
Assert.fail("未找到相应的约面记录"); Assert.fail("未找到相应的约面记录");
} }
} }
public static void Sunday(){ public static void Sunday(){
now = System.currentTimeMillis();
today = now-(now + 8*3600 * 1000) % (60*60*24*1000);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY ){ if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY ){
......
...@@ -99,7 +99,7 @@ public class Phone implements Authorization { ...@@ -99,7 +99,7 @@ public class Phone implements Authorization {
params.put("custId", customer_id); params.put("custId", customer_id);
Response response = network.getResponse(params, BasicConfig.PHONE_listCustInterConf); Response response = network.getResponse(params, BasicConfig.PHONE_listCustInterConf);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,1,network.message(params,BasicConfig.PHONE_listCustInterConf,"见面场景列表数量错误",response.body().asString())); Assert.assertEquals(size,2,network.message(params,BasicConfig.PHONE_listCustInterConf,"见面场景列表数量错误",response.body().asString()));
} }
...@@ -117,7 +117,7 @@ public class Phone implements Authorization { ...@@ -117,7 +117,7 @@ public class Phone implements Authorization {
params.put("custId", customer_id); params.put("custId", customer_id);
response = network.getResponse(params, BasicConfig.PHONE_listCustInterConf); response = network.getResponse(params, BasicConfig.PHONE_listCustInterConf);
int size = response.jsonPath().getInt("data.size()"); int size = response.jsonPath().getInt("data.size()");
Assert.assertEquals(size,2,network.message(params,BasicConfig.PHONE_listCustInterConf,"见面场景列表数量错误",response.body().asString())); Assert.assertEquals(size,3,network.message(params,BasicConfig.PHONE_listCustInterConf,"见面场景列表数量错误",response.body().asString()));
} }
@Test(description = "创建社区参观的面访",priority = 8) @Test(description = "创建社区参观的面访",priority = 8)
...@@ -717,8 +717,8 @@ public class Phone implements Authorization { ...@@ -717,8 +717,8 @@ public class Phone implements Authorization {
@Test(description = "方案讲解历史更新",priority = 67) @Test(description = "方案讲解历史更新",priority = 67)
public void 方案讲解历史更新(){ public void 方案讲解历史更新(){
getSchemeNum(4,2,2,false); getTree(4,null,1,1,99);
getSchemeList(3,2,0); getSchemeList(3,1);
} }
@Test(description = "查看我的日报为未提交",priority = 75) @Test(description = "查看我的日报为未提交",priority = 75)
......
...@@ -43,25 +43,25 @@ public class Work implements Authorization { ...@@ -43,25 +43,25 @@ public class Work implements Authorization {
menuList(4); menuList(4);
otoTakerAuth(); otoTakerAuth();
menuList(2); menuList(3);
otoExpertAuth(); otoExpertAuth();
menuList(2); menuList(3);
otoAssistAuth(); otoAssistAuth();
menuList(10); menuList(10);
otoLeaderAuth(); otoLeaderAuth();
menuList(11); menuList(12);
otoPMAuth(); otoPMAuth();
menuList(12); menuList(12);
otoAreaAuth(); otoAreaAuth();
menuList(10); menuList(11);
otoManagerAuth(); otoManagerAuth();
menuList(19); menuList(20);
} }
@Test(description = "工作台_标签列表",priority = 5) @Test(description = "工作台_标签列表",priority = 5)
...@@ -138,7 +138,7 @@ public class Work implements Authorization { ...@@ -138,7 +138,7 @@ public class Work implements Authorization {
params.put("pageSize", 50); params.put("pageSize", 50);
Response response = network.getResponse(params,BasicConfig.WORK_inviterCustList); Response response = network.getResponse(params,BasicConfig.WORK_inviterCustList);
int size = response.jsonPath().getInt("data.list.size()"); int size = response.jsonPath().getInt("data.list.size()");
Assert.assertEquals(size,6,network.message(params,BasicConfig.WORK_inviterCustList,"需要联系列表中首位客户非新增客户",response.body().asString())); Assert.assertEquals(size,5,network.message(params,BasicConfig.WORK_inviterCustList,"需要联系列表中首位客户非新增客户",response.body().asString()));
followTimes = response.jsonPath().getInt("data.list[0].followTimes"); followTimes = response.jsonPath().getInt("data.list[0].followTimes");
Object lastFollowTime = response.jsonPath().getJsonObject("data.list[0].lastFollowTime"); Object lastFollowTime = response.jsonPath().getJsonObject("data.list[0].lastFollowTime");
...@@ -884,16 +884,10 @@ public class Work implements Authorization { ...@@ -884,16 +884,10 @@ public class Work implements Authorization {
@Test(description = "放弃客户进入回收池",priority = 65) @Test(description = "放弃客户进入回收池",priority = 65)
public void 放弃客户进入回收池(){ public void 放弃客户进入回收池(){
HashMap<String,Object> params = new HashMap<>(); abandonCust(cust_id);
params.put("custId", cust_id);
params.put("abandonReasonType", 3);
params.put("abandonRemark", "放弃原因"+new Date());
Response response = network.postResponse(params,BasicConfig.WORK_abandonCust);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_abandonCust,"放弃客户失败",response.body().asString()));
sleep(1000); sleep(1000);
response = network.getResponse(BasicConfig.WORK_staticHeader); Response response = network.getResponse(BasicConfig.WORK_staticHeader);
int totalNum = response.jsonPath().getInt("data.totalNum"); int totalNum = response.jsonPath().getInt("data.totalNum");
int num = header.get("totalNum"); int num = header.get("totalNum");
Assert.assertEquals(totalNum, num,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString())); Assert.assertEquals(totalNum, num,network.message(BasicConfig.WORK_staticChart,"客户总数未更新",response.body().asString()));
...@@ -902,7 +896,6 @@ public class Work implements Authorization { ...@@ -902,7 +896,6 @@ public class Work implements Authorization {
response =network.getResponse(BasicConfig.WORK_coefficient_detail); response =network.getResponse(BasicConfig.WORK_coefficient_detail);
Double totalCoefficient = response.jsonPath().getDouble("data.totalCoefficient"); Double totalCoefficient = response.jsonPath().getDouble("data.totalCoefficient");
Assert.assertEquals(totalCoefficient,coefficient.get("totalCoefficient"),network.message(BasicConfig.WORK_coefficient_detail,"放弃客户销售总系数变化",response.body().asString())); Assert.assertEquals(totalCoefficient,coefficient.get("totalCoefficient"),network.message(BasicConfig.WORK_coefficient_detail,"放弃客户销售总系数变化",response.body().asString()));
} }
@Test(description ="放弃客户后重新激活进入预备池",priority = 66) @Test(description ="放弃客户后重新激活进入预备池",priority = 66)
...@@ -1038,7 +1031,7 @@ public class Work implements Authorization { ...@@ -1038,7 +1031,7 @@ public class Work implements Authorization {
Response response = network.postResponse(params, path); Response response = network.postResponse(params, path);
if (result){ if (result){
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, path, "销售不同产品组分配客户成功", response.body().asString())); Assert.assertTrue(data, network.message(params, path, "分配客户失败", response.body().asString()));
} }
else { else {
boolean success = response.jsonPath().getBoolean("success"); boolean success = response.jsonPath().getBoolean("success");
...@@ -1062,4 +1055,14 @@ public class Work implements Authorization { ...@@ -1062,4 +1055,14 @@ public class Work implements Authorization {
Assert.assertEquals(tagName,tags.get(key),network.message(BasicConfig.WORK_tagList,"标签名称错误",response.body().asString())); Assert.assertEquals(tagName,tags.get(key),network.message(BasicConfig.WORK_tagList,"标签名称错误",response.body().asString()));
} }
} }
public static void abandonCust(int c_id){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", c_id);
params.put("abandonReasonType", 3);
params.put("abandonRemark", "放弃原因"+new Date());
Response response = network.postResponse(params,BasicConfig.WORK_abandonCust);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_abandonCust,"放弃客户失败",response.body().asString()));
}
} }
...@@ -39,10 +39,15 @@ public class BasicConfig { ...@@ -39,10 +39,15 @@ public class BasicConfig {
// 钉钉机器人 线上-告警群 // 钉钉机器人 线上-告警群
public static final String dingTalkPath = "https://oapi.dingtalk.com/robot/send?access_token=e6fc528a3a5991ba74d800c9b1688bf5e0f4f88864ec92da777f84c260181407"; public static final String dingTalkPath = "https://oapi.dingtalk.com/robot/send?access_token=e6fc528a3a5991ba74d800c9b1688bf5e0f4f88864ec92da777f84c260181407";
/*******OTO销售工作台*********/ /*******OTO销售工作台-企微*********/
public static final String OTO_INVITER_TKU = "4yrzAfNog7WE527NKCNmqBqph48N7mWR9J49QYysZmKYC3DF97hQFap7RphynF3GFXLhp7GFZ35mc"; public static final String OTO_INVITER_TKU = "4yrzAfNog7WE527NKCNmqBqph48N7mWR9J49QYysZmKYC3DF97hQFap7RphynF3GFXLhp7GFZ35mc";
public static final String OTO_TAKER_TKU = "7Fcuh7FWTsTHSpfadRRWCqckAq8hCnYnpu4ijNqaLqu6sqzpgJ9CDUyeRitqrvkwVt8JRMgKpmqq9oiGyqEmk5AbqpJo73W8Gh4uEjafWgfz9Xrr3BdAsTRZUojBpqm7VQyZbP6dS1UFdofCYaj5B497"; public static final String OTO_TAKER_TKU = "7Fcuh7FWTsTHSpfadRRWCqckAq8hCnYnpu4ijNqaLqu6sqzpgJ9CDUyeRitqrvkwVt8JRMgKpmqq9oiGyqEmk5AbqpJo73W8Gh4uEjafWgfz9Xrr3BdAsTRZUojBpqm7VQyZbP6dS1UFdofCYaj5B497";
public static final String OTO_EXPERT_TKU = "7Fcuh7FWTsTHSpfadRRWCqKfrLzGwUzSt2GyKaN2k4JGQDTqw8BwHhYw3TyqyaYEjXrPE6fkTN8KHHHhhFKnjdfEt8mmziXNdVKTpV1oLBfQVLsLG32XkcYgX9nHtUA3r9bYDRhQGQp1y4AumVyQFbxr"; public static final String OTO_EXPERT_TKU = "7Fcuh7FWTsTHSpfadRRWCqKfrLzGwUzSt2GyKaN2k4JGQDTqw8BwHhYw3TyqyaYEjXrPE6fkTN8KHHHhhFKnjdfEt8mmziXNdVKTpV1oLBfQVLsLG32XkcYgX9nHtUA3r9bYDRhQGQp1y4AumVyQFbxr";
/*******OTO销售工作台-个微*********/
public static final String WX_CUSTOMER_TKU = "3XE1uRL2Mq7DEPFFUMAtEgc1KZagjL4Bw7STUYA79h2mLaQExn9ji9MtuMqeigWxzYyLqGhdKFSWs18uFNXF74dZzMAuvJKHkLrc63b9erfkSoBQvM";
public static final String WX_EXPERT_TKU = "8WLT4bmESccxwWsdtyqvYAujdym8wr9EFgyuxyVTUn3bWkjBxCaRZ3Ab9Th23hEEHsVL89gYm26n7Eag4ZxYGhabwkN8voFamdmibepJZ7Jjinx";
public static final String WX_LEADER_TKU = "8WLT4bmESccxwWsdtyqvYGjw2btb5QStHynN3Wqird53MakwdEDu5aNZEnV3PdpvmxipZ4bVxD7bjZKdofEdP9XVWgdNfNF52Vw1qV2dsf7gWVe";
// *************** 客集集域名 *************** // *************** 客集集域名 ***************
public static final String HOST = "https://kjj.m.duibatest.com.cn"; public static final String HOST = "https://kjj.m.duibatest.com.cn";
public static final String SSO_HOST = "https://sso.duibatest.com.cn"; public static final String SSO_HOST = "https://sso.duibatest.com.cn";
...@@ -52,6 +57,7 @@ public class BasicConfig { ...@@ -52,6 +57,7 @@ public class BasicConfig {
public static final String FORM_HOST = "https://kjj-static.duibatest.com.cn"; public static final String FORM_HOST = "https://kjj-static.duibatest.com.cn";
public static final String PHONE_HOST = "https://kjj-auth.duibatest.com.cn"; public static final String PHONE_HOST = "https://kjj-auth.duibatest.com.cn";
public static final String JiuJiuBao_HOST = "https://oto-mng.duibatest.com.cn"; public static final String JiuJiuBao_HOST = "https://oto-mng.duibatest.com.cn";
public static final String WX_HOST = "https://oto-web.duibatest.com.cn";
// *************** 管理后台 *************** // *************** 管理后台 ***************
public static final String SSO_doLogin = SSO_HOST + "/doLogin"; public static final String SSO_doLogin = SSO_HOST + "/doLogin";
...@@ -227,6 +233,15 @@ public class BasicConfig { ...@@ -227,6 +233,15 @@ public class BasicConfig {
public static final String WORK_liveDynamic= WORK_HOST + "/kjy/oto/manager/customer/liveDynamic"; public static final String WORK_liveDynamic= WORK_HOST + "/kjy/oto/manager/customer/liveDynamic";
public static final String WORK_updateInfo= WORK_HOST + "/kjy/oto/manager/customer/info/update"; public static final String WORK_updateInfo= WORK_HOST + "/kjy/oto/manager/customer/info/update";
//*************************客户报告审批*******************************
public static final String WORK_OA_submit = WORK_HOST + "/kjy/oto/manager/report/oa/submit";
public static final String WORK_OA_tree = WORK_HOST + "/kjy/oto/manager/report/oa/tree";
public static final String WORK_OA_audit= WORK_HOST + "/kjy/oto/manager/report/oa/audit";
public static final String WORK_OA_getAuditNum= WORK_HOST + "/kjy/oto/manager/report/oa/auditInfo/num/get";
public static final String WORK_OA_list = WORK_HOST + "/kjy/oto/manager/report/oa/list";
public static final String WORK_OA_expertName = WORK_HOST + "/kjy/oto/manager/report/oa/expertName";
public static final String WORK_OA_custName = WORK_HOST + "/kjy/oto/manager/report/oa/custName";
//*************************工作计划***************************** //*************************工作计划*****************************
public static final String WORK_minimumDept= WORK_HOST + "/kjy/oto/manager/customer/minimum/dept/list"; public static final String WORK_minimumDept= WORK_HOST + "/kjy/oto/manager/customer/minimum/dept/list";
public static final String WORK_obtainCustBySellerId= WORK_HOST + "/kjy/oto/manager/customer/obtainCustBySellerId"; public static final String WORK_obtainCustBySellerId= WORK_HOST + "/kjy/oto/manager/customer/obtainCustBySellerId";
...@@ -238,6 +253,13 @@ public class BasicConfig { ...@@ -238,6 +253,13 @@ public class BasicConfig {
public static final String WORK_interviewAuditReject= WORK_HOST + "/kjy/oto/manager/audit/interviewAuditReject"; public static final String WORK_interviewAuditReject= WORK_HOST + "/kjy/oto/manager/audit/interviewAuditReject";
public static final String WORK_interviewAuditPass= WORK_HOST + "/kjy/oto/manager/audit/interviewAuditPass"; public static final String WORK_interviewAuditPass= WORK_HOST + "/kjy/oto/manager/audit/interviewAuditPass";
//*************************活动行事历***************************
public static final String WORK_saveActivity= WORK_HOST + "/kjy/oto/manager/task/calendar/save";
public static final String WORK_modifyActivity= WORK_HOST + "/kjy/oto/manager/task/calendar/modify";
public static final String WORK_cancelActivity= WORK_HOST + "/kjy/oto/manager/task/calendar/cancel";
public static final String WORK_listActivity= WORK_HOST + "/kjy/oto/manager/task/calendar/list";
public static final String WORK_detailActivity= WORK_HOST + "/kjy/oto/manager/task/calendar/detail";
//*************************客户盘点*************************** //*************************客户盘点***************************
public static final String WORK_liveSearch= WORK_HOST + "/kjy/oto/manager/customer/liveSearch"; public static final String WORK_liveSearch= WORK_HOST + "/kjy/oto/manager/customer/liveSearch";
public static final String WORK_roleSellerList= WORK_HOST + "/kjy/oto/manager/customer/roleSellerList"; public static final String WORK_roleSellerList= WORK_HOST + "/kjy/oto/manager/customer/roleSellerList";
...@@ -315,7 +337,24 @@ public class BasicConfig { ...@@ -315,7 +337,24 @@ public class BasicConfig {
public static final String PHONE_submitEvaluate = HOST + "/kjy/oto/interview/submitEvaluate"; public static final String PHONE_submitEvaluate = HOST + "/kjy/oto/interview/submitEvaluate";
public static final String WX_look= HOST + "/kjy/mp/oto/risk/invLetter/look"; public static final String WX_look= HOST + "/kjy/mp/oto/risk/invLetter/look";
public static final String WX_confirm= HOST + "/kjy/mp/oto/risk/invLetter/confirm"; public static final String WX_confirm= HOST + "/kjy/mp/oto/risk/invLetter/confirm";
//***********************销售工作台手机端**********************
//*************************销售工作台微信端********************************
public static final String WX_signDetail= WX_HOST + "/oto/activity/sign/detail";
public static final String WX_signSubmit= WX_HOST + "/oto/activity/sign/submit";
public static final String WX_sellerSubmitRecordList= WX_HOST + "/oto/seller/submitRecord/pageList";
public static final String otherDetailForSeller = WX_HOST + "/oto/seller/submitRecord/otherDetailForSeller";
public static final String WX_submitRecordDetail= WX_HOST + "/oto/seller/submitRecord/signDetail";
public static final String WX_checkSign= WX_HOST + "/oto/seller/submitRecord/checkSign";
public static final String WX_interviewConfigList= WX_HOST + "/oto/seller/submitRecord/interviewConfigList";
public static final String WX_custPhase = WX_HOST + "/oto/seller/submitRecord/custPhase";
public static final String WX_leaderList = WX_HOST + "/oto/seller/submitRecord/leaderList";
public static final String WX_leaderHeader = WX_HOST + "/oto/seller/submitRecord/leaderHeader";
public static final String WX_otherDetailForLeader = WX_HOST + "/oto/seller/submitRecord/otherDetailForLeader";
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 PHONE_getCustPhase = WORK_HOST + "/kjy/oto/manager/customer/getCustPhase"; public static final String PHONE_getCustPhase = WORK_HOST + "/kjy/oto/manager/customer/getCustPhase";
public static final String PHONE_updateCustPhase = WORK_HOST + "/kjy/oto/manager/customer/updateCustPhase"; public static final String PHONE_updateCustPhase = WORK_HOST + "/kjy/oto/manager/customer/updateCustPhase";
public static final String PHONE_customerList = PHONE_HOST + "/kjy/oto/manager/customer/list"; public static final String PHONE_customerList = PHONE_HOST + "/kjy/oto/manager/customer/list";
......
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="PC_活动签到">
<classes>
<class name="com.oto.cases.otoseller.Activity"/>
</classes>
</test>
<test preserve-order="true" name="PC_邀约承诺"> <test preserve-order="true" name="PC_邀约承诺">
<classes> <classes>
<class name="com.oto.cases.otoseller.Invite"/> <class name="com.oto.cases.otoseller.Invite"/>
......
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