Commit 1fb3a2fd authored by 龚小红's avatar 龚小红

Merge branch 'Feature/20220620-gxh' into 'master'

增加查看微信权限用例

See merge request !11
parents 75ca94d6 906df06e
......@@ -14,6 +14,7 @@ import java.util.Date;
import java.util.HashMap;
import static com.oto.config.BasicConfig.LEADER_ID;
import static com.oto.config.BasicConfig.SELLER_ID;
import static com.oto.utils.BaseUtils.ssoLogin;
import static com.oto.utils.ThreadSleepUtils.sleep;
......@@ -31,17 +32,22 @@ public class Manager {
@Test(description = "分页查看销售列表",priority = 1)
public void 分页查看销售列表(){
Response response = null;
HashMap<String,Object> params = new HashMap<>();
params.put("pageIndex", "1");
params.put("pageSize", "20");
Response response = network.getResponse(params, BasicConfig.MANAGER_oto_sellerList);
int size = response.jsonPath().getInt("data.list.size()");
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 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");
int size= 0 ;
int i= 1;
while(size<1){
params.put("pageIndex",i);
params.put("pageSize", "20");
response = network.getResponse(params, BasicConfig.MANAGER_oto_sellerList);
size = response.jsonPath().getInt("data.list.findAll{it.id == "+ SELLER_ID+"}.size()");
i++;
}
int workStatus = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.workStatus");
int assignNewCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.assignNewCustPermission");
int assignRecycleCustPermission = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.assignRecycleCustPermission");
int callPermission = response.jsonPath().getInt("data.list.find{it.id == "+ SELLER_ID+"}.callPermission");
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()));
......
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