-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tobiasKaminsky <[email protected]>
- Loading branch information
1 parent
f0b7eb4
commit 85551b5
Showing
10 changed files
with
235 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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("[email protected]", "[email protected]", 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("[email protected]", "[email protected]", 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() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.