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
407f668a
Commit
407f668a
authored
Jul 05, 2024
by
xyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix case
parent
a54a60e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/main/java/com/xiaomai/cases/polar/brandMerchant/TestGetApply.java
+6
-3
No files found.
src/main/java/com/xiaomai/cases/polar/brandMerchant/TestGetApply.java
View file @
407f668a
...
...
@@ -39,24 +39,27 @@ public class TestGetApply extends XMBaseTest {
@Test
(
description
=
"获取修改记录详情"
)
public
void
testPageApply
()
{
//获取修改记录数据
JSONObject
body
=
merchantTools
.
getApplyPage
();
int
total
=
Integer
.
parseInt
(
body
.
getJSONObject
(
"result"
).
getString
(
"total"
));
//获取第1条修改记录
String
applyId
=
body
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"id"
);
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"id"
,
applyId
);
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
//若有数据,检验详情里的场馆信息跟品牌信息匹配;若无返回报错
if
(
total
!=
0
)
{
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.result.
applyType"
),
"BIND"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.result.
openState"
),
"SUCCESS"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.result.
brandId"
),
xmAppApi
.
getLoginInfo
().
getStudioId
()
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.result.
studioId"
),
xmAppApi
.
getLoginInfo
().
getStudioId
()
);
}
else
{
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"数据不存在"
);
}
...
...
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