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
4d2d9dc5
Commit
4d2d9dc5
authored
Oct 28, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改时长宝箱的校验条件
parent
d1687df5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
39 deletions
+28
-39
TreasureTime.java
src/test/java/com/kjj/cases/live/treasure/TreasureTime.java
+28
-39
No files found.
src/test/java/com/kjj/cases/live/treasure/TreasureTime.java
View file @
4d2d9dc5
...
...
@@ -104,11 +104,9 @@ public class TreasureTime implements Authorization {
params
.
put
(
"treasureConfId"
,
this
.
treasureConfId
.
get
(
0
).
getTreasureConfId
());
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
Integer
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
System
.
out
.
println
(
treasureType
);
Assert
.
assertTrue
(
treasureType
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非抽奖码类型"
,
response
.
body
().
asString
()));
Integer
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
System
.
out
.
println
(
receiveStatus
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
}
...
...
@@ -127,14 +125,12 @@ public class TreasureTime implements Authorization {
ThreadSleepUtils
.
sleep
(
1000
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
boolean
data1
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
//红包发完降级抽奖码
...
...
@@ -142,7 +138,6 @@ public class TreasureTime implements Authorization {
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
boolean
data2
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data2
);
Assert
.
assertTrue
(
data2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response2
.
body
().
asString
()));
}
...
...
@@ -159,7 +154,6 @@ public class TreasureTime implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
List
<
CondDetail
>
treasureList
=
JsonUtil
.
parseResponseToListBean
(
response
,
CondDetail
.
class
,
"condDetail"
);
boolean
finishFlag
=
treasureList
.
get
(
1
).
isFinishFlag
();
System
.
out
.
println
(
finishFlag
);
Assert
.
assertTrue
(
finishFlag
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第2个宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth9
();
...
...
@@ -167,7 +161,6 @@ public class TreasureTime implements Authorization {
Response
response1
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
List
<
CondDetail
>
treasureList1
=
JsonUtil
.
parseResponseToListBean
(
response1
,
CondDetail
.
class
,
"condDetail"
);
boolean
finishFlag1
=
treasureList1
.
get
(
1
).
isFinishFlag
();
System
.
out
.
println
(
finishFlag1
);
Assert
.
assertTrue
(
finishFlag1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第2个宝箱参与情况失败"
,
response
.
body
().
asString
()));
//红包发完降级抽奖码
...
...
@@ -176,7 +169,6 @@ public class TreasureTime implements Authorization {
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
List
<
CondDetail
>
treasureList2
=
JsonUtil
.
parseResponseToListBean
(
response2
,
CondDetail
.
class
,
"condDetail"
);
boolean
finishFlag2
=
treasureList2
.
get
(
1
).
isFinishFlag
();
System
.
out
.
println
(
finishFlag2
);
Assert
.
assertTrue
(
finishFlag2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第2个宝箱参与情况失败"
,
response
.
body
().
asString
()));
...
...
@@ -224,25 +216,27 @@ public class TreasureTime implements Authorization {
visitorAuth7
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assert
NotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"访客H获取宝箱参与情况
失败"
,
response
.
body
().
asString
()));
Integer
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
Assert
.
assertTrue
(
treasureType
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非抽奖码类型"
,
response
.
body
().
asString
())
);
Integer
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assert
True
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取
失败"
,
response
.
body
().
asString
()));
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
Object
data1
=
response1
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
Assert
.
assertTrue
(
treasureType
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非抽奖码类型"
,
response
.
body
().
asString
()));
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
//红包发完降级抽奖码
visitorAuth13
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
Object
data2
=
response2
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"访客H获取宝箱参与情况失败"
,
response2
.
body
().
asString
()));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
Assert
.
assertTrue
(
treasureType
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非抽奖码类型"
,
response
.
body
().
asString
()));
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
}
...
...
@@ -358,24 +352,27 @@ public class TreasureTime implements Authorization {
visitorAuth7
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
Integer
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
Assert
.
assertTrue
(
treasureType
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非抽奖码类型"
,
response
.
body
().
asString
()));
Integer
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
Object
data1
=
response1
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
Assert
.
assertTrue
(
treasureType
==
3
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非抽奖码类型"
,
response
.
body
().
asString
()));
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
//红包发完降级抽奖码
visitorAuth13
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
Object
data2
=
response2
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"访客H获取宝箱参与情况失败"
,
response2
.
body
().
asString
()));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
Assert
.
assertTrue
(
treasureType
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非抽奖码类型"
,
response
.
body
().
asString
()));
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
}
...
...
@@ -441,13 +438,5 @@ public class TreasureTime implements Authorization {
int
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
System
.
out
.
println
(
receiveStatus
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
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