Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
龚小红
oto
Commits
793c76de
Commit
793c76de
authored
Jul 01, 2022
by
郭姣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
久久保人管系统-正常权限模式
parent
0ac7bcff
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
382 additions
and
0 deletions
+382
-0
Authorization.java
src/test/java/com/oto/cases/admin/Authorization.java
+3
-0
JiuJiuBao.java
src/test/java/com/oto/cases/otoseller/JiuJiuBao.java
+337
-0
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+17
-0
BaseUtils.java
src/test/java/com/oto/utils/BaseUtils.java
+25
-0
No files found.
src/test/java/com/oto/cases/admin/Authorization.java
View file @
793c76de
...
...
@@ -32,6 +32,9 @@ public interface Authorization {
network
.
agentCookies
.
put
(
otoManagerCookieKey
,
otoManagerCookieValue
);
}
//久久保管理员-正常权限模式
default
void
jjbManagerAuth
()
{
network
.
agentCookies
.
put
(
JJBManagerCookieKey
,
JJBManagerCookieValue
);}
/**
* 集客助手相关授权
...
...
src/test/java/com/oto/cases/otoseller/JiuJiuBao.java
0 → 100644
View file @
793c76de
This diff is collapsed.
Click to expand it.
src/test/java/com/oto/config/BasicConfig.java
View file @
793c76de
...
...
@@ -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"
;
}
src/test/java/com/oto/utils/BaseUtils.java
View file @
793c76de
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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment