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
6a895711
Commit
6a895711
authored
Oct 25, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20211022-gxh' into 'master'
修改抽奖码校验和代理人首页的校验条件 See merge request test-group/kejiji!147
parents
da4ee80a
f266c48d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
28 deletions
+26
-28
SignRed.java
src/test/java/com/kjj/cases/assistant/homePage/SignRed.java
+13
-17
Agent.java
src/test/java/com/kjj/cases/live/agent/Agent.java
+2
-2
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+8
-8
BaseUtils.java
src/test/java/com/kjj/utils/BaseUtils.java
+3
-1
No files found.
src/test/java/com/kjj/cases/assistant/homePage/SignRed.java
View file @
6a895711
...
...
@@ -30,8 +30,8 @@ public class SignRed implements Authorization {
Assert
.
assertFalse
(
vipExpireFlag
,
network
.
message
(
ATTEND_entrance
,
"指定用户会员已到期"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"非指定用户展示入口"
,
priority
=
2
)
public
void
非指定用户展示入口
()
{
@Test
(
description
=
"非指定用户
不
展示入口"
,
priority
=
2
)
public
void
非指定用户
不
展示入口
()
{
userTku2
();
Response
response
=
network
.
getResponse
(
ATTEND_entrance
);
System
.
out
.
println
(
response
.
body
().
asString
());
...
...
@@ -71,7 +71,7 @@ public class SignRed implements Authorization {
Assert
.
assertTrue
(
attendAmount
>
0
,
network
.
message
(
ATTEND_open
,
"签到失败"
,
response
.
body
().
asString
()));
}
else
{
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertFalse
(
success
,
network
.
message
(
ATTEND_open
,
"重复签到
成功
"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
ATTEND_open
,
"重复签到"
,
response
.
body
().
asString
()));
}
}
...
...
@@ -86,25 +86,21 @@ public class SignRed implements Authorization {
@Test
(
description
=
"代理人账户明细"
,
priority
=
7
)
public
void
代理人账户明细
()
{
agentTku
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<
String
,
Object
>();
Params
.
put
(
"type"
,
2
);
Params
.
put
(
"pageNo"
,
1
);
Params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
Params
,
PAY_accDetail
);
if
(!
todayAttendFlag
)
{
agentTku
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<
String
,
Object
>();
Params
.
put
(
"type"
,
2
);
Params
.
put
(
"pageNo"
,
1
);
Params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
Params
,
PAY_accDetail
);
System
.
out
.
println
(
response
.
body
().
asString
());
int
changeType1
=
response
.
jsonPath
().
getInt
(
"data[0].changeType"
);
int
changeType
=
response
.
jsonPath
().
getInt
(
"data[0].changeType"
);
String
nickname
=
response
.
jsonPath
().
getString
(
"data[0].nickname"
);
int
bizType
=
response
.
jsonPath
().
getInt
(
"data[0].bizType"
);
String
changeMoney
=
response
.
jsonPath
().
getString
(
"data[0].changeMoney"
);
Assert
.
assertEquals
(
changeType
1
,
2
,
network
.
message
(
PAY_accDetail
,
"收益明细类型错误"
,
response
.
body
().
asString
()));
float
changeMoney
=
response
.
jsonPath
().
getFloat
(
"data[0].changeMoney"
);
Assert
.
assertEquals
(
changeType
,
2
,
network
.
message
(
PAY_accDetail
,
"收益明细类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
nickname
,
"吉吉"
,
network
.
message
(
PAY_accDetail
,
"签到用户名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
bizType
,
16
,
network
.
message
(
PAY_accDetail
,
"收益明细类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
changeMoney
,
String
.
format
(
"%.2f"
,
attendAmount
/
100
),
network
.
message
(
PAY_accDetail
,
"收益金额错误"
,
response
.
body
().
asString
()));
}
else
{
System
.
out
.
println
(
"代理人今日已签到"
);
Assert
.
assertEquals
(
changeMoney
,
attendAmount
/
100
,
network
.
message
(
PAY_accDetail
,
"收益金额错误"
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/kjj/cases/live/agent/Agent.java
View file @
6a895711
...
...
@@ -402,7 +402,7 @@ public class Agent implements Authorization {
try
{
List
<
Map
<
String
,
Object
>>
friends
=
likeMeFriendRes
.
jsonPath
().
getList
(
"data.list"
);
String
friendName
=
(
String
)
friends
.
get
(
0
).
get
(
"nickName"
);
Assert
.
assertEquals
(
friendName
,
"小智8
"
,
network
.
message
(
likeMeFriendPar
,
MOBILE_likeMeFriend
,
"最近赞我的朋友昵称错误"
,
likeMeFriendRes
.
body
().
asString
()));
Assert
.
assertEquals
(
friendName
.
substring
(
0
,
2
),
"小智
"
,
network
.
message
(
likeMeFriendPar
,
MOBILE_likeMeFriend
,
"最近赞我的朋友昵称错误"
,
likeMeFriendRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
likeMeFriendPar
,
MOBILE_likeMeFriend
,
"获取数据失败"
,
likeMeFriendRes
.
body
().
asString
()));
...
...
@@ -472,7 +472,7 @@ public class Agent implements Authorization {
try
{
List
<
Map
<
String
,
Object
>>
friends
=
likeMyTeamRes
.
jsonPath
().
getList
(
"data.list"
);
String
name
=
(
String
)
friends
.
get
(
0
).
get
(
"nickName"
);
Assert
.
assertEquals
(
name
,
"小智8
"
,
network
.
message
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
,
"最近赞我团队的朋友昵称错误"
,
likeMyTeamRes
.
body
().
asString
()));
Assert
.
assertEquals
(
name
.
substring
(
0
,
2
),
"小智
"
,
network
.
message
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
,
"最近赞我团队的朋友昵称错误"
,
likeMyTeamRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
likeMyTeamPar
,
MOBILE_likeMyTeamFriends
,
"获取数据失败"
,
likeMyTeamRes
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
6a895711
...
...
@@ -301,7 +301,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客C抽奖码数量"
,
priority
=
25
)
public
void
访客
C
抽奖码数量
()
{
visitorAuth3
();
codeCount
(
1
);
codeCount
(
0
);
}
//好运红包
...
...
@@ -493,7 +493,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客D抽奖码数量"
,
priority
=
41
)
public
void
访客
D
抽奖码数量
()
{
visitorAuth4
();
codeCount
(
1
);
codeCount
(
0
);
}
@Test
(
description
=
"访客E给访客B助力"
,
priority
=
44
)
...
...
@@ -520,7 +520,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客E抽奖码数量"
,
priority
=
47
)
public
void
访客
E
抽奖码数量
()
{
visitorAuth5
();
codeCount
(
1
);
codeCount
(
0
);
}
...
...
@@ -548,7 +548,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客F抽奖码数量"
,
priority
=
53
)
public
void
访客
F
抽奖码数量
()
{
visitorAuth6
();
codeCount
(
1
);
codeCount
(
0
);
}
...
...
@@ -578,7 +578,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客G抽奖码数量"
,
priority
=
59
)
public
void
访客
G
抽奖码数量
()
{
visitorAuth7
();
codeCount
(
1
);
codeCount
(
0
);
}
...
...
@@ -619,7 +619,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客B的抽奖码数量"
,
priority
=
62
)
public
void
访客
B
抽奖码数量
()
{
visitorAuth2
();
codeCount
(
17
);
codeCount
(
0
);
}
@Test
(
description
=
"开始第二轮抽奖"
,
priority
=
63
)
...
...
@@ -886,7 +886,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客H抽奖码数量"
,
priority
=
79
)
public
void
访客
H
抽奖码数量
()
{
visitorAuth9
();
codeCount
(
7
);
codeCount
(
0
);
}
...
...
@@ -900,7 +900,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"访客I抽奖码数量"
,
priority
=
82
)
public
void
访客
I
抽奖码数量
()
{
visitorAuth8
();
codeCount
(
1
);
codeCount
(
0
);
}
...
...
src/test/java/com/kjj/utils/BaseUtils.java
View file @
6a895711
...
...
@@ -179,9 +179,11 @@ public class BaseUtils {
Map
<
String
,
Object
>
myCountParam
=
new
HashMap
<>();
myCountParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
myCountRes
=
network
.
getResponse
(
myCountParam
,
BasicConfig
.
USER_myCount
);
int
data
=
myCountRes
.
jsonPath
().
getInt
(
"data"
);
if
(
num
!=
0
){
int
data
=
myCountRes
.
jsonPath
().
getInt
(
"data"
);
Assert
.
assertEquals
(
data
,
num
,
network
.
message
(
myCountParam
,
BasicConfig
.
USER_myCount
,
"抽奖码数量错误"
,
myCountRes
.
body
().
asString
()));
}
else
{
Assert
.
assertNotNull
(
data
,
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