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
814dfdc5
Commit
814dfdc5
authored
Jun 24, 2020
by
Su-Yi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改tku
parent
5981530f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
CircleFriends.java
src/test/java/com/kjj/qa/cases/CircleFriends.java
+37
-37
No files found.
src/test/java/com/kjj/qa/cases/CircleFriends.java
View file @
814dfdc5
...
...
@@ -117,46 +117,46 @@ public class CircleFriends {
Assert
.
assertTrue
(
isCancel
,
network
.
message
(
params
,
FRIENDS_ADDORCANCELCOLLECT
,
"取消收藏素材失败"
));
}
//
@Test(description="素材频道页",priority = 7)
//
public void 素材频道页() throws IOException {
//
//频道页 头部
//
Map<String, Object> params = new HashMap<String, Object>();
//
params.put("tagId",tagId);
//
Response response = network.getResponse(params,FRIENDS_CHANNELDETAIL);
//
String name = response.jsonPath().getString("data.tagName");
//
Assert.assertEquals(name,tagName,network.message(params,FRIENDS_CHANNELDETAIL,"素材频道页-头部获取有误"));
//
//
//频道页 列表
//
params.put("pageSize",10);
//
params.put("pageNo",1);
//
response = network.getResponse(params,FRIENDS_GETCHANNELLIST);
//
String collectTagtId = response.jsonPath().getString("data[0].materialTag"); //素材ID
//
boolean hasList = response.jsonPath().getInt("data.size()") > 0;
//
Assert.assertEquals(collectTagtId,tagId,network.message(params,FRIENDS_GETCHANNELLIST, "素材列表获取有误"));
//
Assert.assertTrue(hasList,network.message(params,FRIENDS_GETCHANNELLIST,"素材频道列表-获取有误"));
//
}
//
//
@Test(description="从首页发圈列表页进入",priority = 8)
//
public void 从首页发圈列表页进入() throws IOException {
//
// 获取首页发圈素材列表
//
Response response = network.getResponse(HOME_GETHOMETIMELINECONTENT);
//
String currentId = response.jsonPath().getString("data.materialVos[0].contentId");
//
Assert.assertNotNull(currentId,network.message(HOME_GETHOMETIMELINECONTENT,"获取首页发圈列表有误"));
//
//
// 如果有推荐列表,进入发圈
//
if (currentId.length() > 0){
//
Map<String, Object> params = new HashMap<String, Object>();
//
params.put("currentId",currentId);
//
response = network.getResponse(params,FRIENDS_GETCURRENTINFO);
//
String topContentId = response.jsonPath().getString("data.contentId");
//
Assert.assertEquals(topContentId,currentId,network.message(params,FRIENDS_GETCURRENTINFO,"从首页进入发圈的头部素材有误"));
//
}
//
//
}
@Test
(
description
=
"素材频道页"
,
priority
=
7
)
public
void
素材频道页
()
throws
IOException
{
//频道页 头部
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"tagId"
,
tagId
);
Response
response
=
network
.
getResponse
(
params
,
FRIENDS_CHANNELDETAIL
);
String
name
=
response
.
jsonPath
().
getString
(
"data.tagName"
);
Assert
.
assertEquals
(
name
,
tagName
,
network
.
message
(
params
,
FRIENDS_CHANNELDETAIL
,
"素材频道页-头部获取有误"
));
//频道页 列表
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"pageNo"
,
1
);
response
=
network
.
getResponse
(
params
,
FRIENDS_GETCHANNELLIST
);
String
collectTagtId
=
response
.
jsonPath
().
getString
(
"data[0].materialTag"
);
//素材ID
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
>
0
;
Assert
.
assertEquals
(
collectTagtId
,
tagId
,
network
.
message
(
params
,
FRIENDS_GETCHANNELLIST
,
"素材列表获取有误"
));
Assert
.
assertTrue
(
hasList
,
network
.
message
(
params
,
FRIENDS_GETCHANNELLIST
,
"素材频道列表-获取有误"
));
}
@Test
(
description
=
"从首页发圈列表页进入"
,
priority
=
8
)
public
void
从首页发圈列表页进入
()
throws
IOException
{
// 获取首页发圈素材列表
Response
response
=
network
.
getResponse
(
HOME_GETHOMETIMELINECONTENT
);
String
currentId
=
response
.
jsonPath
().
getString
(
"data.materialVos[0].contentId"
);
Assert
.
assertNotNull
(
currentId
,
network
.
message
(
HOME_GETHOMETIMELINECONTENT
,
"获取首页发圈列表有误"
));
// 如果有推荐列表,进入发圈
if
(
currentId
.
length
()
>
0
){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"currentId"
,
currentId
);
response
=
network
.
getResponse
(
params
,
FRIENDS_GETCURRENTINFO
);
String
topContentId
=
response
.
jsonPath
().
getString
(
"data.contentId"
);
Assert
.
assertEquals
(
topContentId
,
currentId
,
network
.
message
(
params
,
FRIENDS_GETCURRENTINFO
,
"从首页进入发圈的头部素材有误"
));
}
}
@AfterClass
public
static
void
tearDown
(){
apiCount
+=
9
;
apiCount
+=
13
;
}
}
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