Commit 793c76de authored by 郭姣's avatar 郭姣

久久保人管系统-正常权限模式

parent 0ac7bcff
......@@ -32,6 +32,9 @@ public interface Authorization {
network.agentCookies.put(otoManagerCookieKey, otoManagerCookieValue);
}
//久久保管理员-正常权限模式
default void jjbManagerAuth() {network.agentCookies.put(JJBManagerCookieKey,JJBManagerCookieValue);}
/**
* 集客助手相关授权
......
This diff is collapsed.
......@@ -45,6 +45,7 @@ public class BasicConfig {
public static final String WORK_HOST = "https://kjj-work.duibatest.com.cn";
public static final String FORM_HOST = "https://kjj-static.duibatest.com.cn";
public static final String PHONE_HOST = "https://kjj-auth.duibatest.com.cn";
public static final String JiuJiuBao_HOST = "https://oto-mng.duibatest.com.cn";
// *************** 管理后台 ***************
public static final String SSO_doLogin = SSO_HOST + "/doLogin";
......@@ -166,4 +167,20 @@ public class BasicConfig {
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust";
public static final String WORK_delPubFormRecord = WORK_HOST + "/kjy/oto/auto/test/delPubFormRecord";
//*************** 人管系统 ***************
public static final String JiuJiuBao_login = JiuJiuBao_HOST + "/oto/manager/login";
public static final String JiuJiuBao_auditSave = JiuJiuBao_HOST + "/oto/manager/audit/save";
public static final String JiuJiuBao_auditSubmitDetail = JiuJiuBao_HOST + "/oto/manager/audit/submit/detail";
public static final String JiuJiuBao_auditSubmit = JiuJiuBao_HOST + "/oto/manager/audit/submit";
public static final String JiuJiuBao_auditList = JiuJiuBao_HOST + "/oto/manager/audit/list";
public static final String JiuJiuBao_auditIsApprove = JiuJiuBao_HOST + "/oto/manager/audit/isApprove";
public static final String JiuJiuBao_sellerList = JiuJiuBao_HOST + "/oto/manager/seller/list";
public static final String JiuJiuBao_sellerUpdate = JiuJiuBao_HOST + "/oto/manager/seller/update";
public static final String JiuJiuBao_phoneChange = JiuJiuBao_HOST + "/oto/manager/seller/phone/change";
public static final String JiuJiuBao_updatePermission = JiuJiuBao_HOST + "/oto/manager/seller/updatePermission";
public static final String JiuJiuBao_accountBind = JiuJiuBao_HOST + "/oto/manager/jjb/seller/account/bind";
public static final String JiuJiuBao_accountUnbind = JiuJiuBao_HOST + "/oto/manager/seller/account/unbind";
public static final String JiuJiuBao_availableList = JiuJiuBao_HOST + "/oto/manager/jjb/seller/account/availableList";
public static final String JiuJiuBao_auditLeave = JiuJiuBao_HOST + "/oto/manager/audit/leave";
public static final String JiuJiuBao_aloginOut = JiuJiuBao_HOST + "/oto/manager/login/out";
}
package com.oto.utils;
import com.oto.config.BasicConfig;
import io.restassured.response.Response;
import org.testng.Assert;
import java.util.*;
......@@ -24,6 +26,8 @@ public class BaseUtils {
public static String otoLeaderCookieValue;
public static String otoManagerCookieKey;
public static String otoManagerCookieValue;
public static String JJBManagerCookieKey;
public static String JJBManagerCookieValue;
/**
* 登录管理后台
......@@ -183,4 +187,25 @@ public class BaseUtils {
// System.out.println("销售Cookie中key:"+ otoManagerCookieKey +" ,values:"+ otoManagerCookieValue);
}
/**
* 登录久久保系统(目前账号及登录密码是写死的)
*/
public static void JJBLogin(){
Map<String,Object> params = new HashMap<>();
params.put("userName","adminzc");
params.put("userPwd","oto88888888");
Response response = network.postResponse(params,JiuJiuBao_login);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(params, BasicConfig.JiuJiuBao_login,"久久保登录失败",response.body().asString()));
//获取cookie
String header = response.getHeader("Set-Cookie");
String cookieStr = header.split(";")[0];
String[] cookieKeyValue = cookieStr.split("=");
JJBManagerCookieKey = cookieKeyValue[0];
JJBManagerCookieValue = cookieKeyValue[1];
network.agentCookies.put(JJBManagerCookieKey,JJBManagerCookieValue);
System.out.println("久久保cookie中的key:"+JJBManagerCookieKey +",values:"+JJBManagerCookieValue);
}
}
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