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
62339b22
Commit
62339b22
authored
Nov 10, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复上传链接ICON位置校验、公司专区数量校验
parent
62c668f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
13 deletions
+9
-13
HomePage.java
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
+5
-4
RecommendMaterial.java
...a/com/kjj/cases/assistant/homePage/RecommendMaterial.java
+2
-0
Upload.java
src/test/java/com/kjj/cases/assistant/homePage/Upload.java
+1
-8
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+1
-1
No files found.
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
View file @
62339b22
...
...
@@ -39,6 +39,7 @@ public class HomePage implements Authorization {
public
String
activityScid
;
//测评对应的scid
public
long
articleId
;
//解密后的的文章id
public
int
totalCount
;
//视频数量
public
int
companyCount
;
//公司专区数量
@BeforeClass
public
void
setUp
()
{
...
...
@@ -378,8 +379,8 @@ public class HomePage implements Authorization {
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"source"
,
1
);
Response
listRes
=
network
.
getResponse
(
params
,
HOME_companyGetContentList
);
int
total
Count
=
listRes
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assert
Equals
(
totalCount
,
2
,
network
.
message
(
params
,
HOME_companyGetContentList
,
"获取公司专区内容列表数据错误"
,
listRes
.
body
().
asString
()));
company
Count
=
listRes
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assert
True
(
companyCount
>
0
,
network
.
message
(
params
,
HOME_companyGetContentList
,
"获取公司专区内容列表数据错误"
,
listRes
.
body
().
asString
()));
}
//管理后台删除文章
...
...
@@ -414,8 +415,8 @@ public class HomePage implements Authorization {
paramsList
.
put
(
"pageIndex"
,
1
);
paramsList
.
put
(
"source"
,
1
);
Response
dataRes
=
network
.
getResponse
(
paramsList
,
HOME_companyGetContentList
);
int
totalCount
=
dataRes
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assertEquals
(
totalCount
,
1
,
network
.
message
(
paramsList
,
HOME_companyGetContentList
,
"获取公司专区内容列表数据错误"
,
dataRes
.
body
().
asString
()));
int
totalCount
New
=
dataRes
.
jsonPath
().
getInt
(
"data.totalCount"
);
Assert
.
assertEquals
(
totalCount
New
,
companyCount
-
1
,
network
.
message
(
paramsList
,
HOME_companyGetContentList
,
"获取公司专区内容列表数据错误"
,
dataRes
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/assistant/homePage/RecommendMaterial.java
View file @
62339b22
...
...
@@ -176,6 +176,7 @@ public class RecommendMaterial implements Authorization {
params
.
put
(
"insuranceTitle"
,
"2222"
);
params
.
put
(
"insuranceType"
,
1
);
params
.
put
(
"insureAmount"
,
1000
);
params
.
put
(
"insuranceLink"
,
"https://www.baidu.com"
);
Response
response
=
network
.
postResponse
(
params
,
GRASS_editInsurance
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
GRASS_editInsurance
,
"修改赠险信息失败"
,
response
.
body
().
asString
()));
...
...
@@ -197,6 +198,7 @@ public class RecommendMaterial implements Authorization {
@Test
(
description
=
"代理人_赠险管理_删除赠险"
,
priority
=
13
)
public
void
代理人
_
赠险管理
_
删除赠险
()
{
agentTku
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
inId
);
Response
response
=
network
.
getResponse
(
params
,
GRASS_delInsurance
);
...
...
src/test/java/com/kjj/cases/assistant/homePage/Upload.java
View file @
62339b22
...
...
@@ -25,19 +25,12 @@ public class Upload implements Authorization {
BaseUtils
.
ssoLogin
();
}
// @Test(description="会员判断",priority = 1)
// public void 会员判断() throws IOException{
// Response response = network.getResponse(ISVIPSUBSCRIBE);
// boolean isVip = response.jsonPath().getBoolean("data.vip");
// Assert.assertTrue(true, network.message(ISVIPSUBSCRIBE,"会员判断错误",response.body().asString()));
// }
@Test
(
description
=
"获取首页上传链接配置"
,
priority
=
1
)
public
void
上传链接配置
(){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"type"
,
1
);
Response
response
=
network
.
getResponse
(
params
,
Daily_getHomeConf
);
Object
resourceLocatorName
=
response
.
jsonPath
().
getJsonObject
(
"data.get(
5
).resourceLocatorName"
);
Object
resourceLocatorName
=
response
.
jsonPath
().
getJsonObject
(
"data.get(
4
).resourceLocatorName"
);
Assert
.
assertEquals
(
resourceLocatorName
,
"上传链接"
,
network
.
message
(
params
,
Daily_getHomeConf
,
"获取上传链接配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"爬虫支持的域名"
,
priority
=
2
)
...
...
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
62339b22
...
...
@@ -65,6 +65,7 @@ public class SaveLive implements Authorization {
Params
.
put
(
"preWindowUrl"
,
"https://yun.dui88.com/kjy/image/20210629/1624949098093.png"
);
Params
.
put
(
"distributionType"
,
0
);
Params
.
put
(
"existSeriesPoster"
,
0
);
Params
.
put
(
"followPushState"
,
0
);
List
<
ProvinceCityCodeList
>
provinceCityCode
=
new
ArrayList
<>();
ProvinceCityCodeList
save
=
new
ProvinceCityCodeList
();
save
.
setProvinceCode
(
110000
);
...
...
@@ -2241,7 +2242,6 @@ public class SaveLive implements Authorization {
Params
.
put
(
"lotteryNum"
,
3
);
Params
.
put
(
"lotteryDesc"
,
"这是亲友抽奖券的说明"
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_relativeLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_relativeLottery
,
"保存亲友券配置失败"
,
response
.
body
().
asString
()));
}
...
...
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