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
c5571665
Commit
c5571665
authored
Dec 01, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加优惠码绑定和邀请关系绑定,并支付成功
parent
ff03c592
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
Cashback.java
src/test/java/com/kjj/cases/assistant/pay/Cashback.java
+2
-2
Pay.java
src/test/java/com/kjj/cases/assistant/pay/Pay.java
+13
-0
No files found.
src/test/java/com/kjj/cases/assistant/pay/Cashback.java
View file @
c5571665
...
...
@@ -48,10 +48,10 @@ public class Cashback implements Authorization {
payParams
.
put
(
"entryDiscountType"
,
1
);
//入口折扣类型,1-普通,3-邀请,4-优惠码
Response
response
=
network
.
getResponse
(
PAY_info
);
int
discountType
=
response
.
jsonPath
().
getInt
(
"data.discountType"
);
int
validity
=
response
.
jsonPath
().
getInt
(
"data.validity
"
);
String
superiorName
=
response
.
jsonPath
().
getString
(
"data.invitation.superiorName
"
);
int
preferentialPrice
=
response
.
jsonPath
().
getInt
(
"data.preferentialPrice"
);
Assert
.
assertEquals
(
discountType
,
3
,
network
.
message
(
PAY_info
,
"非邀请付费逻辑"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
validity
,
12
,
network
.
message
(
PAY_info
,
"增加会员时长非12个月"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
superiorName
,
"吉吉"
,
network
.
message
(
PAY_info
,
"增加会员时长非12个月"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
preferentialPrice
,
3
,
network
.
message
(
PAY_info
,
"邀请价格非0.03"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/assistant/pay/Pay.java
View file @
c5571665
...
...
@@ -237,5 +237,18 @@ public class Pay implements Authorization {
int
userVersion
=
response
.
jsonPath
().
getInt
(
"data.find {it.openType == 1}.userVersion"
);
// 找出开启状态的版本类型 1为通用版 2为保险版
Assert
.
assertEquals
(
userVersion
,
2
,
network
.
message
(
version_info
,
"会员类型版本判断:判断错误,此版本为通用版"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询优惠码使用情况"
,
priority
=
14
)
public
void
查询优惠码使用情况
()
{
//优惠码列表
sleep
(
3000
);
Map
<
String
,
Object
>
codeListParam
=
new
HashMap
<
String
,
Object
>();
codeListParam
.
put
(
"batchId"
,
id
);
codeListParam
.
put
(
"pageIndex"
,
1
);
codeListParam
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
codeListParam
,
MANAGER_codeList
);
String
status
=
response
.
jsonPath
().
getString
(
"data.list[0].status"
);
Assert
.
assertEquals
(
status
,
"已使用"
,
network
.
message
(
codeListParam
,
PAY_distribute
,
"用户优惠码付费支付失败"
,
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