Commit 85c28351 authored by 郭姣's avatar 郭姣

Merge remote-tracking branch 'origin/master' into gifeature/2021110402-gj

# Conflicts:
#	src/test/java/com/kjj/cases/otoseller/Work.java
parents 0d4731b4 cae7e4cf
...@@ -15,34 +15,39 @@ ...@@ -15,34 +15,39 @@
<class name="com.kjj.cases.live.liveConfig.SaveLive"/> <class name="com.kjj.cases.live.liveConfig.SaveLive"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="配置代理人邀约奖励">
<classes>
<class name="com.kjj.cases.live.inviteReward.ManagerRewardConf"/>
</classes>
</test>
<test preserve-order="true" name="配置秒杀轮次及秒杀预告"> <test preserve-order="true" name="绑定关系绑定">
<classes> <classes>
<class name="com.kjj.cases.live.secondKill.ConfSecondKill"/> <class name="com.kjj.cases.live.liveConfig.LiveBinding"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="绑定关系绑定"> <test preserve-order="true" name="代理人首页">
<classes> <classes>
<class name="com.kjj.cases.live.liveConfig.LiveBinding"/> <class name="com.kjj.cases.live.agent.Agent"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="助播-开启直播"> <test preserve-order="true" name="小程序分享">
<classes> <classes>
<class name="com.kjj.cases.live.anchor.OpenLive"/> <class name="com.kjj.cases.live.liveConfig.Share"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="秒杀到场"> <test preserve-order="true" name="获取抽奖码校验">
<classes> <classes>
<class name="com.kjj.cases.live.liveConfig.ConnectLive"/> <class name="com.kjj.cases.live.lotteryCode.LotteryCode"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="秒杀互动"> <test preserve-order="true" name="亲友券">
<classes> <classes>
<class name="com.kjj.cases.live.secondKill.SecondKill"/> <class name="com.kjj.cases.live.lottery.RelativeLottery"/>
</classes> </classes>
</test> </test>
......
...@@ -31,7 +31,13 @@ public class Manager { ...@@ -31,7 +31,13 @@ public class Manager {
Assert.assertTrue(size>0,network.message(params,BasicConfig.MANAGER_oto_sellerList,"销售列表为空",response.body().asString())); Assert.assertTrue(size>0,network.message(params,BasicConfig.MANAGER_oto_sellerList,"销售列表为空",response.body().asString()));
int workStatus = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.workStatus"); int workStatus = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.workStatus");
int assignNewCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.assignNewCustPermission");
int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.assignRecycleCustPermission");
int callPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.callPermission");
Assert.assertEquals(workStatus,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"工作状态错误",response.body().asString())); Assert.assertEquals(workStatus,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"工作状态错误",response.body().asString()));
Assert.assertEquals(assignNewCustPermission,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"认领新客户及强制分配权限错误",response.body().asString()));
Assert.assertEquals(assignRecycleCustPermission,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"认领回收客户权限错误",response.body().asString()));
Assert.assertEquals(callPermission,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"呼叫权限错误",response.body().asString()));
} }
@Test(description = "通过销售名称查找销售",priority = 2) @Test(description = "通过销售名称查找销售",priority = 2)
...@@ -102,6 +108,9 @@ public class Manager { ...@@ -102,6 +108,9 @@ public class Manager {
params.put("sellerStatus", 1); params.put("sellerStatus", 1);
params.put("companyId", 1); params.put("companyId", 1);
params.put("sellerLevel", 1); params.put("sellerLevel", 1);
params.put("workStatus", 1);
params.put("assignNewCustPermission", 1);
params.put("assignRecycleCustPermission", 1);
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()));
......
package com.kjj.cases.otoseller;
import com.kjj.cases.admin.Authorization;
import com.kjj.utils.NetworkUtils;
import org.testng.annotations.BeforeTest;
import static com.kjj.utils.BaseUtils.ssoLogin;
//手机端
public class Phone implements Authorization {
private static final NetworkUtils network = NetworkUtils.getInstance();
private int sellerId; //销售ID
@BeforeTest
public void setUp(){
}
}
...@@ -14,8 +14,8 @@ import java.util.Date; ...@@ -14,8 +14,8 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static com.kjj.config.BasicConfig.SELLER_ID;
import static com.kjj.config.BasicConfig.LEADER_ID; import static com.kjj.config.BasicConfig.LEADER_ID;
import static com.kjj.config.BasicConfig.SELLER_ID;
import static com.kjj.utils.BaseUtils.*; import static com.kjj.utils.BaseUtils.*;
import static com.kjj.utils.ThreadSleepUtils.sleep; import static com.kjj.utils.ThreadSleepUtils.sleep;
...@@ -792,6 +792,53 @@ public class Work implements Authorization { ...@@ -792,6 +792,53 @@ public class Work implements Authorization {
Assert.assertTrue(logSize>0,network.message(BasicConfig.WORK_operation,"客户动态隔离失败",logRes.body().asString())); Assert.assertTrue(logSize>0,network.message(BasicConfig.WORK_operation,"客户动态隔离失败",logRes.body().asString()));
} }
@Test(description = "关闭总监的新客户认领权限和回收客户认领权限",priority = 59)
public void 关闭总监的新客户认领权限和回收客户认领权限(){
HashMap<String,Object> params = new HashMap<>();
params.put("sellerId", LEADER_ID);
params.put("sellerStatus", 1);
params.put("callPermission", 1);
params.put("workassignNewCustPermissionStatus", 0);
params.put("assignRecycleCustPermission", 0);
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updatePermission);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"关闭总监的新客户认领权限和回收客户认领权限失败",response.body().asString()));
}
@Test(description = "无新客户认领权限不可查看新客户列表",priority = 60)
public void 无新客户认领权限不可查看新客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 20);
Response response = network.getResponse(params,BasicConfig.WORK_freshList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(BasicConfig.WORK_logout,"无新客户认领权限可查看新客户列表",response.body().asString()));
}
@Test(description = "无回收客户认领权限不可查看回收客户列表",priority = 61)
public void 无回收客户认领权限不可查看回收客户列表(){
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", 1);
params.put("pageSize", 20);
Response response = network.getResponse(params,BasicConfig.WORK_recycleList);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(BasicConfig.WORK_logout,"无回收客户认领权限可查看回收客户列表",response.body().asString()));
}
@Test(description = "开启总监的新客户认领权限和回收客户认领权限",priority = 62)
public void 开启总监的新客户认领权限和回收客户认领权限(){
HashMap<String,Object> params = new HashMap<>();
params.put("sellerId", LEADER_ID);
params.put("sellerStatus", 1);
params.put("callPermission", 1);
params.put("workassignNewCustPermissionStatus", 1);
params.put("assignRecycleCustPermission", 1);
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updatePermission);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"开启总监的新客户认领权限和回收客户认领权限失败",response.body().asString()));
}
@Test(description = "新建日程",priority = 59) @Test(description = "新建日程",priority = 59)
public void 新建日程(){ public void 新建日程(){
//获取日程提醒数量 //获取日程提醒数量
......
...@@ -1324,9 +1324,9 @@ public class BasicConfig { ...@@ -1324,9 +1324,9 @@ public class BasicConfig {
public static final String MANAGER_oto_customerPhone = MANAGER_HOST +"/kjy/manager/pub/form/customer/customerPhone"; public static final String MANAGER_oto_customerPhone = MANAGER_HOST +"/kjy/manager/pub/form/customer/customerPhone";
public static final String MANAGER_oto_qaDetail = MANAGER_HOST +"/kjy/manager/pub/form/customer/qaDetail"; public static final String MANAGER_oto_qaDetail = MANAGER_HOST +"/kjy/manager/pub/form/customer/qaDetail";
public static final String MANAGER_oto_channelList = MANAGER_HOST +"/kjy/manager/pub/form/channelList"; public static final String MANAGER_oto_channelList = MANAGER_HOST +"/kjy/manager/pub/form/channelList";
public static final String MANAGER_oto_updatePermission = MANAGER_HOST +"/kjy/manager/oto/seller/updatePermission";
public static final String MANAGER_oto_switchDimissionStatus = MANAGER_HOST +"/kjy/manager/oto/seller/switchDimissionStatus"; public static final String MANAGER_oto_switchDimissionStatus = MANAGER_HOST +"/kjy/manager/oto/seller/switchDimissionStatus";
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";
public static final String WORK_login = WORK_HOST + "/kjy/oto/manager/auth/login"; public static final String WORK_login = WORK_HOST + "/kjy/oto/manager/auth/login";
public static final String WORK_userInfo = WORK_HOST + "/kjy/oto/manager/auth/userInfo"; public static final String WORK_userInfo = WORK_HOST + "/kjy/oto/manager/auth/userInfo";
...@@ -1365,7 +1365,28 @@ public class BasicConfig { ...@@ -1365,7 +1365,28 @@ public class BasicConfig {
public static final String WORK_saveOrModifySchedule= WORK_HOST + "/kjy/oto/manager/sellerNotify/saveOrModifySchedule"; public static final String WORK_saveOrModifySchedule= WORK_HOST + "/kjy/oto/manager/sellerNotify/saveOrModifySchedule";
public static final String WORK_cancelSchedule= WORK_HOST + "/kjy/oto/manager/sellerNotify/cancelSchedule"; public static final String WORK_cancelSchedule= WORK_HOST + "/kjy/oto/manager/sellerNotify/cancelSchedule";
public static final String WORK_verifyCodet = WORK_HOST + "/kjy/oto/auto/test/verifyCode"; public static final String PHONE_customerList = MOBILE_HOST + "kjy/oto/customer/list";
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust"; public static final String PHONE_customerSave = MOBILE_HOST + "kjy/oto/customer/introduce/save";
public static final String PHONE_appointmentDetail = MOBILE_HOST + "/kjy/oto/interview/appointment/detail";
public static final String PHONE_fuzzyList = MOBILE_HOST + "/kjy/oto/cust/fuzzy/list";
public static final String PHONE_interviewSave = MOBILE_HOST + "/kjy/oto/interview/save";
public static final String PHONE_interviewUpdate = MOBILE_HOST + "/kjy/oto/interview/appointment/update";
public static final String PHONE_interviewList = MOBILE_HOST + "/kjy/oto/interview/list";
public static final String PHONE_interviewCancel = MOBILE_HOST + "/kjy/oto/interview/cancel";
public static final String PHONE_interviewCode = MOBILE_HOST + "/kjy/oto/h5/interview/code";
public static final String PHONE_interviewStatus = MOBILE_HOST + "/kjy/oto/h5/interview/status";
public static final String PHONE_interviewPhone = MOBILE_HOST + "/kjy/oto/h5/interview/phone";
public static final String PHONE_interviewBind = MOBILE_HOST + "/kjy/oto/h5/interview/bind";
public static final String PHONE_bindCancel = MOBILE_HOST + "/kjy/oto/h5/interview/cancel";
public static final String PHONE_feedbackDetail = MOBILE_HOST + "/kjy/oto/interview/feedback/detail";
public static final String PHONE_custExtDetail = MOBILE_HOST + "/kjy/oto/interview/custExtDetail";
public static final String PHONE_interviewFeedback = MOBILE_HOST + "/kjy/oto/interview/feedback";
public static final String PHONE_interviewDetail = MOBILE_HOST + "/kjy/oto/interview/edit/detail";
public static final String PHONE_authPhone = MOBILE_HOST + "/auth/oto/authPhone";
public static final String PHONE_getAuthPhone = MOBILE_HOST + "/auth/oto/getAuthPhone";
public static final String PHONE_submitEvaluate = MOBILE_HOST + "/kjy/oto/interview/submitEvaluate";
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";
} }
...@@ -408,7 +408,7 @@ public class BaseUtils { ...@@ -408,7 +408,7 @@ public class BaseUtils {
//专用于自动化获取验证码 //专用于自动化获取验证码
params.clear(); params.clear();
params.put("phoneNumber","18248405155"); params.put("phoneNumber","18248405155");
Response autoTestRes = network.getResponse(params,BasicConfig.WORK_verifyCodet); Response autoTestRes = network.getResponse(params,BasicConfig.WORK_verifyCode);
String captcha = autoTestRes.jsonPath().getString("data"); String captcha = autoTestRes.jsonPath().getString("data");
System.out.println(captcha); System.out.println(captcha);
...@@ -450,7 +450,7 @@ public class BaseUtils { ...@@ -450,7 +450,7 @@ public class BaseUtils {
//专用于自动化获取验证码 //专用于自动化获取验证码
params.clear(); params.clear();
params.put("phoneNumber","13454131091"); params.put("phoneNumber","13454131091");
Response autoTestRes = network.getResponse(params,BasicConfig.WORK_verifyCodet); Response autoTestRes = network.getResponse(params,BasicConfig.WORK_verifyCode);
String captcha = autoTestRes.jsonPath().getString("data"); String captcha = autoTestRes.jsonPath().getString("data");
System.out.println(captcha); System.out.println(captcha);
......
...@@ -32,9 +32,9 @@ public class JmeterAccountFile { ...@@ -32,9 +32,9 @@ public class JmeterAccountFile {
public static void otoCookieMaker() { public static void otoCookieMaker() {
OtoTokenCookie otoTokenCookie = new OtoTokenCookie(); OtoTokenCookie otoTokenCookie = new OtoTokenCookie();
otoTokenCookie.setExpiredTime(System.currentTimeMillis() + 86400*1000*150L); otoTokenCookie.setExpiredTime(System.currentTimeMillis() + 86400*1000*150L);
otoTokenCookie.setPhoneNumber("18909890978"); otoTokenCookie.setPhoneNumber("13454131091");
otoTokenCookie.setLoginId(IdMakeUtil.encodingId(21L, IdConvertBase64Enum.DEF)); otoTokenCookie.setLoginId(IdMakeUtil.encodingId(43L, IdConvertBase64Enum.DEF));
String json = JSON.toJSONString(otoTokenCookie); String json = JSON.toJSONString(otoTokenCookie);
String otoToken = BlowfishUtils.encryptBlowfish(json,"02a16fs1b6a3"); String otoToken = BlowfishUtils.encryptBlowfish(json,"02a16fs1b6a3");
......
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