|
@@ -80,37 +80,39 @@ class OCFileListFragmentStaticServerIT : AbstractIT() {
|
|
|
|
|
|
@Test
|
|
|
@ScreenshotTest
|
|
|
+ /**
|
|
|
+ * Use same values as {@link FileDetailSharingFragmentIT listSharesFileAllShareTypes }
|
|
|
+ */
|
|
|
fun showSharedFiles() {
|
|
|
val sut = testActivityRule.launchActivity(null)
|
|
|
val fragment = OCFileListFragment()
|
|
|
|
|
|
- val groupShare = OCFile("/sharedToGroup.jpg").apply {
|
|
|
+ val userShare = OCFile("/sharedToUser.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
isSharedWithSharee = true
|
|
|
- sharees = listOf(ShareeUser("group", "Group", ShareType.GROUP))
|
|
|
+ sharees = listOf(ShareeUser("Admin", "Server Admin", ShareType.USER))
|
|
|
}
|
|
|
- sut.storageManager.saveFile(groupShare)
|
|
|
+ sut.storageManager.saveFile(userShare)
|
|
|
|
|
|
- val roomShare = OCFile("/sharedToRoom.jpg").apply {
|
|
|
+ val groupShare = OCFile("/sharedToGroup.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
isSharedWithSharee = true
|
|
|
- sharees = listOf(ShareeUser("Conversation", "Meeting", ShareType.ROOM))
|
|
|
+ sharees = listOf(ShareeUser("group", "Group", ShareType.GROUP))
|
|
|
}
|
|
|
- sut.storageManager.saveFile(roomShare)
|
|
|
+ sut.storageManager.saveFile(groupShare)
|
|
|
|
|
|
- val circleShare = OCFile("/sharedToCircle.jpg").apply {
|
|
|
+ val emailShare = OCFile("/sharedToEmail.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
isSharedWithSharee = true
|
|
|
- sharees = listOf(ShareeUser("circle", "Circle (Public circle)", ShareType.CIRCLE))
|
|
|
+ sharees = listOf(ShareeUser("admin@nextcloud.server.com", "admin@nextcloud.server.com", ShareType.EMAIL))
|
|
|
}
|
|
|
- sut.storageManager.saveFile(circleShare)
|
|
|
+ sut.storageManager.saveFile(emailShare)
|
|
|
|
|
|
- val userShare = OCFile("/sharedToUser.jpg").apply {
|
|
|
+ val publicLink = OCFile("/publicLink.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
- isSharedWithSharee = true
|
|
|
- sharees = listOf(ShareeUser("Admin", "Server Admin", ShareType.USER))
|
|
|
+ isSharedViaLink = true
|
|
|
}
|
|
|
- sut.storageManager.saveFile(userShare)
|
|
|
+ sut.storageManager.saveFile(publicLink)
|
|
|
|
|
|
val federatedUserShare = OCFile("/sharedToFederatedUser.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
@@ -121,25 +123,50 @@ class OCFileListFragmentStaticServerIT : AbstractIT() {
|
|
|
}
|
|
|
sut.storageManager.saveFile(federatedUserShare)
|
|
|
|
|
|
- val emailShare = OCFile("/sharedToEmail.jpg").apply {
|
|
|
+ val personalCircleShare = OCFile("/sharedToPersonalCircle.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
isSharedWithSharee = true
|
|
|
- sharees = listOf(ShareeUser("test@remote.nextcloud.com", "test@remote.nextcloud.com", ShareType.EMAIL))
|
|
|
+ sharees = listOf(ShareeUser("circle", "Circle (Personal circle)", ShareType.CIRCLE))
|
|
|
}
|
|
|
- sut.storageManager.saveFile(emailShare)
|
|
|
-
|
|
|
- val publicLink = OCFile("/publicLink.jpg").apply {
|
|
|
+ sut.storageManager.saveFile(personalCircleShare)
|
|
|
+
|
|
|
+ // as we cannot distinguish circle types, we do not need them right now
|
|
|
+// val publicCircleShare = OCFile("/sharedToPublicCircle.jpg").apply {
|
|
|
+// parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
+// isSharedWithSharee = true
|
|
|
+// sharees = listOf(ShareeUser("circle", "Circle (Public circle)", ShareType.CIRCLE))
|
|
|
+// }
|
|
|
+// sut.storageManager.saveFile(publicCircleShare)
|
|
|
+//
|
|
|
+// val closedCircleShare = OCFile("/sharedToClosedCircle.jpg").apply {
|
|
|
+// parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
+// isSharedWithSharee = true
|
|
|
+// sharees = listOf(ShareeUser("circle", "Circle (Closed circle)", ShareType.CIRCLE))
|
|
|
+// }
|
|
|
+// sut.storageManager.saveFile(closedCircleShare)
|
|
|
+//
|
|
|
+// val secretCircleShare = OCFile("/sharedToSecretCircle.jpg").apply {
|
|
|
+// parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
+// isSharedWithSharee = true
|
|
|
+// sharees = listOf(ShareeUser("circle", "Circle (Secret circle)", ShareType.CIRCLE))
|
|
|
+// }
|
|
|
+// sut.storageManager.saveFile(secretCircleShare)
|
|
|
+
|
|
|
+ val userRoomShare = OCFile("/sharedToUserRoom.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
- isSharedViaLink = true
|
|
|
+ isSharedWithSharee = true
|
|
|
+ sharees = listOf(ShareeUser("Conversation", "Admin", ShareType.ROOM))
|
|
|
}
|
|
|
- sut.storageManager.saveFile(publicLink)
|
|
|
+ sut.storageManager.saveFile(userRoomShare)
|
|
|
|
|
|
- val noShare = OCFile("/notShared.jpg").apply {
|
|
|
+ val groupRoomShare = OCFile("/sharedToGroupRoom.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
+ isSharedWithSharee = true
|
|
|
+ sharees = listOf(ShareeUser("Conversation", "Meeting", ShareType.ROOM))
|
|
|
}
|
|
|
- sut.storageManager.saveFile(noShare)
|
|
|
+ sut.storageManager.saveFile(groupRoomShare)
|
|
|
|
|
|
- val usersShare = OCFile("/sharedToUser.jpg").apply {
|
|
|
+ val usersShare = OCFile("/sharedToUsers.jpg").apply {
|
|
|
parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
isSharedWithSharee = true
|
|
|
sharees = listOf(
|
|
@@ -150,6 +177,11 @@ class OCFileListFragmentStaticServerIT : AbstractIT() {
|
|
|
}
|
|
|
sut.storageManager.saveFile(usersShare)
|
|
|
|
|
|
+ val noShare = OCFile("/notShared.jpg").apply {
|
|
|
+ parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId
|
|
|
+ }
|
|
|
+ sut.storageManager.saveFile(noShare)
|
|
|
+
|
|
|
sut.addFragment(fragment)
|
|
|
|
|
|
shortSleep()
|