Commit d4b3b76f authored by 张震's avatar 张震

Boss看板优化调整

parent 748ae0e3
......@@ -20,11 +20,12 @@ public class Boss {
private static final NetworkUtils network = NetworkUtils.getInstance();
public String sellerId;
public String usellerId;
public String vistorId;
public String sids;
public String visitorame;
public String sellername;
public String superiorname;
public String visitorName;
public String sellerName;
public String superiorName;
public String vipValid;
@BeforeClass
public void setUp() {
......@@ -32,23 +33,26 @@ public class Boss {
}
//BOSS看板正式版
//判断代理人的会员及版本
@Test(description="会员及版本判断",priority = 1)
public void 会员及版本判断() throws IOException{
@Test(description="代理人版本判断",priority = 1)
public void 代理人版本判断() throws IOException{
Response response = network.getResponse(BOSS_VERSIONINFO);
int userVersion = response.jsonPath().getInt("data.find {it.openType == 1}.userVersion");//判断是否为保险版:1是通用版 2是保险版
Assert.assertEquals(userVersion, 2,network.message(BOSS_VERSIONINFO,"获取版本有误 此版本为非保险版",response.body().asString()));
boolean isVip = response.jsonPath().getBoolean("data.find {it.openType == 1}.vip"); //判断是否为会员
Assert.assertTrue(isVip,network.message(BOSS_VERSIONINFO,"会员判断错误 为非会员",response.body().asString()));
//boolean isVip = response.jsonPath().getBoolean("data.find {it.openType == 1}.vip"); //判断是否为会员
//Assert.assertTrue(isVip,network.message(BOSS_VERSIONINFO,"会员判断错误 为非会员",response.body().asString()));
}
//获取info接口的代理人id
@Test(description="获取代理人id",priority = 2)
public void 获取代理人id() throws IOException{
Response response = network.getResponse(BOSS_USERINFO);
vipValid = response.jsonPath().getString("data.vipValid");
sellerId = response.jsonPath().getString("data.sellerId");
sellername = response.jsonPath().getString("data.sellerName");
sellerName = response.jsonPath().getString("data.sellerName");
Assert.assertNotNull(vipValid,network.message(BOSS_USERINFO,"会员判断错误,为非会员",response.body().asString()));
Assert.assertNotNull(sellerId,network.message(BOSS_USERINFO,"获取sellerid失败",response.body().asString()));
Assert.assertNotNull(sellername,network.message(BOSS_USERINFO,"获取sellerName失败",response.body().asString()));
Assert.assertNotNull(sellerName,network.message(BOSS_USERINFO,"获取sellerName失败",response.body().asString()));
}
//代理人有无上下级判断;
......@@ -81,7 +85,7 @@ public class Boss {
//tku 切换为访客的
network.agentCookies.put("tku",VISITOR_TKU);
Map<String, Object> params = new HashMap<String, Object>();
params.put("sellerId",usellerId);
params.put("sellerId",vistorId);
Response response = network.getResponse(params,BOSS_IDENTITY);
int identity = response.jsonPath().getInt("data.identity"); //1团长、2成员、3没有团队
Assert.assertEquals(identity, 3, network.message(params,BOSS_IDENTITY,"被邀请人已有团队或已绑定上级,不能再接受邀请",response.body().asString()));
......@@ -91,10 +95,10 @@ public class Boss {
@Test(description="获取访客id",priority = 6)
public void 获取访客id() throws IOException{
Response response = network.getResponse(BOSS_USERINFO);
usellerId = response.jsonPath().getString("data.sellerId");
visitorame = response.jsonPath().getString("data.sellerName");
Assert.assertNotNull(usellerId,network.message(BOSS_USERINFO,"获取usellerid失败",response.body().asString()));
Assert.assertNotNull(visitorame,network.message(BOSS_USERINFO,"获取sellerName失败",response.body().asString()));
vistorId = response.jsonPath().getString("data.sellerId");
visitorName = response.jsonPath().getString("data.sellerName");
Assert.assertNotNull(vistorId,network.message(BOSS_USERINFO,"获取vistorId失败",response.body().asString()));
Assert.assertNotNull(visitorName,network.message(BOSS_USERINFO,"获取sellerName失败",response.body().asString()));
}
//邀请结果判断
......@@ -109,10 +113,10 @@ public class Boss {
//获取被邀请人上级昵称
Map<String, Object> inviteparams = new HashMap<String, Object>();
params.put("sellerId",usellerId);
params.put("sellerId",vistorId);
Response responses = network.getResponse(inviteparams,BOSS_BOSS);
String name = responses.jsonPath().getString("data");
Assert.assertEquals(name,visitorame,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
Assert.assertEquals(name,visitorName,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
}
//重新获取列表,代理人有无上下级判断;
......@@ -138,8 +142,8 @@ public class Boss {
params.put("sellerId",sellerId);
Response response = network.getResponse(params,BOSS_BOSS);
String data = response.jsonPath().getString("data");
superiorname = response.jsonPath().getString("data");
Assert.assertEquals(data,superiorname,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
superiorName = response.jsonPath().getString("data");
Assert.assertEquals(data,superiorName,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
}
//获取代理人团队人数
......@@ -181,8 +185,8 @@ public class Boss {
params.put("sellerId",sellerId);
Response response = network.getResponse(params,BOSS_BOSS);
String data = response.jsonPath().getString("data");
superiorname = response.jsonPath().getString("data");
Assert.assertEquals(data,superiorname,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
superiorName = response.jsonPath().getString("data");
Assert.assertEquals(data,superiorName,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
}
......
......@@ -7,11 +7,10 @@ public class BasicConfig {
public static final boolean isPushReport = false; //true
// 代理人 TKU
public static String AGENT_TKU = null;
public static String AGENT_TKU = "6uGEBBs2Mfzsv8PRvs7kZy65XFL9Nejw9xDQK8d29MDKzw1GsRWH3QrWeLgMoGPiprS3AmUFSAHGhD2aE";
// 访客 TKU
public static final String VISITOR_TKU = "T3gM31f18jAW2hicRDxbwHFSuwA4MMVLLeHZ5G4yvb3kN2xUC7kBMVyjghwaMUaBkXBb34TrZkSBtySoUs";
// 代理人微信昵称
public static final String WECHAT_NAME = "客集集-梦晨"; //true
......
......@@ -6,16 +6,16 @@
<!-- <class name="com.kjj.qa.cases.Home"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="支付">-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Pay"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="新手任务">-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="支付">
<classes>
<class name="com.kjj.qa.cases.Pay"/>
</classes>
</test>
<test preserve-order="true" name="名片">
<classes>
<class name="com.kjj.qa.cases.SellerCard"/>
......
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