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
3405d019
Commit
3405d019
authored
Dec 15, 2021
by
郭姣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公司专区增加赠险、测评接口用例
parent
990d31a5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
250 additions
and
30 deletions
+250
-30
HomePage.java
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
+236
-29
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+12
-1
BaseUtils.java
src/test/java/com/kjj/utils/BaseUtils.java
+2
-0
No files found.
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
View file @
3405d019
...
...
@@ -10,6 +10,7 @@ import static com.kjj.utils.ThreadSleepUtils.sleep;
import
com.kjj.bean.marketTools.Activity
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.cases.assistant.whoSawMe.ForwardAndRead
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.ThreadSleepUtils
;
...
...
@@ -41,7 +42,12 @@ public class HomePage implements Authorization {
public
long
articleId
;
//解密后的的文章id
public
int
totalCount
;
//视频数量
public
int
companyCount
;
//公司专区数量
public
long
insuranceId
;
//管理后台赠险id
public
long
adviceId1
;
//用户话术ID
public
long
adviceId2
;
//代理人话术ID
public
long
listSimpleId
;
//赠险列表id
public
String
companyContentId
;
//公司专区文章Id
public
String
companyScId
;
//公司专区scid
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
...
...
@@ -321,8 +327,83 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
obj
,
totalCount
-
1
,
network
.
message
(
params
,
HOME_getContentList
,
"获取首页视频列表失败"
,
response
.
body
().
asString
()));
}
//管理后台编辑赠险
@Test
(
description
=
"管理后台_查看赠险列表"
,
priority
=
18
)
public
void
查看赠险列表
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyId"
,
21
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_insuranceListByCompanyId
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_insuranceListByCompanyId
,
"获取赠险列表失败"
,
response
.
body
().
asString
()));
insuranceId
=
response
.
jsonPath
().
getLong
(
"data.get(0).id"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_insuranceListByCompanyId
,
"获取赠险id失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"编辑赠险"
,
priority
=
19
)
public
void
编辑赠险
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
insuranceId
);
params
.
put
(
"insuranceAmount"
,
"100"
);
params
.
put
(
"insuranceDesc"
,
"1111"
);
params
.
put
(
"insuranceImgUrl"
,
"https://yun.dui88.com/kjy/image/20211203/1638499341189.png"
);
params
.
put
(
"insuranceLink"
,
"https://www.baidu.com/"
);
params
.
put
(
"insuranceName"
,
"人身意外保障险"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_insuranceUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_insuranceUpdate
,
"编辑赠险失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"编辑话术"
,
priority
=
20
)
public
void
编辑话术
(){
//新增用户话术
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"adviceContent"
,
"测试用户使用话术"
);
params
.
put
(
"adviceType"
,
"10"
);
params
.
put
(
"bizId"
,
"1"
);
params
.
put
(
"contentId"
,
""
);
params
.
put
(
"userType"
,
2
);
Response
userRes
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_adviceWordAddOrUpdateWord
);
boolean
userData
=
userRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
userData
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_adviceWordAddOrUpdateWord
,
"新增用户话术失败"
,
userRes
.
body
().
asString
()));
//新增代理人话术
params
.
clear
();
params
.
put
(
"adviceContent"
,
"测试代理人使用话术"
);
params
.
put
(
"adviceType"
,
"10"
);
params
.
put
(
"bizId"
,
"1"
);
params
.
put
(
"contentId"
,
"9398"
);
params
.
put
(
"contentTitle"
,
"硬战 I #特别战#经典永不褪色,黑红XI王者归来1111"
);
params
.
put
(
"userType"
,
1
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_adviceWordAddOrUpdateWord
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_adviceWordAddOrUpdateWord
,
"新增代理人话术失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取话术列表"
,
priority
=
21
)
public
void
获取话术列表
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"adviceType"
,
"10"
);
params
.
put
(
"bizId"
,
"1"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_adviceWordGetWordList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_adviceWordGetWordList
,
"获取话术列表失败"
,
response
.
body
().
asString
()));
adviceId1
=
response
.
jsonPath
().
getLong
(
"data.get(0).id"
);
adviceId2
=
response
.
jsonPath
().
getLong
(
"data.get(1).id"
);
}
@Test
(
description
=
"开启赠险开关"
,
priority
=
22
)
public
void
开启赠险开关
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
insuranceId
);
params
.
put
(
"insuranceStatus"
,
2
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_insuranceSwitchStatus
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_insuranceSwitchStatus
,
"开启赠险开关失败"
,
response
.
body
().
asString
()));
}
//管理后台新增公司专区内容
@Test
(
description
=
"管理后台_新增内容"
,
priority
=
18
)
@Test
(
description
=
"管理后台_新增内容"
,
priority
=
23
)
public
void
新增内容
(){
//根据文章内容id匹配
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -356,8 +437,77 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
desc
,
"OK"
,
network
.
message
(
addParams
,
MANAGER_itemAddOrUpdate
,
"新增公司专区内容失败"
,
addRes
.
body
().
asString
()));
}
//管理后台新增公司专区视频
@Test
(
description
=
"管理后台_公司专区新增视频"
,
priority
=
19
)
@Test
(
description
=
"获取赠险下拉框列表"
,
priority
=
24
)
public
void
获取赠险下拉框列表
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyId"
,
21
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_listSimpleByCompanyIds
);
listSimpleId
=
response
.
jsonPath
().
getLong
(
"data.get(0).id"
);
System
.
out
.
println
(
listSimpleId
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_listSimpleByCompanyIds
,
"获取赠险下拉框列表失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"根据互动方案id查询名称"
,
priority
=
25
)
public
void
根据互动方案
id
查询名称
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"interactId"
,
412
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_solutionActivityName
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_solutionActivityName
,
"根据互动方案id查询名称"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"编辑活动设置"
,
priority
=
26
)
public
void
编辑活动设置
(){
//获取新增文章的id
ThreadSleepUtils
.
sleep
(
4000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"exclusiveAreaId"
,
21
);
params
.
put
(
"title"
,
""
);
params
.
put
(
"state"
,
0
);
params
.
put
(
"pageNo"
,
1
);
params
.
put
(
"pageSize"
,
20
);
Response
listRes
=
network
.
getResponse
(
params
,
MANAGER_exclusiveItemPage
);
Object
id
=
listRes
.
jsonPath
().
getJsonObject
(
"data.list.get(2).id"
);
System
.
out
.
println
(
id
);
String
desc
=
listRes
.
jsonPath
().
getString
(
"desc"
);
Assert
.
assertEquals
(
desc
,
"OK"
,
network
.
message
(
params
,
MANAGER_exclusiveItemPage
,
"获取id失败"
,
listRes
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"id"
,
id
);
List
list
=
new
ArrayList
();
list
.
add
(
listSimpleId
);
List
list1
=
new
ArrayList
();
list1
.
add
(
412
);
params
.
put
(
"companyInsuranceIds"
,
list
);
params
.
put
(
"interactIds"
,
list1
);
Response
activityRes
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_exclusiveItemConfItemExt
);
boolean
data
=
activityRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_exclusiveItemConfItemExt
,
"编辑活动设置失败"
,
activityRes
.
body
().
asString
()));
}
@Test
(
description
=
"获取内容配置详情"
,
priority
=
27
)
public
void
获取内容配置详情
(){
//获取内容id
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"exclusiveAreaId"
,
21
);
params
.
put
(
"title"
,
""
);
params
.
put
(
"state"
,
0
);
params
.
put
(
"pageNo"
,
1
);
params
.
put
(
"pageSize"
,
20
);
Response
listRes
=
network
.
getResponse
(
params
,
MANAGER_exclusiveItemPage
);
Object
id
=
listRes
.
jsonPath
().
getJsonObject
(
"data.list.get(2).id"
);
params
.
clear
();
params
.
put
(
"id"
,
id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_itemConfDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_itemConfDetail
,
"获取内容配置详情失败"
,
response
.
body
().
asString
()));
}
// 管理后台新增公司专区视频
@Test
(
description
=
"管理后台_公司专区新增视频"
,
priority
=
28
)
public
void
公司专区新增视频
(){
//根据文章内容id匹配
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -392,7 +542,7 @@ public class HomePage implements Authorization {
}
//获取首页公司专区
@Test
(
description
=
"首页_公司专区"
,
priority
=
2
0
)
@Test
(
description
=
"首页_公司专区"
,
priority
=
2
9
)
public
void
首页
_
公司专区
(){
Response
response
=
network
.
getResponse
(
HOME_getExclusiveArea
);
String
desc
=
response
.
jsonPath
().
getString
(
"desc"
);
...
...
@@ -400,12 +550,12 @@ public class HomePage implements Authorization {
}
//获取公司首页公司专区列表
@Test
(
description
=
"首页_公司专区列表"
,
priority
=
21
)
@Test
(
description
=
"首页_公司专区列表"
,
priority
=
30
)
public
void
首页
_
公司专区列表
(){
//获取公司专区标签id
sleep
(
5000
);
Response
response
=
network
.
getResponse
(
Daily_getTagList
);
Object
id
=
response
.
jsonPath
().
getJsonObject
(
"data.get(
0
).id"
);
Object
id
=
response
.
jsonPath
().
getJsonObject
(
"data.get(
1
).id"
);
String
desc
=
response
.
jsonPath
().
getString
(
"desc"
);
Assert
.
assertEquals
(
desc
,
"OK"
,
network
.
message
(
Daily_getTagList
,
"获取标签id失败"
,
response
.
body
().
asString
()));
...
...
@@ -418,11 +568,68 @@ public class HomePage implements Authorization {
params
.
put
(
"source"
,
1
);
Response
listRes
=
network
.
getResponse
(
params
,
HOME_companyGetContentList
);
companyCount
=
listRes
.
jsonPath
().
getInt
(
"data.totalCount"
);
companyContentId
=
listRes
.
jsonPath
().
getString
(
"data.list[1].contentId"
);
System
.
out
.
println
(
companyContentId
);
Assert
.
assertTrue
(
companyCount
>
0
,
network
.
message
(
params
,
HOME_companyGetContentList
,
"获取公司专区内容列表数据错误"
,
listRes
.
body
().
asString
()));
}
@Test
(
description
=
"获取文章配置的公司专区互动方案"
,
priority
=
31
)
public
void
获取文章配置的公司专区互动方案
(){
//获取scId
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"contentId"
,
companyContentId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
GETSCID
);
companyScId
=
response
.
jsonPath
().
getString
(
"data"
);
System
.
out
.
println
(
companyScId
);
Assert
.
assertNotNull
(
companyScId
,
network
.
message
(
params
,
BasicConfig
.
GETSCID
,
"获取scid失败"
,
response
.
body
().
asString
()));
//获取互动方案
params
.
clear
();
params
.
put
(
"scid"
,
companyScId
);
Response
interactRes
=
network
.
getResponse
(
params
,
HOME_companyInteract
);
Object
data
=
interactRes
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
HOME_companyInteract
,
"获取互动方案列表失败"
,
interactRes
.
body
().
asString
()));
}
@Test
(
description
=
"获取文章配置的公司专区赠险"
,
priority
=
32
)
public
void
获取文章配置的公司专区赠险
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"scid"
,
companyScId
);
Response
interactRes
=
network
.
getResponse
(
params
,
HOME_companyInsurance
);
Object
data
=
interactRes
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
HOME_companyInsurance
,
"获取赠险列表失败"
,
interactRes
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台删除用户话术"
,
priority
=
33
)
public
void
管理后台删除话术
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
adviceId1
);
Response
response
=
network
.
postResponse
(
params
,
MANAGER_adviceWordDelWord
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
MANAGER_adviceWordDelWord
,
"删除用户话术失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台删除代理人话术"
,
priority
=
34
)
public
void
管理后台删除代理人话术
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
adviceId2
);
Response
response
=
network
.
postResponse
(
params
,
MANAGER_adviceWordDelWord
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
MANAGER_adviceWordDelWord
,
"删除代理人话术失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_关闭赠险"
,
priority
=
35
)
public
void
管理后台
_
关闭赠险
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
insuranceId
);
params
.
put
(
"insuranceStatus"
,
1
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_insuranceSwitchStatus
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_insuranceSwitchStatus
,
"关闭赠险开关失败"
,
response
.
body
().
asString
()));
}
//管理后台删除文章
@Test
(
description
=
"管理后台_删除公司专区内容"
,
priority
=
22
)
@Test
(
description
=
"管理后台_删除公司专区内容"
,
priority
=
36
)
public
void
管理后台
_
删除公司专区内容
(){
ThreadSleepUtils
.
sleep
(
2000
);
//获取删除的内容的id
...
...
@@ -462,7 +669,7 @@ public class HomePage implements Authorization {
}
//管理后台删除视频
@Test
(
description
=
"管理后台_删除公司专区视频"
,
priority
=
23
)
@Test
(
description
=
"管理后台_删除公司专区视频"
,
priority
=
37
)
public
void
管理后台
_
删除公司专区视频
(){
//获取删除的视频的id
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -500,7 +707,7 @@ public class HomePage implements Authorization {
}
//管理后台新增成功案例
@Test
(
description
=
"管理后台_新增成功案例"
,
priority
=
24
)
@Test
(
description
=
"管理后台_新增成功案例"
,
priority
=
38
)
public
void
新增成功案例
(){
//根据内容ID匹配内容标题
...
...
@@ -528,7 +735,7 @@ public class HomePage implements Authorization {
Assert
.
assertTrue
(
addSuccess
,
network
.
message
(
addParams
,
MANAGER_addOrUpdateCases
,
"新增成功案例失败"
,
addRes
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_获取成功案例列表"
,
priority
=
25
)
@Test
(
description
=
"管理后台_获取成功案例列表"
,
priority
=
39
)
public
void
获取成功案例列表
(){
Response
response
=
network
.
getResponse
(
MANAGER_caseList
);
Object
list
=
response
.
jsonPath
().
getJsonObject
(
"data.list"
);
...
...
@@ -536,7 +743,7 @@ public class HomePage implements Authorization {
Assert
.
assertNotNull
(
list
,
network
.
message
(
MANAGER_caseList
,
"获取成功案例列表失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_获取案例详情"
,
priority
=
26
)
@Test
(
description
=
"管理后台_获取案例详情"
,
priority
=
40
)
public
void
获取案例详情
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
caseId
);
...
...
@@ -545,7 +752,7 @@ public class HomePage implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
MANAGER_successCaseDetail
,
"获取案例详情失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_编辑案例"
,
priority
=
27
)
@Test
(
description
=
"管理后台_编辑案例"
,
priority
=
41
)
public
void
编辑案例
(){
//编辑成功案例
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -564,7 +771,7 @@ public class HomePage implements Authorization {
Assert
.
assertTrue
(
addSuccess
,
network
.
message
(
params
,
MANAGER_addOrUpdateCases
,
"编辑成功案例失败"
,
addRes
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_上架/下架成功案例"
,
priority
=
28
)
@Test
(
description
=
"管理后台_上架/下架成功案例"
,
priority
=
42
)
public
void
上架成功案例
(){
//上架成功案例 status = 2
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -588,7 +795,7 @@ public class HomePage implements Authorization {
}
//个人中心—我的反馈
@Test
(
description
=
"个人中心_我的反馈"
,
priority
=
29
)
@Test
(
description
=
"个人中心_我的反馈"
,
priority
=
43
)
public
void
我的反馈
(){
//tku 切换为访客的
network
.
agentCookies
.
put
(
TKU_COOKIE_NAME
,
VISITOR_TKU
);
...
...
@@ -604,7 +811,7 @@ public class HomePage implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
HOME_feedBackSave
,
"反馈意见提交成功"
,
response
.
body
().
asString
()));
}
//管理后台-集客助手反馈
@Test
(
description
=
"管理后台_集客助手反馈"
,
priority
=
30
)
@Test
(
description
=
"管理后台_集客助手反馈"
,
priority
=
44
)
public
void
集客助手反馈结果
(){
//验证管理后台是否接收到消息
Response
manageRes
=
network
.
getResponse
(
MANAGER_feedBackList
);
...
...
@@ -615,7 +822,7 @@ public class HomePage implements Authorization {
//***********************文章配置素材*******************************
@Test
(
description
=
"代理人_访问文章未配置互动素材"
,
priority
=
31
)
@Test
(
description
=
"代理人_访问文章未配置互动素材"
,
priority
=
45
)
public
void
代理人
_
访问文章未配置互动素材
()
{
agentTku
();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -650,7 +857,7 @@ public class HomePage implements Authorization {
Assert
.
assertNotNull
(
scid
,
network
.
message
(
params
,
GETSCID
,
"获取文章的scid失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_新增互动方案"
,
priority
=
32
)
@Test
(
description
=
"管理后台_新增互动方案"
,
priority
=
46
)
public
void
管理后台
_
新增互动方案
()
{
ssoLogin
();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -709,7 +916,7 @@ public class HomePage implements Authorization {
Assert
.
assertNotNull
(
activity2
,
network
.
message
(
params
,
MANAGER_searchAnswerList
,
"返回数据为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_修改互动方案"
,
priority
=
33
)
@Test
(
description
=
"管理后台_修改互动方案"
,
priority
=
47
)
public
void
管理后台
_
修改互动方案
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
activity2
);
...
...
@@ -736,7 +943,7 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
activityName
,
"快来摆摊测试吧"
,
network
.
message
(
params
,
MANAGER_searchAnswerList
,
"返回数据为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_通过方案id查找方案是否存在"
,
priority
=
34
)
@Test
(
description
=
"管理后台_通过方案id查找方案是否存在"
,
priority
=
48
)
public
void
管理后台
_
通过方案
id
查找方案是否存在
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
//存在
...
...
@@ -756,7 +963,7 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
data
,
null
,
network
.
message
(
params
,
MANAGER_activityName
,
"此方案存在"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_新增文章关联互动方案"
,
priority
=
35
)
@Test
(
description
=
"管理后台_新增文章关联互动方案"
,
priority
=
49
)
public
void
管理后台
_
新增文章关联互动方案
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
ArrayList
<
Integer
>
interactIds
=
new
ArrayList
<
Integer
>();
...
...
@@ -788,7 +995,7 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
aolutionId
,
activity2
,
network
.
message
(
params
,
MANAGER_articlePageList
,
"返回数据为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_互动方案使用中会删除失败"
,
priority
=
36
)
@Test
(
description
=
"管理后台_互动方案使用中会删除失败"
,
priority
=
50
)
public
void
管理后台
_
互动方案使用中会删除失败
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
activity2
);
...
...
@@ -809,7 +1016,7 @@ public class HomePage implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
MANAGER_solutionPageList
,
"有文章使用互动方案删除成功"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"代理人_访问文章新增配置互动素材"
,
priority
=
37
)
@Test
(
description
=
"代理人_访问文章新增配置互动素材"
,
priority
=
51
)
public
void
代理人
_
访问文章新增配置互动素材
()
{
sleep
(
10000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -827,7 +1034,7 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
activityId
,
answer2
,
network
.
message
(
params
,
ARTICLE_interact
,
"访问文章配置素材ID与实际配置不一致"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_修改文章关联互动方案"
,
priority
=
38
)
@Test
(
description
=
"管理后台_修改文章关联互动方案"
,
priority
=
52
)
public
void
管理后台
_
修改文章关联互动方案
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
ArrayList
<
Integer
>
interactIds
=
new
ArrayList
<
Integer
>();
...
...
@@ -856,7 +1063,7 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
aolutionId
,
activity1
,
network
.
message
(
params
,
MANAGER_articlePageList
,
"返回数据为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"代理人_访问文章修改配置互动素材并转发"
,
priority
=
39
)
@Test
(
description
=
"代理人_访问文章修改配置互动素材并转发"
,
priority
=
53
)
public
void
代理人
_
访问文章修改配置互动素材并转发
()
{
sleep
(
10000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -885,7 +1092,7 @@ public class HomePage implements Authorization {
Assert
.
assertNotNull
(
response
.
jsonPath
().
getJsonObject
(
"data"
),
network
.
message
(
USER_INFO
,
"获取用户信息失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客_访问文章并参与测评"
,
priority
=
40
)
@Test
(
description
=
"访客_访问文章并参与测评"
,
priority
=
54
)
public
void
访客
_
访问文章并参与测评
()
{
//切换为新用户小葡萄,每次都会产生线索
network
.
agentCookies
.
put
(
TKU_COOKIE_NAME
,
tku
);
...
...
@@ -950,7 +1157,7 @@ public class HomePage implements Authorization {
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
GAME_sendInfoForRisk
,
"申请领取食谱失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_删除文章关联互动方案"
,
priority
=
41
)
@Test
(
description
=
"管理后台_删除文章关联互动方案"
,
priority
=
55
)
public
void
管理后台
_
删除文章关联互动方案
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"articleId"
,
articleId
);
...
...
@@ -974,7 +1181,7 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
MANAGER_articlePageList
,
"删除失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"代理人_访问文章删除配置互动素材"
,
priority
=
42
)
@Test
(
description
=
"代理人_访问文章删除配置互动素材"
,
priority
=
56
)
public
void
代理人
_
访问文章删除配置互动素材
()
{
agentTku
();
sleep
(
10000
);
...
...
@@ -987,7 +1194,7 @@ public class HomePage implements Authorization {
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
ARTICLE_interact
,
"返回数据不为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"管理后台_删除互动方案成功"
,
priority
=
43
)
@Test
(
description
=
"管理后台_删除互动方案成功"
,
priority
=
57
)
public
void
管理后台
_
删除互动方案成功
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
activity1
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
3405d019
...
...
@@ -1005,6 +1005,8 @@ public class BasicConfig {
public
static
final
String
HOME_record
=
HOST
+
"/kjy/mp/clockIn/task/record"
;
public
static
final
String
HOME_getGrassTagByName
=
HOST
+
"/kjy/mp/grassContent/getGrassTagByName"
;
public
static
final
String
HOME_companyGetContentList
=
HOST
+
"/kjy/mp/companyArea/getContentList"
;
public
static
final
String
HOME_companyInteract
=
HOST
+
"/kjy/mp/article/companyInteract"
;
public
static
final
String
HOME_companyInsurance
=
HOST
+
"/kjy/mp/article/companyInsurance"
;
//******************个人中心**********************
public
static
final
String
USINGSTRATAGY_index
=
HOST
+
"/kjy/mp/usingStrategy/index"
;
public
static
final
String
USINGSTRATAGY_strategyList
=
HOST
+
"/kjy/mp/usingStrategy/strategyList"
;
...
...
@@ -1198,7 +1200,16 @@ public class BasicConfig {
public
static
final
String
MANAGER_qa_pageList
=
MANAGER_HOST
+
"/kjy/manager/qa/pageList"
;
public
static
final
String
MANAGER_qa_del
=
MANAGER_HOST
+
"/kjy/manager/qa/del"
;
public
static
final
String
MANAGER_conf_getDetail
=
MANAGER_HOST
+
"/kjy/manager/live/pre/conf/getDetail"
;
public
static
final
String
MANAGER_insuranceListByCompanyId
=
MANAGER_HOST
+
"/kjy/manager/insurance/listByCompanyId"
;
public
static
final
String
MANAGER_insuranceUpdate
=
MANAGER_HOST
+
"/kjy/manager/insurance/update"
;
public
static
final
String
MANAGER_adviceWordAddOrUpdateWord
=
MANAGER_HOST
+
"/kjy/manager/adviceWord/addOrUpdateWord"
;
public
static
final
String
MANAGER_adviceWordGetWordList
=
MANAGER_HOST
+
"/kjy/manager/adviceWord/getWordList"
;
public
static
final
String
MANAGER_insuranceSwitchStatus
=
MANAGER_HOST
+
"/kjy/manager/insurance/switchStatus"
;
public
static
final
String
MANAGER_exclusiveItemConfItemExt
=
MANAGER_HOST
+
"/kjy/manager/exclusiveItem/confItemExt"
;
public
static
final
String
MANAGER_listSimpleByCompanyIds
=
MANAGER_HOST
+
"/kjy/manager/insurance/listSimpleByCompanyIds"
;
public
static
final
String
MANAGER_solutionActivityName
=
MANAGER_HOST
+
"/kjy/manager/interact/solution/activityName"
;
public
static
final
String
MANAGER_itemConfDetail
=
MANAGER_HOST
+
"/kjy/manager/exclusiveItem/itemConfDetail"
;
public
static
final
String
MANAGER_adviceWordDelWord
=
MANAGER_HOST
+
"/kjy/manager/adviceWord/delWord"
;
// 管理后台—企业后台
public
static
final
String
MANAGER_cockpitSaveOrUpdate
=
MANAGER_HOST
+
"/kjy/manager/corp/cockpit/saveOrUpdate"
;
public
static
final
String
MANAGER_cockpitList
=
MANAGER_HOST
+
"/kjy/manager/corp/cockpit/list"
;
...
...
src/test/java/com/kjj/utils/BaseUtils.java
View file @
3405d019
...
...
@@ -258,6 +258,7 @@ public class BaseUtils {
* 公司管理员登录企业后台
*/
public
static
void
companyUserLogin
(){
ThreadSleepUtils
.
sleep
(
2000
);
// 调用登录接口
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"phone"
,
"15136361307"
);
...
...
@@ -307,6 +308,7 @@ public class BaseUtils {
* 营业部管理员登录企业后台
*/
public
static
void
officeUserLogin
(){
ThreadSleepUtils
.
sleep
(
2000
);
// 调用登录接口
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"phone"
,
"15136361306"
);
...
...
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