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
3c8b802b
Commit
3c8b802b
authored
Jan 02, 2025
by
zhoujianjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物品
parent
9fc12091
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
16 deletions
+23
-16
src/main/java/com/xiaomai/cases/lunar/goods/TestListXcxGoodsGroup.java
+5
-5
src/main/java/com/xiaomai/cases/lunar/goods/TestPurchaseGoods.java
+0
-0
src/main/java/com/xiaomai/cases/polar/goods/TestCreateGoods.java
+4
-4
src/main/java/com/xiaomai/cases/polar/goods/TestDeleteGood.java
+2
-2
src/main/java/com/xiaomai/cases/polar/goods/TestModifyGoods.java
+4
-4
src/main/java/com/xiaomai/cases/polar/goods/TestRefundGoods.java
+7
-0
src/main/java/com/xiaomai/cases/polar/goods/Tools/GoodTools.java
+1
-1
No files found.
src/main/java/com/xiaomai/cases/lunar/goods/TestListXcxGoodsGroup.java
View file @
3c8b802b
...
...
@@ -143,10 +143,10 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
}
@Test
(
description
=
"清理物品数据"
,
priority
=
1
)
public
void
delete
()
{
goodTools
.
deleteGoods
(
createGoodsId
,
info
);
}
//
@Test(description = "清理物品数据",priority = 1)
//
public void delete() {
//
goodTools.deleteGoods(createGoodsId,info);
//
//
}
}
src/main/java/com/xiaomai/cases/lunar/goods/TestPurchaseGoods.java
View file @
3c8b802b
This diff is collapsed.
Click to expand it.
src/main/java/com/xiaomai/cases/polar/goods/TestCreateGoods.java
View file @
3c8b802b
...
...
@@ -44,7 +44,7 @@ public class TestCreateGoods extends XMBaseTest {
//分组是存量的: "id": "1873912725360504834","name": "自动化分组多规格",因为只能创建10个,超了的话影响后续流程还所以还是用存量的
//获取B端物品列表
JSONObject
beforeTotalStudioGoods
=
goodTools
.
studioGoods
();
JSONObject
beforeTotalStudioGoods
=
goodTools
.
studioGoods
(
""
);
int
beforeTotal
=
Integer
.
parseInt
(
beforeTotalStudioGoods
.
getJSONObject
(
"result"
).
getString
(
"total"
));
...
...
@@ -267,7 +267,7 @@ public class TestCreateGoods extends XMBaseTest {
//校验1:获取B端物品列表
//①统计值增加1
//②有对应的商品id
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
();
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
(
""
);
int
afterTotal
=
Integer
.
parseInt
(
afterStudioGoods
.
getJSONObject
(
"result"
).
getString
(
"total"
));
JSONArray
records
=
afterStudioGoods
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
...
...
@@ -365,7 +365,7 @@ public class TestCreateGoods extends XMBaseTest {
//单规格:"id": "1873903328974499841", "name": "自动化分组单规格",
//获取物品列表
JSONObject
beforeTotalStudioGoods
=
goodTools
.
studioGoods
();
JSONObject
beforeTotalStudioGoods
=
goodTools
.
studioGoods
(
""
);
int
beforeTotal
=
Integer
.
parseInt
(
beforeTotalStudioGoods
.
getJSONObject
(
"result"
).
getString
(
"total"
));
...
...
@@ -426,7 +426,7 @@ public class TestCreateGoods extends XMBaseTest {
//校验1:获取B端物品列表
//①统计值增加1
//②有对应的商品id
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
();
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
(
""
);
int
afterTotal
=
Integer
.
parseInt
(
afterStudioGoods
.
getJSONObject
(
"result"
).
getString
(
"total"
));
JSONArray
records
=
afterStudioGoods
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
...
...
src/main/java/com/xiaomai/cases/polar/goods/TestDeleteGood.java
View file @
3c8b802b
...
...
@@ -38,7 +38,7 @@ public class TestDeleteGood extends XMBaseTest {
//获取物品列表
JSONObject
studioGoods
=
goodTools
.
studioGoods
();
JSONObject
studioGoods
=
goodTools
.
studioGoods
(
""
);
JSONArray
records
=
studioGoods
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
boolean
success
=
false
;
...
...
@@ -66,7 +66,7 @@ public class TestDeleteGood extends XMBaseTest {
}
//校验1:物品列表中没有此数据
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
();
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
(
""
);
JSONArray
afterRecords
=
afterStudioGoods
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
boolean
afterSuccess
=
false
;
...
...
src/main/java/com/xiaomai/cases/polar/goods/TestModifyGoods.java
View file @
3c8b802b
...
...
@@ -122,7 +122,7 @@ public class TestModifyGoods extends XMBaseTest {
Assert
.
assertEquals
(
getDetail_goodsC
.
getJSONObject
(
"singleSpecInfo"
).
getBigDecimal
(
"price"
).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
(),
"0.09"
,
"编辑成单规格成功后但详情价格非编辑后的0.09"
);
//校验3:获取B端物品列表
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
();
JSONObject
afterStudioGoods
=
goodTools
.
studioGoods
(
""
);
JSONArray
records
=
afterStudioGoods
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
boolean
success
=
false
;
for
(
int
i
=
0
;
i
<
records
.
size
();
i
++)
{
...
...
@@ -387,7 +387,7 @@ public class TestModifyGoods extends XMBaseTest {
Assert
.
assertEquals
(
getDetail_goodsC1
.
getString
(
"inventory"
),
"80"
,
"编辑成多规格成功后但详情总库存非编辑后的80"
);
//校验3:获取B端物品列表
JSONObject
afterStudioGoods1
=
goodTools
.
studioGoods
();
JSONObject
afterStudioGoods1
=
goodTools
.
studioGoods
(
""
);
JSONArray
records1
=
afterStudioGoods1
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
boolean
success1
=
false
;
for
(
int
i
=
0
;
i
<
records1
.
size
();
i
++)
{
...
...
@@ -549,7 +549,7 @@ public class TestModifyGoods extends XMBaseTest {
Assert
.
assertEquals
(
getDetail_goodsC2
.
getString
(
"inventory"
),
"20"
,
"编辑成多规格成功后但详情总库存非编辑后的20"
);
//校验3:获取B端物品列表
JSONObject
afterStudioGoods2
=
goodTools
.
studioGoods
();
JSONObject
afterStudioGoods2
=
goodTools
.
studioGoods
(
""
);
JSONArray
records2
=
afterStudioGoods2
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
boolean
success2
=
false
;
for
(
int
i
=
0
;
i
<
records2
.
size
();
i
++)
{
...
...
@@ -658,7 +658,7 @@ public class TestModifyGoods extends XMBaseTest {
Assert
.
assertEquals
(
getDetail_goodsC3
.
getJSONObject
(
"singleSpecInfo"
).
getBigDecimal
(
"price"
).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
(),
"0.09"
,
"编辑成单规格成功后但详情价格非编辑后的0.09"
);
//校验3:获取B端物品列表
JSONObject
afterStudioGoods3
=
goodTools
.
studioGoods
();
JSONObject
afterStudioGoods3
=
goodTools
.
studioGoods
(
""
);
JSONArray
records3
=
afterStudioGoods3
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
);
boolean
success3
=
false
;
for
(
int
i
=
0
;
i
<
records3
.
size
();
i
++)
{
...
...
src/main/java/com/xiaomai/cases/polar/goods/TestRefundGoods.java
0 → 100644
View file @
3c8b802b
package
com
.
xiaomai
.
cases
.
polar
.
goods
;
import
com.xiaomai.utils.XMBaseTest
;
public
class
TestRefundGoods
extends
XMBaseTest
{
}
src/main/java/com/xiaomai/cases/polar/goods/Tools/GoodTools.java
View file @
3c8b802b
...
...
@@ -519,7 +519,7 @@ public class GoodTools extends XMBaseTest {
* @author: yff
**/
public
JSONObject
studioGoods
(
DataUserInfo
...
userInfos
){
public
JSONObject
studioGoods
(
String
nameLike
,
DataUserInfo
...
userInfos
){
dataApi
.
setApiModule
(
ApiModule
.
Polar_Goods
)
.
setApiName
(
"API_pageStudioGoods"
)
.
setTerminal
(
Terminal
.
B
);
...
...
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