Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-autotest-live
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-autotest-live
Commits
1f5834e5
Commit
1f5834e5
authored
Mar 22, 2021
by
zhangying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充了5个case
parent
171c4ff0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
1 deletions
+106
-1
src/main/java/com/live/cases/fileManage/commonFolder/TestCommonFolderList.java
+106
-1
No files found.
src/main/java/com/live/cases/fileManage/commonFolder/TestCommonFolderList.java
View file @
1f5834e5
...
...
@@ -46,7 +46,7 @@ public class TestCommonFolderList extends XMBaseTest {
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
}
@Test
(
description
=
"公共文件列表,按名称排序"
)
@Test
(
description
=
"公共文件列表,按名称
降序
排序"
)
public
void
testCommonFolderList1
(){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"current"
,
1
);
...
...
@@ -66,4 +66,109 @@ public class TestCommonFolderList extends XMBaseTest {
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
Assert
.
assertNotNull
(
responseRes
.
getJSONObject
(
"result"
).
getString
(
"total"
));
}
@Test
(
description
=
"公共文件列表,按名称升序排序"
)
public
void
testCommonFolderList2
(){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"current"
,
1
);
jsonObject
.
put
(
"disk"
,
"COMMON"
);
jsonObject
.
put
(
"folderIdType"
,
"FOLDER"
);
jsonObject
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
jsonObject
.
put
(
"searchName"
,
null
);
jsonObject
.
put
(
"size"
,
10
);
jsonObject
.
put
(
"sort"
,
"NAME_ASC"
);
jsonObject
.
put
(
"parentId"
,
null
);
System
.
out
.
println
(
"请求"
+
jsonObject
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
responseRes
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"responseRes =="
+
responseRes
);
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
Assert
.
assertNotNull
(
responseRes
.
getJSONObject
(
"result"
).
getString
(
"total"
));
}
@Test
(
description
=
"公共文件列表,按更新时间升序排序"
)
public
void
testCommonFolderList3
(){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"current"
,
1
);
jsonObject
.
put
(
"disk"
,
"COMMON"
);
jsonObject
.
put
(
"folderIdType"
,
"FOLDER"
);
jsonObject
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
jsonObject
.
put
(
"searchName"
,
null
);
jsonObject
.
put
(
"size"
,
10
);
jsonObject
.
put
(
"sort"
,
"UPDATE_ASC"
);
jsonObject
.
put
(
"parentId"
,
null
);
System
.
out
.
println
(
"请求"
+
jsonObject
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
responseRes
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"responseRes =="
+
responseRes
);
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
Assert
.
assertNotNull
(
responseRes
.
getJSONObject
(
"result"
).
getString
(
"total"
));
}
@Test
(
description
=
"公共文件列表,按更新时间降序排序"
)
public
void
testCommonFolderList4
(){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"current"
,
1
);
jsonObject
.
put
(
"disk"
,
"COMMON"
);
jsonObject
.
put
(
"folderIdType"
,
"FOLDER"
);
jsonObject
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
jsonObject
.
put
(
"searchName"
,
null
);
jsonObject
.
put
(
"size"
,
10
);
jsonObject
.
put
(
"sort"
,
"UPDATE_DESC"
);
jsonObject
.
put
(
"parentId"
,
null
);
System
.
out
.
println
(
"请求"
+
jsonObject
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
responseRes
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"responseRes =="
+
responseRes
);
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
Assert
.
assertNotNull
(
responseRes
.
getJSONObject
(
"result"
).
getString
(
"total"
));
}
@Test
(
description
=
"公共文件列表,按文件大小升序排序"
)
public
void
testCommonFolderList5
(){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"current"
,
1
);
jsonObject
.
put
(
"disk"
,
"COMMON"
);
jsonObject
.
put
(
"folderIdType"
,
"FOLDER"
);
jsonObject
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
jsonObject
.
put
(
"searchName"
,
null
);
jsonObject
.
put
(
"size"
,
10
);
jsonObject
.
put
(
"sort"
,
"SIZE_ASC"
);
jsonObject
.
put
(
"parentId"
,
null
);
System
.
out
.
println
(
"请求"
+
jsonObject
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
responseRes
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"responseRes =="
+
responseRes
);
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
Assert
.
assertNotNull
(
responseRes
.
getJSONObject
(
"result"
).
getString
(
"total"
));
}
@Test
(
description
=
"公共文件列表,按文件大小降序排序"
)
public
void
testCommonFolderList6
(){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"current"
,
1
);
jsonObject
.
put
(
"disk"
,
"COMMON"
);
jsonObject
.
put
(
"folderIdType"
,
"FOLDER"
);
jsonObject
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
jsonObject
.
put
(
"searchName"
,
null
);
jsonObject
.
put
(
"size"
,
10
);
jsonObject
.
put
(
"sort"
,
"SIZE_DESC"
);
jsonObject
.
put
(
"parentId"
,
null
);
System
.
out
.
println
(
"请求"
+
jsonObject
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
responseRes
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"responseRes =="
+
responseRes
);
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
Assert
.
assertNotNull
(
responseRes
.
getJSONObject
(
"result"
).
getString
(
"total"
));
}
}
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