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
5df002eb
Commit
5df002eb
authored
Jan 03, 2025
by
yangfangfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物品
parent
695e0af7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
src/main/java/com/xiaomai/cases/lunar/goods/TestListXcxGoodsGroup.java
+15
-6
src/main/java/com/xiaomai/cases/polar/goods/Tools/GoodTools.java
+2
-2
No files found.
src/main/java/com/xiaomai/cases/lunar/goods/TestListXcxGoodsGroup.java
View file @
5df002eb
...
@@ -51,10 +51,11 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
...
@@ -51,10 +51,11 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++){
if
(
!
result
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
if
(
!
result
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
success
=
true
;
success
=
true
;
break
;
}
}
Assert
.
assertEquals
(
success
,
true
,
"分组里没有一个物品,这个分组不应该在小程序物品组列表展示"
);
}
}
Assert
.
assertEquals
(
success
,
true
,
"分组里没有一个物品,这个分组不应该在小程序物品组列表展示"
);
...
@@ -85,14 +86,20 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
...
@@ -85,14 +86,20 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
}
}
JSONArray
result1
=
listXcxGoodsGroup1
.
getJSONArray
(
"result"
);
JSONArray
result1
=
listXcxGoodsGroup1
.
getJSONArray
(
"result"
);
JSONObject
result0
=
result1
.
getJSONObject
(
0
);
System
.
out
.
println
(
"result1"
+
result1
);
System
.
out
.
println
(
"result11"
+
result0
);
boolean
success1
=
false
;
boolean
success1
=
false
;
for
(
int
i
=
0
;
i
<
result1
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
result1
.
size
();
i
++){
if
(
result1
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
if
(
result1
.
getJSONObject
(
i
).
getString
(
"id"
).
equals
(
id
)){
success1
=
true
;
success1
=
true
;
break
;
}
}
Assert
.
assertEquals
(
success1
,
true
,
"分组的物品是启用且开启小程序售卖的,这个分组应该在小程序物品组列表展示"
);
}
}
Assert
.
assertEquals
(
success1
,
true
,
"分组的物品是启用且开启小程序售卖的,这个分组应该在小程序物品组列表展示"
);
//case3:获取小程序物品分组列表:没有这个分组数据,因为分组内的物品为启用&关闭小程序售卖
//case3:获取小程序物品分组列表:没有这个分组数据,因为分组内的物品为启用&关闭小程序售卖
...
@@ -118,9 +125,10 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
...
@@ -118,9 +125,10 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
for
(
int
i
=
0
;
i
<
result2
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
result2
.
size
();
i
++){
if
(
!
result2
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
if
(
!
result2
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
success2
=
true
;
success2
=
true
;
break
;
}
}
Assert
.
assertEquals
(
success2
,
true
,
"分组的物品是启用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示"
);
}
}
Assert
.
assertEquals
(
success2
,
true
,
"分组的物品是启用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示"
);
//case4:获取小程序物品分组列表:没有这个分组数据,因为分组内的物品为停用&关闭小程序售卖
//case4:获取小程序物品分组列表:没有这个分组数据,因为分组内的物品为停用&关闭小程序售卖
...
@@ -145,9 +153,10 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
...
@@ -145,9 +153,10 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
for
(
int
i
=
0
;
i
<
result3
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
result3
.
size
();
i
++){
if
(
!
result3
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
if
(
!
result3
.
getJSONObject
(
1
).
getString
(
"id"
).
equals
(
id
)){
success3
=
true
;
success3
=
true
;
break
;
}
}
Assert
.
assertEquals
(
success3
,
true
,
"分组的物品是停用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示"
);
}
}
Assert
.
assertEquals
(
success3
,
true
,
"分组的物品是停用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示"
);
}
}
...
...
src/main/java/com/xiaomai/cases/polar/goods/Tools/GoodTools.java
View file @
5df002eb
...
@@ -299,7 +299,7 @@ public class GoodTools extends XMBaseTest {
...
@@ -299,7 +299,7 @@ public class GoodTools extends XMBaseTest {
jsonObject
.
put
(
"groupId"
,
"1873912725360504834"
);
jsonObject
.
put
(
"groupId"
,
"1873912725360504834"
);
jsonObject
.
put
(
"multiSpec"
,
true
);
jsonObject
.
put
(
"multiSpec"
,
true
);
jsonObject
.
put
(
"name"
,
"自动化创建三规格"
+
RandomStringUtil
.
randomString
(
3
));
jsonObject
.
put
(
"name"
,
"自动化创建三规格"
+
RandomStringUtil
.
randomString
(
6
));
jsonObject
.
put
(
"xcxSaleState"
,
xcxSaleState
);
jsonObject
.
put
(
"xcxSaleState"
,
xcxSaleState
);
...
@@ -499,7 +499,7 @@ public class GoodTools extends XMBaseTest {
...
@@ -499,7 +499,7 @@ public class GoodTools extends XMBaseTest {
jsonObject
.
put
(
"groupId"
,
"1873903328974499841"
);
jsonObject
.
put
(
"groupId"
,
"1873903328974499841"
);
jsonObject
.
put
(
"multiSpec"
,
false
);
jsonObject
.
put
(
"multiSpec"
,
false
);
jsonObject
.
put
(
"name"
,
"自动化创建单规格"
+
RandomStringUtil
.
randomString
(
2
));
jsonObject
.
put
(
"name"
,
"自动化创建单规格"
+
RandomStringUtil
.
randomString
(
6
));
jsonObject
.
put
(
"xcxSaleState"
,
xcxSaleState
);
jsonObject
.
put
(
"xcxSaleState"
,
xcxSaleState
);
JSONObject
jsonObject2
=
new
JSONObject
();
JSONObject
jsonObject2
=
new
JSONObject
();
...
...
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