Commit 63d06560 authored by 龚小红's avatar 龚小红

增加权限管理的相关用例

parent 4011d4fa
...@@ -35,9 +35,9 @@ public class Manager { ...@@ -35,9 +35,9 @@ public class Manager {
int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.assignRecycleCustPermission"); int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.assignRecycleCustPermission");
int callPermission = response.jsonPath().getInt("data.list.find{it.id == "+ 42+"}.callPermission"); 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(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(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())); Assert.assertEquals(callPermission,1,network.message(params,BasicConfig.MANAGER_oto_searchSeller,"呼叫权限错误",response.body().asString()));
} }
@Test(description = "通过销售名称查找销售",priority = 2) @Test(description = "通过销售名称查找销售",priority = 2)
......
...@@ -838,24 +838,6 @@ public class Work implements Authorization { ...@@ -838,24 +838,6 @@ public class Work implements Authorization {
Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"开启总监的新客户认领权限和回收客户认领权限失败",response.body().asString())); Assert.assertTrue(success,network.message(BasicConfig.MANAGER_oto_updatePermission,"开启总监的新客户认领权限和回收客户认领权限失败",response.body().asString()));
} }
@Test(description = "销售间客户动态取消隔离",priority = 63)
public void 销售间客户动态取消隔离(){
//将客户重新分配给总监
HashMap<String,Object> params = new HashMap<>();
params.put("customerId",custId);
params.put("sellerId",LEADER_ID);
Response response = network.postResponse(params,BasicConfig.MANAGER_oto_assignSeller);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(BasicConfig.MANAGER_oto_assignSeller,"重新分配失败",response.body().asString()));
//总监查看客户动态
params.clear();
params.put("custId",custId);
params.put("logDays",1);
Response logRes = network.getResponse(params,BasicConfig.WORK_operation);
int logSize = logRes.jsonPath().getInt("data.list.size()");
Assert.assertTrue(logSize>0,network.message(BasicConfig.WORK_operation,"客户动态隔离失败",logRes.body().asString()));
}
@Test(description = "删除客户",priority = 79) @Test(description = "删除客户",priority = 79)
public void 删除客户(){ public void 删除客户(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
......
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