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
1f28a2e2
Commit
1f28a2e2
authored
Jul 31, 2024
by
xuyamei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决报错
parent
2755c53f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
src/main/java/com/xiaomai/cases/polar/reserve/personal/TestCreateBatchNormalDate.java
+2
-2
src/main/java/com/xiaomai/cases/polar/reserve/personal/TestCreateBatchSpecialDate.java
+20
-3
No files found.
src/main/java/com/xiaomai/cases/polar/reserve/personal/TestCreateBatchNormalDate.java
View file @
1f28a2e2
...
@@ -9,7 +9,7 @@ import com.xiaomai.enums.LoginAccount;
...
@@ -9,7 +9,7 @@ import com.xiaomai.enums.LoginAccount;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.enums.Terminal
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.Before
Class
;
import
org.testng.annotations.Before
Method
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -30,7 +30,7 @@ public class TestCreateBatchNormalDate extends BaseTestImpl {
...
@@ -30,7 +30,7 @@ public class TestCreateBatchNormalDate extends BaseTestImpl {
JSONArray
coachIds
=
new
JSONArray
();
JSONArray
coachIds
=
new
JSONArray
();
@Before
Class
@Before
Method
@Override
@Override
public
void
beforeTest
(){
public
void
beforeTest
(){
setTestInfo
(
ApiModule
.
Polar_Reserve
,
"API_createBatchNormalDate"
,
LoginAccount
.
GYM_PROD
,
Terminal
.
B
,
"xym"
);
setTestInfo
(
ApiModule
.
Polar_Reserve
,
"API_createBatchNormalDate"
,
LoginAccount
.
GYM_PROD
,
Terminal
.
B
,
"xym"
);
...
...
src/main/java/com/xiaomai/cases/polar/reserve/personal/TestCreateBatchSpecialDate.java
View file @
1f28a2e2
...
@@ -10,7 +10,6 @@ import com.xiaomai.enums.RequestType;
...
@@ -10,7 +10,6 @@ import com.xiaomai.enums.RequestType;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.TimeUtils
;
import
com.xiaomai.utils.TimeUtils
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
...
@@ -103,7 +102,25 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl {
...
@@ -103,7 +102,25 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl {
}
}
@Test
(
description
=
"设置特定日期全天休息"
,
priority
=
1
)
@Test
(
description
=
"删除特殊日期"
,
priority
=
1
)
public
void
testDeleteSpecialDate1
()
{
for
(
int
j
=
0
;
j
<
coachIds
.
size
();
j
++){
// 查询特殊可约时间列表
JSONArray
specialTimeVOS
=
reserveTools
.
getPersonalCoachTime
(
coachIds
.
getString
(
j
),
"specialTimeVOS"
);
for
(
int
i
=
0
;
i
<
specialTimeVOS
.
size
();
i
++){
String
id
=
specialTimeVOS
.
getJSONObject
(
i
).
getJSONArray
(
"recordIds"
).
getString
(
0
);
// 删除查询到的特殊可约时间
reserveTools
.
deleteSpecialDate
(
id
);
}
specialTimeVOS
=
reserveTools
.
getPersonalCoachTime
(
xmAppApi
.
getLoginInfo
().
getAdminId
(),
"specialTimeVOS"
);
Assert
.
assertEquals
(
specialTimeVOS
.
size
(),
0
,
"删除特殊日期后,特殊日期列表不为空"
);
}
}
@Test
(
description
=
"设置特定日期全天休息"
,
priority
=
2
)
public
void
testCreateBatchSpecialDate2
()
{
public
void
testCreateBatchSpecialDate2
()
{
// 获取教练列表
// 获取教练列表
JSONObject
pageStudioPersonalCoach
=
reserveTools
.
pageStudioPersonalCoach
(
""
);
JSONObject
pageStudioPersonalCoach
=
reserveTools
.
pageStudioPersonalCoach
(
""
);
...
@@ -162,7 +179,7 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl {
...
@@ -162,7 +179,7 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl {
}
}
@Test
(
description
=
"删除特殊日期"
,
priority
=
2
)
@Test
(
description
=
"删除特殊日期"
,
priority
=
3
)
public
void
testDeleteSpecialDate
()
{
public
void
testDeleteSpecialDate
()
{
for
(
int
j
=
0
;
j
<
coachIds
.
size
();
j
++){
for
(
int
j
=
0
;
j
<
coachIds
.
size
();
j
++){
// 查询特殊可约时间列表
// 查询特殊可约时间列表
...
...
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