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
e3d91d56
Commit
e3d91d56
authored
Oct 22, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改底部互动用方案用例前的删除操作
parent
871deaf4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
HomePage.java
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
+16
-0
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+2
-2
BaseUtils.java
src/test/java/com/kjj/utils/BaseUtils.java
+4
-2
No files found.
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
View file @
e3d91d56
...
@@ -543,6 +543,22 @@ public class HomePage implements Authorization {
...
@@ -543,6 +543,22 @@ public class HomePage implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
ARTICLE_interact
);
Response
response
=
network
.
getResponse
(
params
,
ARTICLE_interact
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
if
(
size
!=
0
){
//文章已配置互动素材
//删除文章的底部互动方案
params
.
put
(
"articleId"
,
articleId
);
response
=
network
.
postHeaderResponse
(
params
,
MANAGER_deleteInteract
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
result
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
MANAGER_deleteActivity
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
MANAGER_deleteActivity
,
"删除失败"
,
response
.
body
().
asString
()));
//重新访问文章
sleep
(
10000
);
params
.
put
(
"cid"
,
grasscontentId
);
response
=
network
.
getResponse
(
params
,
ARTICLE_interact
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
}
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
ARTICLE_interact
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
ARTICLE_interact
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
ARTICLE_interact
,
"返回数据为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
ARTICLE_interact
,
"返回数据为空"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
e3d91d56
...
@@ -423,7 +423,7 @@ public class Lottery implements Authorization {
...
@@ -423,7 +423,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客A抽奖码数量"
,
priority
=
33
)
@Test
(
description
=
"访客A抽奖码数量"
,
priority
=
33
)
public
void
访客
A
抽奖码数量
()
{
public
void
访客
A
抽奖码数量
()
{
visitorAuth1
();
visitorAuth1
();
codeCount
(
3
);
codeCount
(
0
);
}
}
...
@@ -913,7 +913,7 @@ public class Lottery implements Authorization {
...
@@ -913,7 +913,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客J抽奖码数量"
,
priority
=
85
)
@Test
(
description
=
"访客J抽奖码数量"
,
priority
=
85
)
public
void
访客
J
抽奖码数量
()
{
public
void
访客
J
抽奖码数量
()
{
visitorAuth10
();
visitorAuth10
();
codeCount
(
3
);
codeCount
(
0
);
}
}
...
...
src/test/java/com/kjj/utils/BaseUtils.java
View file @
e3d91d56
...
@@ -179,7 +179,9 @@ public class BaseUtils {
...
@@ -179,7 +179,9 @@ public class BaseUtils {
Map
<
String
,
Object
>
myCountParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
myCountParam
=
new
HashMap
<>();
myCountParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
myCountParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
myCountRes
=
network
.
getResponse
(
myCountParam
,
BasicConfig
.
USER_myCount
);
Response
myCountRes
=
network
.
getResponse
(
myCountParam
,
BasicConfig
.
USER_myCount
);
int
data
=
myCountRes
.
jsonPath
().
getInt
(
"data"
);
if
(
num
!=
0
){
Assert
.
assertEquals
(
data
,
num
,
network
.
message
(
myCountParam
,
BasicConfig
.
USER_myCount
,
"获取抽奖码数量失败"
,
myCountRes
.
body
().
asString
()));
int
data
=
myCountRes
.
jsonPath
().
getInt
(
"data"
);
Assert
.
assertEquals
(
data
,
num
,
network
.
message
(
myCountParam
,
BasicConfig
.
USER_myCount
,
"抽奖码数量错误"
,
myCountRes
.
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