Commit f5f10cad authored by 张艳玲's avatar 张艳玲

Merge branch 'Feature/20210312_zz' into 'master'

修改boss看板逻辑

See merge request test-group/kejiji!31
parents 3fe24467 7ee0dad7
package com.kjj.cases.basics; package com.kjj.cases.basics;
import com.kjj.config.BasicConfig;
import com.kjj.utils.NetworkUtils; import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response; import io.restassured.response.Response;
import org.testng.Assert; import org.testng.Assert;
...@@ -34,6 +35,7 @@ public class Boss { ...@@ -34,6 +35,7 @@ public class Boss {
//判断代理人的会员及版本 //判断代理人的会员及版本
@Test(description="代理人版本判断",priority = 1) @Test(description="代理人版本判断",priority = 1)
public void 代理人版本判断() throws IOException{ public void 代理人版本判断() throws IOException{
network.agentCookies.put("tku",AGENT_TKU);
Response response = network.getResponse(VERSION_INFO); Response response = network.getResponse(VERSION_INFO);
int userVersion = response.jsonPath().getInt("data.find {it.openType == 1}.userVersion");//判断是否为保险版:1是通用版 2是保险版 int userVersion = response.jsonPath().getInt("data.find {it.openType == 1}.userVersion");//判断是否为保险版:1是通用版 2是保险版
Assert.assertEquals(userVersion, 2,network.message(VERSION_INFO,"获取版本有误 此版本为非保险版",response.body().asString())); Assert.assertEquals(userVersion, 2,network.message(VERSION_INFO,"获取版本有误 此版本为非保险版",response.body().asString()));
...@@ -101,18 +103,19 @@ public class Boss { ...@@ -101,18 +103,19 @@ public class Boss {
}*/ }*/
//邀请结果判断 //邀请结果判断
@Test(description="邀请结果",priority = 7) @Test(description="邀请结果",priority = 7)
public void 邀请结果() throws IOException{ public void 邀请结果() throws IOException{
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("inviterSid",sellerId); params.put("inviterSid",sellerId);
params.put("inviteType",2); params.put("inviteType",2);
network.agentCookies.put("tku",VISITOR_TKU);
Response response = network.getResponse(params,BOSS_BOUND); Response response = network.getResponse(params,BOSS_BOUND);
boolean data =true;// response.jsonPath().getBoolean("data"); //1 true:邀请成功;2 false:邀请失败 boolean data =true;// response.jsonPath().getBoolean("data"); //1 true:邀请成功;2 false:邀请失败
Assert.assertTrue(data, network.message(params,BOSS_BOUND,"接受邀请失败",response.body().asString())); Assert.assertTrue(data, network.message(params,BOSS_BOUND,"接受邀请失败",response.body().asString()));
//获取被邀请人上级昵称 //获取被邀请人上级昵称
Map<String, Object> inviteparams = new HashMap<String, Object>(); Map<String, Object> inviteparams = new HashMap<String, Object>();
params.put("sellerId",vistorId); params.put("sellerId",vistorId);
Response responses = network.getResponse(inviteparams,BOSS_BOSS); Response responses = network.getResponse(inviteparams,BOSS_BOSS);
...@@ -169,10 +172,10 @@ public class Boss { ...@@ -169,10 +172,10 @@ public class Boss {
*/ */
//移除团队成员 //移除团队成员
@Test(description="移除团队成员",priority = 12) @Test(description="移除团队成员",priority = 11)
public void 移除团队成员() throws IOException{ public void 移除团队成员() throws IOException{
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
List<String> ss= Collections.singletonList(sids); List<String> ss= Collections.singletonList(BasicConfig.sids);
params.put("sids",ss); params.put("sids",ss);
Response response = network.postResponse(params,BOSS_REMOVE); Response response = network.postResponse(params,BOSS_REMOVE);
System.out.println(response.getBody().prettyPrint()); System.out.println(response.getBody().prettyPrint());
...@@ -182,7 +185,7 @@ public class Boss { ...@@ -182,7 +185,7 @@ public class Boss {
} }
//代理人无下级直接进入个人数据看板页面;获取上级昵称 //代理人无下级直接进入个人数据看板页面;获取上级昵称
@Test(description="获取上级昵称",priority = 13) @Test(description="获取上级昵称",priority = 12)
public void 获取上级昵称() throws IOException{ public void 获取上级昵称() throws IOException{
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("sellerId",sellerId); params.put("sellerId",sellerId);
...@@ -195,7 +198,7 @@ public class Boss { ...@@ -195,7 +198,7 @@ public class Boss {
//分享链接邀请下级加入 //分享链接邀请下级加入
@Test(description="邀请下级加入",priority = 14) @Test(description="邀请下级加入",priority = 13)
public void 邀请下级加入() throws IOException{ public void 邀请下级加入() throws IOException{
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("inviteType",2); params.put("inviteType",2);
......
...@@ -4,22 +4,25 @@ public class BasicConfig { ...@@ -4,22 +4,25 @@ public class BasicConfig {
public static int apiCount; //接口数量统计 public static int apiCount; //接口数量统计
// 是否开启钉钉机器人推送 // 是否开启钉钉机器人推送
public static final boolean isPushReport =true; //true public static final boolean isPushReport =false; //true
// 代理人微信昵称 // 代理人微信昵称
public static final String WECHAT_NAME = "客集集-梦晨"; //true public static final String WECHAT_NAME = "嘿保险"; //true
// 代理人的openid(固定) // 代理人的openid(固定)
public static final String OPEN_ID = "osi5w5l1lGC9T8f-sLNNurqvfS4A"; public static final String OPEN_ID = "osi5w5ggFiEXk0tPJH9b0KO_XU08";
// 直播用户 authkey // 直播用户 authkey
public static String AUTH_KEY = null; public static String AUTH_KEY = null;
// 代理人 TKU // 代理人 TKU
public static String AGENT_TKU = null; public static String AGENT_TKU = "T3gM31f18jCFEfpzTZYM4oW7udbzB6UdSqJjFdbd5BgroyqLxoTWGy8uZboRkQQmjJ8YQd8ns7TqzrPmW2";
// 访客 TKU // 访客 TKU
public static String VISITOR_TKU = null; public static String VISITOR_TKU = "T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfHcRNmyhTEzEbfmwrGFy5doVEinb1k3SVwreYQE";
// 访客的sids
public static final String sids = "Kj21MjMwNTU";
// 访客的userId(固定) // 访客的userId(固定)
public static final int VISITOR_USERID = 4425; public static final int VISITOR_USERID = 4425;
......
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