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

修改boss看板

parent c05e9e55
......@@ -88,7 +88,6 @@ public class Boss {
Assert.assertEquals(identity, 3, network.message(params,BOSS_IDENTITY,"被邀请人已有团队或已绑定上级,不能再接受邀请"));
}
//获取info接口的代理人id
@Test(description="获取访客id",priority = 6)
public void 获取访客id() throws IOException{
......@@ -97,10 +96,8 @@ public class Boss {
visitorame = response.jsonPath().getString("data.sellerName");
Assert.assertNotNull(usellerId,network.message(BOSS_USERINFO,"获取usellerid失败"));
Assert.assertNotNull(visitorame,network.message(BOSS_USERINFO,"获取sellerName失败"));
}
//邀请结果判断
@Test(description="邀请结果",priority = 7)
public void 邀请结果() throws IOException{
......@@ -119,7 +116,6 @@ public class Boss {
Assert.assertEquals(name,visitorame,network.message(params,BOSS_BOSS,"昵称不匹配"));
}
//重新获取列表,代理人有无上下级判断;
@Test(description="当前代理人角色二次判断",priority = 8)
public void 当前代理人角色二次判断() throws IOException{
......@@ -135,8 +131,6 @@ public class Boss {
}
//团队长数据看板
//代理人已存在下级直接进入团队长数据看板;获取上级团队昵称
@Test(description="获取上级团队昵称",priority = 9)
......
......@@ -17,6 +17,7 @@ import static io.restassured.RestAssured.given;
public class ManagerUtil {
private static final NetworkUtil network = NetworkUtil.getInstance();
// 管理后台登录
public static void ssologin(){
network.host = SSO_HOST;
//1.先进入SSO登录框 登入管理后台
......@@ -39,23 +40,15 @@ public class ManagerUtil {
network.agentHeaders.put("X-Csrf-Token",ssoCookies.get("csrf_token"));
}
//切换vip
public static void switchvip() {
network.host = HOST;
// 1.拿到sellerId
Response response = network.getResponse(USER_INFO);
String sellerId = response.jsonPath().getString("data.sellerId");
System.out.println(network.agentCookies);
// 切换vip
public static void switchvip(String sellerId){
network.host = MANAGER_HOST;
// 2.切换公司为客集集
Map<String, Object> changeParams = new HashMap<String, Object>();
changeParams.put("id",sellerId);
changeParams.put("companyId",6);
response = network.getResponse(changeParams,MANAGER_CHANGECOMPANY);
Map<String, Object> switchCompanyParams = new HashMap<String, Object>();
switchCompanyParams.put("id",sellerId);
switchCompanyParams.put("companyId",6);
Response response = network.getResponse(switchCompanyParams,MANAGER_CHANGECOMPANY);
response.body().prettyPrint();
// 3.切换为保险版vip
......@@ -70,18 +63,32 @@ public class ManagerUtil {
response.body().prettyPrint();
// 4.切换公司为空
changeParams.remove("companyId",6); //去掉公司
response = network.getResponse(changeParams,MANAGER_CHANGECOMPANY);
switchCompanyParams.remove("companyId",6); //去掉公司
response = network.getResponse(switchCompanyParams,MANAGER_CHANGECOMPANY);
response.body().prettyPrint();
network.host = HOST;
}
// 切换为内部人员
public static void switchInsider(String sellerId) {
// https://kjj-mng.duibatest.com.cn/kjy/manager/seller/setInternalSeller?id=2163&internalSeller=1
Map<String, Object> params = new HashMap<String, Object>();
params.put("id",sellerId);
params.put("internalSeller",1);
}
public static void main(String[] args) throws IOException {
// 1.拿到sellerId
Response response = network.getResponse(USER_INFO);
String sellerId = response.jsonPath().getString("data.sellerId");
ssologin();
switchvip();
switchvip(sellerId);
}
}
......@@ -36,11 +36,11 @@
<class name="com.kjj.qa.cases.CircleFriends"/>
</classes>
</test>
<!-- <test preserve-order="true" name="boss看板">-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Boss"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="boss看板">
<classes>
<class name="com.kjj.qa.cases.Boss"/>
</classes>
</test>
<!-- 监听器-->
<listeners>
<listener class-name="com.kjj.qa.config.ExtentTestNGIReporterListener"/>
......
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