Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-sportstest
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-sportstest
Commits
47a4af2b
Commit
47a4af2b
authored
Aug 14, 2024
by
yangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑记录-查看会员卡详情
parent
b8c3f9bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
src/main/java/com/xiaomai/cases/polar/memberCard/TestFindHistoryDetailById.java
+10
-1
No files found.
src/main/java/com/xiaomai/cases/polar/memberCard/TestFindHistoryDetailById.java
View file @
47a4af2b
...
@@ -7,6 +7,7 @@ import com.xiaomai.enums.RequestType;
...
@@ -7,6 +7,7 @@ import com.xiaomai.enums.RequestType;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMBaseTest
;
import
com.xiaomai.utils.XMBaseTest
;
import
com.xiaomai.utils.XMJSONPath
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
...
@@ -30,7 +31,9 @@ public class TestFindHistoryDetailById extends XMBaseTest {
...
@@ -30,7 +31,9 @@ public class TestFindHistoryDetailById extends XMBaseTest {
String
memberCardId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].id"
);
//拿售卖记录第一张会员卡的ID
String
memberCardId
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].id"
);
//拿售卖记录第一张会员卡的ID
Cardtools
.
fetchPageOfHistory
(
memberCardId
);
Cardtools
.
fetchPageOfHistory
(
memberCardId
);
String
id
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].snapshotId"
);
//第一条编辑记录
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].operateType"
),
"NEW"
,
"第一条非新建的编辑记录"
);
//断言第一条编辑记录-新建的编辑记录
String
id
=
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.records[0].snapshotId"
);
//
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
...
@@ -42,6 +45,12 @@ public class TestFindHistoryDetailById extends XMBaseTest {
...
@@ -42,6 +45,12 @@ public class TestFindHistoryDetailById extends XMBaseTest {
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
Cardtools
.
findHistoryDetailById
(
id
);
//Assert.assertEquals(XMJSONPath.readPath(dataApi.getApi_response(), "$.result.sharePeopleLimit"), 0, "详情的id不是查看的id");//断言第一条编辑记录-新建的编辑记录
Assert
.
assertTrue
(
XMJSONPath
.
readPath
(
xmAppApi
.
getApi_response
(),
"$.result.id"
).
equals
(
id
),
"编辑记录的会员卡详情id对不上"
);
}
}
}
}
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