Commit 4ffa3ab5 authored by 龚小红's avatar 龚小红

Merge branch 'Faeture/20221021-gxh' into 'master'

更新总监盘点的header接口

See merge request !39
parents 8ac236aa e31773e6
......@@ -118,26 +118,26 @@ public class Manager implements Authorization {
int size = response.jsonPath().getInt("data.size");
Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_oto_channelList,"渠道列表为空",response.body().asString()));
}
//
// @Test(description = "不可新增同一手机号销售",priority = 5)
// public void 不可新增同一手机号销售(){
// HashMap<String,Object> params = new HashMap<>();
// params.put("sellerName", "勿动-自动化邀约");
// params.put("phoneNumber", "18248405155");
// params.put("roleType", 1);
// params.put("callPermission", 1);
// params.put("sellerStatus", 1);
// params.put("companyIds", new int[]{5});
// params.put("roles", new int[]{5});
// 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);
// boolean success = response.jsonPath().getBoolean("success");
// Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_saveSeller,"新增同一手机号销售成功",response.body().asString()));
// }
//
@Test(description = "不可新增同一手机号销售",priority = 5)
public void 不可新增同一手机号销售(){
HashMap<String,Object> params = new HashMap<>();
params.put("sellerName", "勿动-自动化邀约");
params.put("phoneNumber", "18248405155");
params.put("roleType", 1);
params.put("callPermission", 1);
params.put("sellerStatus", 1);
params.put("companyIds", new int[]{5});
params.put("roles", new int[]{5});
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);
boolean success = response.jsonPath().getBoolean("success");
Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_saveSeller,"新增同一手机号销售成功",response.body().asString()));
}
//
@Test(description = "公域引流_填写表单",priority = 6)
public void 公域引流_填写表单(){
......@@ -145,7 +145,7 @@ public class Manager implements Authorization {
PubForm("1513636130"+i,"自动化测试用户"+i);
}
// for(int i = 30;i<50;i++){
// for(int i = 10;i<20;i++){
// HashMap<String,Object> params = new HashMap<>();
// params.put("formId", "Kj22MTU5MQ");
// params.put("phoneNum", "130112100"+i);
......@@ -220,12 +220,12 @@ public class Manager implements Authorization {
Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_oto_listAllCompany,"查看所有公司列表为空",response.body().asString()));
}
// @Test(description = "查看所有总监列表",priority = 11)
// public void 查看所有总监列表(){
// Response response = network.getResponse(BasicConfig.MANAGER_oto_directorList);
// int size = response.jsonPath().getInt("data.list.size()");
// Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_oto_directorList,"查看所有总监列表为空",response.body().asString()));
// }
@Test(description = "查看所有总监列表",priority = 11)
public void 查看所有总监列表(){
Response response = network.getResponse(BasicConfig.MANAGER_oto_directorList);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_oto_directorList,"查看所有总监列表为空",response.body().asString()));
}
@Test(description = "修改工作状态为请假中",priority = 12)
public void 修改工作状态为请假中(){
......
......@@ -208,9 +208,18 @@ public class Work implements Authorization {
public void 查询新客户头部信息(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("type", 1);
Response response = network.getResponse(params,BasicConfig.WORK_header);
Object data = response.jsonPath().getJsonObject("data");
Assert.assertNotNull(data,network.message(params,BasicConfig.WORK_header,"头部信息为空",response.body().asString()));
int allCallTimes= response.jsonPath().getInt("data.allCallTimes");
int allCallTime= response.jsonPath().getInt("data.allCallTime");
int callTimes= response.jsonPath().getInt("data.callTimes");
int custStar= response.jsonPath().getInt("data.custStar");
int addWxStatus= response.jsonPath().getInt("data.custStar");
Assert.assertEquals(allCallTimes,0,network.message(params,BasicConfig.WORK_header,"总通话次数非0",response.body().asString()));
Assert.assertEquals(allCallTime,0,network.message(params,BasicConfig.WORK_header,"总call次数非0",response.body().asString()));
Assert.assertEquals(callTimes,0,network.message(params,BasicConfig.WORK_header,"总通话时间非0",response.body().asString()));
Assert.assertEquals(custStar,0,network.message(params,BasicConfig.WORK_header,"客户星标不为否",response.body().asString()));
Assert.assertEquals(addWxStatus,0,network.message(params,BasicConfig.WORK_header,"客户的加微状态不是未添加",response.body().asString()));
}
@Test(description = "查询新客户详细信息",priority = 16)
......
......@@ -27,7 +27,7 @@ public class NetworkUtils {
//cookies中的tku
agentCookies.put("tku",AGENT_TKU);
//多场景测试标志
agentCookies.put("_duibaServiceGroupKey","miria-3395");
agentCookies.put("_duibaServiceGroupKey","miria-3401");
//json类型的headers
agentHeaders.put("Content-Type","application/json");
//二进制文件的headers
......
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