Commit f1c1d61a authored by Su-Yi's avatar Su-Yi

修改boss看板

parent d4b3b76f
...@@ -324,18 +324,15 @@ public class Article { ...@@ -324,18 +324,15 @@ public class Article {
// 头部名片 // 头部名片
@Test(description="访客_头部名片详情",priority = 15) @Test(description="访客_头部名片详情",priority = 15)
public void 访客_头部名片详情() throws IOException { public void 访客_头部名片详情() throws IOException {
//获取加密的销售ID
Response response = network.getResponse(USER_INFO);
String sellerName = response.jsonPath().getString("data.sellerName");
//获取名片的姓名、公司等 //获取名片的姓名、公司等
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("sid",sid); params.put("sid",sid);
params.put("timestamp", System.currentTimeMillis()); params.put("timestamp", System.currentTimeMillis());
response = network.getResponse(params,SELLERCARD_TOPOFCONTENT); Response response = network.getResponse(params,SELLERCARD_TOPOFCONTENT);
String scId = response.jsonPath().getString("data.scid"); String scId = response.jsonPath().getString("data.scid");
String name = response.jsonPath().getString("data.sellerName"); String name = response.jsonPath().getString("data.sellerName");
Assert.assertEquals(name,sellerName,network.message(SELLERCARD_TOPOFCONTENT,"访客-头部名片信息显示有误",response.body().asString())); Assert.assertEquals(name,WECHAT_NAME,network.message(SELLERCARD_TOPOFCONTENT,"访客-头部名片信息显示有误",response.body().asString()));
//获取名片的点赞 //获取名片的点赞
Map<String, Object> likeParams = new HashMap<String, Object>(); Map<String, Object> likeParams = new HashMap<String, Object>();
......
...@@ -14,7 +14,6 @@ import java.util.List; ...@@ -14,7 +14,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import static com.kjj.qa.config.BasicConfig.*; import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.qa.config.BasicConfig.BOSS_USERINFO;
public class Boss { public class Boss {
private static final NetworkUtils network = NetworkUtils.getInstance(); private static final NetworkUtils network = NetworkUtils.getInstance();
...@@ -35,9 +34,9 @@ public class Boss { ...@@ -35,9 +34,9 @@ public class 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(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(BOSS_VERSIONINFO,"获取版本有误 此版本为非保险版",response.body().asString())); Assert.assertEquals(userVersion, 2,network.message(VERSION_INFO,"获取版本有误 此版本为非保险版",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()));
} }
...@@ -45,13 +44,13 @@ public class Boss { ...@@ -45,13 +44,13 @@ public class Boss {
//获取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(USER_INFO);
vipValid = response.jsonPath().getString("data.vipValid"); 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(vipValid,network.message(USER_INFO,"会员判断错误,为非会员",response.body().asString()));
Assert.assertNotNull(sellerId,network.message(BOSS_USERINFO,"获取sellerid失败",response.body().asString())); Assert.assertNotNull(sellerId,network.message(USER_INFO,"获取sellerid失败",response.body().asString()));
Assert.assertNotNull(sellerName,network.message(BOSS_USERINFO,"获取sellerName失败",response.body().asString())); Assert.assertNotNull(sellerName,network.message(USER_INFO,"获取sellerName失败",response.body().asString()));
} }
...@@ -94,11 +93,11 @@ public class Boss { ...@@ -94,11 +93,11 @@ public class Boss {
//获取info接口的代理人id //获取info接口的代理人id
@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(USER_INFO);
vistorId = response.jsonPath().getString("data.sellerId"); vistorId = response.jsonPath().getString("data.sellerId");
visitorName = response.jsonPath().getString("data.sellerName"); visitorName = response.jsonPath().getString("data.sellerName");
Assert.assertNotNull(vistorId,network.message(BOSS_USERINFO,"获取vistorId失败",response.body().asString())); Assert.assertNotNull(vistorId,network.message(USER_INFO,"获取vistorId失败",response.body().asString()));
Assert.assertNotNull(visitorName,network.message(BOSS_USERINFO,"获取sellerName失败",response.body().asString())); Assert.assertNotNull(visitorName,network.message(USER_INFO,"获取sellerName失败",response.body().asString()));
} }
//邀请结果判断 //邀请结果判断
...@@ -116,7 +115,7 @@ public class Boss { ...@@ -116,7 +115,7 @@ public class Boss {
params.put("sellerId",vistorId); 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,visitorName,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString())); Assert.assertEquals(name,sellerName,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
} }
//重新获取列表,代理人有无上下级判断; //重新获取列表,代理人有无上下级判断;
......
...@@ -133,6 +133,7 @@ public class BossTest { ...@@ -133,6 +133,7 @@ public class BossTest {
public static void tearDown(){ public static void tearDown(){
// 取消标记为内部人员 // 取消标记为内部人员
BaseUtils.switchInsider(1); BaseUtils.switchInsider(1);
} }
......
...@@ -54,7 +54,7 @@ public class SellerCard { ...@@ -54,7 +54,7 @@ public class SellerCard {
//修改用户信息 //修改用户信息
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("sellerName", "测试123"); params.put("sellerName", "自动化测试");
params.put("phoneNumber", "13012341234"); params.put("phoneNumber", "13012341234");
params.put("wechatNumber", "wx123456"); params.put("wechatNumber", "wx123456");
params.put("address", "杭州数娱大厦(文一西路98号)"); params.put("address", "杭州数娱大厦(文一西路98号)");
...@@ -71,10 +71,14 @@ public class SellerCard { ...@@ -71,10 +71,14 @@ public class SellerCard {
String wechatNumber = response.jsonPath().getString("data.wechatNumber"); String wechatNumber = response.jsonPath().getString("data.wechatNumber");
String address = response.jsonPath().getString("data.address"); String address = response.jsonPath().getString("data.address");
int avatarStyle = response.jsonPath().getInt("data.avatarStyle"); int avatarStyle = response.jsonPath().getInt("data.avatarStyle");
Assert.assertEquals(sellerName, "测试123", network.message(SELLERCARD_TOPOFDETAIL,"修改后的姓名不正确",response.body().asString())); Assert.assertEquals(sellerName, "自动化测试", network.message(SELLERCARD_TOPOFDETAIL,"修改后的姓名不正确",response.body().asString()));
Assert.assertEquals(phoneNumber, "13012341234", network.message(SELLERCARD_TOPOFDETAIL,"修改后的手机号不正确",response.body().asString())); Assert.assertEquals(phoneNumber, "13012341234", network.message(SELLERCARD_TOPOFDETAIL,"修改后的手机号不正确",response.body().asString()));
Assert.assertEquals(wechatNumber, "wx123456", network.message(SELLERCARD_TOPOFDETAIL,"修改后的微信号不正确",response.body().asString())); Assert.assertEquals(wechatNumber, "wx123456", network.message(SELLERCARD_TOPOFDETAIL,"修改后的微信号不正确",response.body().asString()));
Assert.assertEquals(address, "杭州数娱大厦(文一西路98号)", network.message(SELLERCARD_TOPOFDETAIL,"修改后的地址不正确",response.body().asString())); Assert.assertEquals(address, "杭州数娱大厦(文一西路98号)", network.message(SELLERCARD_TOPOFDETAIL,"修改后的地址不正确",response.body().asString()));
// 改为原微信昵称
params.put("sellerName", WECHAT_NAME);
editRsponse = network.postResponse(params, SELLERCARD_EDITBASEINFO);
} }
@Test(description = "专业介绍", priority = 4) @Test(description = "专业介绍", priority = 4)
......
...@@ -4,13 +4,14 @@ public class BasicConfig { ...@@ -4,13 +4,14 @@ public class BasicConfig {
public static int apiCount; //接口数量统计 public static int apiCount; //接口数量统计
// 是否开启钉钉机器人推送 // 是否开启钉钉机器人推送
public static final boolean isPushReport = false; //true public static final boolean isPushReport = true; //true
// 代理人 TKU // 代理人 TKU
public static String AGENT_TKU = "6uGEBBs2Mfzsv8PRvs7kZy65XFL9Nejw9xDQK8d29MDKzw1GsRWH3QrWeLgMoGPiprS3AmUFSAHGhD2aE"; public static String AGENT_TKU = null;
// 访客 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
...@@ -206,8 +207,6 @@ public class BasicConfig { ...@@ -206,8 +207,6 @@ public class BasicConfig {
// ************** BOSS看板 *************** // ************** BOSS看板 ***************
public static final String BOSS_VERSIONINFO = HOST + "/kjy/mp/version/info";
public static final String BOSS_ROLE = HOST + "/kjy/mp/seller/team/member/role"; public static final String BOSS_ROLE = HOST + "/kjy/mp/seller/team/member/role";
public static final String BOSS_CODE = HOST + "/kjy/mp/seller/team/invite/code"; public static final String BOSS_CODE = HOST + "/kjy/mp/seller/team/invite/code";
...@@ -220,8 +219,6 @@ public class BasicConfig { ...@@ -220,8 +219,6 @@ public class BasicConfig {
public static final String BOSS_REMOVE = HOST + "/kjy/mp/seller/team/member/remove"; public static final String BOSS_REMOVE = HOST + "/kjy/mp/seller/team/member/remove";
public static final String BOSS_USERINFO = HOST + "/kjy/mp/user/info";
public static final String BOSS_MEMBER = HOST + "/kjy/mp/seller/team/member"; public static final String BOSS_MEMBER = HOST + "/kjy/mp/seller/team/member";
public static final String BOSS_EDITCONFIG = HOST + "/kjy/mp/sellerConfig/editConfig"; public static final String BOSS_EDITCONFIG = HOST + "/kjy/mp/sellerConfig/editConfig";
......
...@@ -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"/>
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
<class name="com.kjj.qa.cases.Boss"/> <class name="com.kjj.qa.cases.Boss"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name="boss看板演示版">
<classes>
<class name="com.kjj.qa.cases.BossTest"/>
</classes>
</test>
<test preserve-order="true" name="贺卡"> <test preserve-order="true" name="贺卡">
<classes> <classes>
<class name="com.kjj.qa.cases.GreetingCard"/> <class name="com.kjj.qa.cases.GreetingCard"/>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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