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
e7837af9
Commit
e7837af9
authored
Jan 21, 2025
by
DuJunLi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://xmgit.ixm5.cn:10022/xiamai-test/xm-sportstest
parents
d5a60bec
c6918893
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
src/main/java/com/xiaomai/cases/polar/admin/TestDepartStudioAdmin.java
+3
-4
src/main/java/com/xiaomai/cases/polar/admin/TestReinStateStudioAdmin.java
+2
-2
src/main/java/com/xiaomai/cases/polar/reserve/personal/TestCreateNormalDate.java
+5
-1
No files found.
src/main/java/com/xiaomai/cases/polar/admin/TestDepartStudioAdmin.java
View file @
e7837af9
...
...
@@ -8,7 +8,6 @@ import com.xiaomai.enums.LoginAccount;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
...
...
@@ -50,7 +49,7 @@ public class TestDepartStudioAdmin extends BaseTestImpl {
int
pageIndex
=
rand
.
nextInt
(
pages
);
// 随机获取一页的随机员工
Random
random
=
new
Random
();
int
index
=
pageIndex
+
1
==
pages
?
random
.
nextInt
(
total
%
20
-
1
)+
1
:
random
.
nextInt
(
19
)+
1
;
int
index
=
pageIndex
==
pages
?
random
.
nextInt
(
total
%
20
-
1
)
:
random
.
nextInt
(
19
)+
1
;
body
=
"{\"size\":20,\"current\":"
+
pageIndex
+
",\"state\":\"DUTY\"}"
;
adminPage
=
adminTools
.
pageStudioAdmin
(
body
);
String
adminId
=
adminPage
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
index
).
getString
(
"id"
);
...
...
@@ -64,12 +63,12 @@ public class TestDepartStudioAdmin extends BaseTestImpl {
throw
new
RuntimeException
(
e
);
}
// 用手机号查询离职员工是否有这个员工
body
=
"{\"size\":
1
0,\"current\":0,\"state\":\"LEFT\",\"searchContext\":\""
+
phone
+
"\"}"
;
body
=
"{\"size\":
2
0,\"current\":0,\"state\":\"LEFT\",\"searchContext\":\""
+
phone
+
"\"}"
;
adminPage
=
adminTools
.
pageStudioAdmin
(
body
);
total
=
Integer
.
parseInt
(
adminPage
.
getJSONObject
(
"result"
).
getString
(
"total"
));
Assert
.
assertEquals
(
total
,
1
,
"员工离职失败,用手机号查询离职员工未返回数据"
);
try
{
Thread
.
sleep
(
12
000
);
Thread
.
sleep
(
20
000
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
src/main/java/com/xiaomai/cases/polar/admin/TestReinStateStudioAdmin.java
View file @
e7837af9
...
...
@@ -68,14 +68,14 @@ public class TestReinStateStudioAdmin extends BaseTestImpl {
Assert
.
assertEquals
(
total
,
1
,
"员工离职失败,用手机号查询离职员工未返回数据"
);
try
{
Thread
.
sleep
(
15
000
);
Thread
.
sleep
(
20
000
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
// check 2: 生成对应的操作日志
body
=
"{\"current\":0,\"size\":20,\"domainId\":\""
+
xmAppApi
.
getLoginInfo
().
getStudioId
()+
"\",\"content\": \""
+
name
+
"\",\"brandId\":\""
+
xmAppApi
.
getLoginInfo
().
getBrandId
()+
"\",\"studioId\": \""
+
xmAppApi
.
getLoginInfo
().
getStudioId
()+
"\",\"opEventKey\":\"RESTORE_ADMIN\"}"
;
JSONObject
response
=
configTools
.
getOpauditPage
(
body
);
Assert
.
assertEquals
(
response
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getJSONObject
(
"target"
).
getString
(
"targetId"
),
adminId
,
"员工
离
职未生成操作日志"
);
Assert
.
assertEquals
(
response
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getJSONObject
(
"target"
).
getString
(
"targetId"
),
adminId
,
"员工
复
职未生成操作日志"
);
}
...
...
src/main/java/com/xiaomai/cases/polar/reserve/personal/TestCreateNormalDate.java
View file @
e7837af9
...
...
@@ -13,7 +13,6 @@ import org.testng.annotations.Test;
import
javax.annotation.Resource
;
import
java.util.Arrays
;
import
java.util.Collections
;
/**
* @BelongsProject: xm-sportstest
...
...
@@ -97,6 +96,11 @@ public class TestCreateNormalDate extends BaseTestImpl {
// 设置常规可约时间
reserveTools
.
createNormalDate
(
xmAppApi
.
getLoginInfo
().
getAdminId
(),
normalTimeInfoRequests
);
try
{
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
JSONArray
personalCoachTime
=
reserveTools
.
getPersonalCoachTime
(
xmAppApi
.
getLoginInfo
().
getAdminId
(),
"normalTimeVOS"
);
for
(
int
i
=
0
;
i
<
personalCoachTime
.
size
();
i
++){
...
...
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