Commit d4b3b76f authored by 张震's avatar 张震

Boss看板优化调整

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