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
150d7c46
Commit
150d7c46
authored
Jul 13, 2024
by
DuJunLi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加断言校验
parent
59e96537
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/main/java/com/xiaomai/cases/polar/schedule/camp/TestDelCampScheduleItem.java
+11
-3
No files found.
src/main/java/com/xiaomai/cases/polar/schedule/camp/TestDelCampScheduleItem.java
View file @
150d7c46
...
...
@@ -29,6 +29,9 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{
String
campId
=
""
;
String
chiefCoachId
=
""
;
String
ruldId
=
""
;
int
loopNum
=
0
;
String
[]
weekDaysArray
=
{
"TUESDAY"
,
"THURSDAY"
,
"SATURDAY"
,
"SUNDAY"
};
List
<
String
>
weekdaysList
=
Arrays
.
asList
(
weekDaysArray
);
@BeforeClass
public
void
beforeTest
()
{
...
...
@@ -39,9 +42,7 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{
//1.2获取训练营活动的指定教练ID
chiefCoachId
=
super
.
chiefCoachId
;
//获取目标时间段内 最大有效课时数
String
[]
weekDaysArray
=
{
"TUESDAY"
,
"THURSDAY"
,
"SATURDAY"
,
"SUNDAY"
};
List
<
String
>
weekdaysList
=
Arrays
.
asList
(
weekDaysArray
);
int
loopNum
=
campScheduleTools
.
queryExpectedLoopNum
(
CommUtil
.
oneKeyGetAddDay
(
3
),
super
.
openEndDate
,
weekdaysList
);
loopNum
=
campScheduleTools
.
queryExpectedLoopNum
(
CommUtil
.
oneKeyGetAddDay
(
3
),
super
.
openEndDate
,
weekdaysList
);
//创建训练营排课:按次数 星期:2,4,6,7
campScheduleTools
.
oneKeyCreateCampRuleSchedule
(
campId
,
chiefCoachId
,
super
.
courseId
,
...
...
@@ -98,6 +99,13 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{
String
startDate
=
CommUtil
.
oneKeyGetNextWeekXDay
(
12
);
//下周六00点时间
campScheduleTools
.
getCampScheduleTable
(
startDate
,
super
.
openEndDate
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
dataApi
.
getApi_response
(),
"$.result.totalCount"
),
"0"
);
//删除成功后,check对应训练营活动的已排课次数是否同步变更
int
delLoopNum
=
campScheduleTools
.
queryExpectedLoopNum
(
startDate
,
super
.
openEndDate
,
weekdaysList
);
//查看日程,获取原规则中展示的训练营已排课课次数,原来已排课课次数-删除的已排课课次数
campScheduleTools
.
getCampRuleScheduleDetail
(
ruldId
);
Assert
.
assertTrue
(
XMJSONPath
.
getJSONObjectByReadPath
(
dataApi
.
getApi_response
(),
"$.result.campVO"
).
getIntValue
(
"scheduleClassHour"
)==(
loopNum
-
delLoopNum
));
}
}
...
...
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