From 5844adc1e66e36feb1cb4d29583df9e35e1da66f Mon Sep 17 00:00:00 2001 From: saw-jan Date: Mon, 4 Apr 2022 16:59:38 +0545 Subject: [PATCH] Refactor function that checks collaborator in the search field remove tests from expected failures list Refactor share permission acceptance tests refactor step defs that checks collaborator list update ocis expected failure list add test to check removing collaborator invite list --- ...-failures-with-oc10-server-oauth2-login.md | 38 -------- ...-failures-with-ocis-server-ocis-storage.md | 87 ++++++++----------- .../shareAutocompletion.feature | 21 +++++ .../shareFileWithMultipleUsers.feature | 35 +++----- .../sharePermissionsGroup.feature | 41 ++++----- ...thMultipleUsersAdvancedPermissions.feature | 43 ++++----- .../shareAdvancePermissionsGroup.feature | 57 +++++------- .../shareFolderWithMultipleUsers.feature | 33 +++---- .../sharePermissionsGroup.feature | 43 ++++----- .../shareAdvancePermissionsGroup.feature | 45 +++------- .../shareFileWithMultipleUsers.feature | 32 ++----- .../shareFolderWithMultipleUsers.feature | 33 ++----- .../sharePermissionsFileGroup.feature | 39 +++------ .../sharePermissionsFoldersGroup.feature | 43 +++------ ...thMultipleUsersAdvancedPermissions.feature | 36 ++------ .../SharingDialog/collaboratorsDialog.js | 1 + .../FilesPageElement/sharingDialog.js | 32 +++++-- .../stepDefinitions/sharingContext.js | 48 +++++++--- 18 files changed, 263 insertions(+), 444 deletions(-) diff --git a/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md b/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md index 068f36087ac..04bf6bec05e 100644 --- a/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md +++ b/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md @@ -151,43 +151,5 @@ Other free text and markdown formatting can be used elsewhere in the document if ### [reshared share that is shared with a group the sharer is part of shows twice on "Share with me" page](https://github.com/owncloud/web/issues/2512) - [webUISharingAcceptShares/acceptShares.feature:32](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L32) -### [Deletion of a selected user/group as a collaborator has unusual behavior in UI](https://github.com/owncloud/web/issues/5857) -- [webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L70) -- [webUISharingPermissionToRoot/sharePermissionsFileGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature#L65) -- [webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature#L67) -- [webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature:71](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature#L71) -- [webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature#L67) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:61](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L61) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L62) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L63) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L64) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L65) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L66) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L63) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L64) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L65) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L66) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L67) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:68](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L68) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:69](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L69) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L70) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:71](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L71) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:72](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L72) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:73](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L73) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:74](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L74) - -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L62) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L63) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L64) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L65) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L66) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L67) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L62) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L63) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L64) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L65) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L66) -- [webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature#L66) - ### [empty subfolder inside a folder to be uploaded is not created on the server](https://github.com/owncloud/web/issues/6348) - [webUIUpload/upload.feature:42](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/upload.feature#L42) diff --git a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md index ad07c1a891f..0eab9c0e95c 100644 --- a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md +++ b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md @@ -196,65 +196,46 @@ Other free text and markdown formatting can be used elsewhere in the document if ### [Accepting different shares with same filename from different users overwrites one file](https://github.com/owncloud/ocis/issues/713) - [webUISharingAcceptShares/acceptShares.feature:228](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L228) -### [Deletion of a selected user/group as a collaborator has unusual behavior in UI](https://github.com/owncloud/web/issues/5857) +### [Share not created with default permissions](https://github.com/owncloud/ocis/issues/1277) +- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:60](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L60) +- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:61](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L61) +- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L62) - [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L63) - [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L64) - [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L65) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:69](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L69) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L70) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:71](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L71) - -### [Share Permissions](https://github.com/owncloud/ocis/issues/1277) -### [Deletion of a selected user/group as a collaborator has unusual behavior in UI](https://github.com/owncloud/web/issues/5857) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L62) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L63) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L63) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L64) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:61](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L61) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L62) - -### [Share Permissions](https://github.com/owncloud/ocis/issues/1277) -- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:61](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L61) -- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L62) - -### [Advanced Permissions role is not displayed](https://github.com/owncloud/ocis/issues/1922) -### [Deletion of a selected user/group as a collaborator has unusual behavior in UI](https://github.com/owncloud/web/issues/5857) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L64) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L65) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L66) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:62](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L62) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L65) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L66) -- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L67) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L64) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L65) -- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L66) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L63) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L64) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L65) -- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L66) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L66) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L67) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:68](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L68) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:72](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L72) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:73](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L73) -- [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:74](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L74) - - -### [Advanced Permissions role is not displayed](https://github.com/owncloud/ocis/issues/1922) +- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:54](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L54) +- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:55](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L55) +- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:56](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L56) +- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:57](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L57) +- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:58](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L58) +- [webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature:59](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature#L59) +- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:54](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L54) +- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:55](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L55) +- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:56](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L56) +- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:57](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L57) +- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:58](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L58) +- [webUISharingFilePermissionsGroups/sharePermissionsGroup.feature:59](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature#L59) +- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:47](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L47) +- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:48](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L48) +- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:49](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L49) +- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:50](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L50) +- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:51](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L51) +- [webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature:52](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature#L52) - [webUISharingInternalGroups/shareWithGroups.feature:74](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L74) - [webUISharingInternalGroups/shareWithGroups.feature:72](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L72) - [webUISharingInternalGroups/shareWithGroups.feature:73](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L73) -- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L70) -- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:69](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L69) -- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:71](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L71) -- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L66) -- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L67) -- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:68](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L68) -- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L63) -- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:64](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L64) -- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L65) -- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:66](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L66) +- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:53](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L53) +- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:54](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L54) +- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:55](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L55) +- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:56](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L56) +- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:57](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L57) +- [webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:58](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature#L58) +- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:48](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L48) +- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:49](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L49) +- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:50](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L50) +- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:51](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L51) +- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:52](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L52) +- [webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature:53](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature#L53) - [webUIResharing2/reshareUsers.feature:97](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L97) - [webUIResharing2/reshareUsers.feature:98](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L98) - [webUIResharing2/reshareUsers.feature:99](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L99) diff --git a/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature b/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature index 39840f142d4..fe9c3119a2c 100644 --- a/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature +++ b/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature @@ -177,3 +177,24 @@ Feature: Autocompletion of share-with names Then all users and groups that contain the string "fi" in their name should be listed in the autocomplete list on the webUI except group "finance1" But only users and groups that contain the string "fi" in their name or displayname should be listed in the autocomplete list on the webUI And the users own name should not be listed in the autocomplete list on the webUI + + + Scenario: add collaborators in the invite list and remove some of them + Given user "regularuser" has created folder "simple-folder" in the server + And user "regularuser" has logged in using the webUI + And the user has opened the share dialog for folder "simple-folder" + When the user selects the following collaborators for the share as "Viewer" with "," permissions: + | collaborator | type | + | Alice Hansen | user | + | Carol King | user | + | John Finn Smith | user | + | finance1 | group | + | finance3 | group | + And the user removes "John Finn Smith" as a collaborator from the share + And the user removes "Carol King" as a collaborator from the share + And the user removes "finance3" as a collaborator from the share + Then user "John Finn Smith" should not be visible in the collaborators selected options in the webUI + And user "Carol King" should not be visible in the collaborators selected options in the webUI + And group "finance3" should not be visible in the collaborators selected options in the webUI + But user "Alice Hansen" should be visible in the collaborators selected options in the webUI + And group "finance1" should be visible in the collaborators selected options in the webUI diff --git a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature index d63662fd0a0..69fee66c34d 100644 --- a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature @@ -10,29 +10,18 @@ Feature: Sharing files with multiple internal users with different permissions | username | | Alice | | Brian | + | Carol | @issue-ocis-1743 @ocisSmokeTest Scenario Outline: share a file with multiple users with different roles and permissions - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | user0 | - | Carol | - | David | - And user "Alice" has created file "lorem.txt" in the server + Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has logged in using the webUI When the user opens the share dialog for file "lorem.txt" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | - | Regular User | user | | Brian Murphy | user | | Carol King | user | - | David Lopez | user | - And the user removes "David Lopez" as a collaborator from the share - And the user removes "Regular User" as a collaborator from the share - Then user "David Lopez" should not be visible in the collaborators selected options in the webUI - And user "Regular User" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators + And the user shares with the selected collaborators And user "Brian" accepts the share "Shares/lorem.txt" offered by user "Alice" using the sharing API in the server And user "Carol" accepts the share "Shares/lorem.txt" offered by user "Alice" using the sharing API in the server Then custom permissions "" should be set for user "Brian Murphy" for file "lorem.txt" on the webUI @@ -53,15 +42,11 @@ Feature: Sharing files with multiple internal users with different permissions | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | - But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" file "/Shares/lorem.txt" should not exist in the server - And user "David Lopez" should not be listed in the collaborators list on the webUI - And as "David" file "/Shares/lorem.txt" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Viewer | , | , | read, share | - | Editor | Editor | , | , | read, update, share | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Viewer | share | , | read, share | - | Custom permissions | Custom permissions | update | update | read, update | - | Custom permissions | Editor | share, update | , | read, update, share | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Viewer | Viewer | , | read, share | read, share | + | Editor | Editor | , | read, update, share | read, update, share | + | Custom permissions | Custom permissions | , | , | read | + | Custom permissions | Viewer | share | share | read, share | + | Custom permissions | Custom permissions | update | update | read, update | + | Custom permissions | Editor | share, update | read, update, share | read, update, share | diff --git a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature index ca7d5406221..8998d625408 100644 --- a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature @@ -15,52 +15,45 @@ Feature: Sharing files with internal groups with permissions And these groups have been created in the server: | groupname | | grp1 | - And user "Alice" has been added to group "grp1" in the server + | grp2 | And user "Brian" has been added to group "grp1" in the server + And user "Carol" has been added to group "grp2" in the server - Scenario Outline: share a file with multiple users with different roles and permissions - Given user "user0" has been created with default attributes and without skeleton files in the server - And group "grp2" has been created in the server - And user "Brian" has been added to group "grp2" in the server - And user "Alice" has created file "lorem.txt" in the server + Scenario Outline: share a file with multiple groups with different roles and permissions + Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has logged in using the webUI When the user opens the share dialog for file "lorem.txt" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | | grp1 | group | - | Carol King | user | | grp2 | group | - And the user removes "grp1" as a collaborator from the share - Then group "grp1" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators + And the user shares with the selected collaborators And user "Brian" accepts the share "Shares/lorem.txt" offered by user "Alice" using the sharing API in the server And user "Carol" accepts the share "Shares/lorem.txt" offered by user "Alice" using the sharing API in the server - Then custom permissions "" should be set for user "grp2" for file "lorem.txt" on the webUI - And custom permissions "" should be set for user "Carol King" for file "lorem.txt" on the webUI + Then custom permissions "" should be set for group "grp2" for file "lorem.txt" on the webUI + And custom permissions "" should be set for group "grp1" for file "lorem.txt" on the webUI And group "grp2" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI + And group "grp1" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI And user "Brian" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | grp2 | + | share_with | grp1 | | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | And user "Carol" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | Carol | + | share_with | grp2 | | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | - But group "grp1" should not be listed in the collaborators list on the webUI - And as "Alice" file "/Shares/lorem.txt" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Viewer | , | , | read, share | - | Editor | Editor | , | , | share, read, update | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Viewer | share | , | read, share | - | Custom permissions | Editor | share, update | , | read, update, share | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Viewer | Viewer | , | read, share | read, share | + | Editor | Editor | , | read, update, share | read, update, share | + | Custom permissions | Custom permissions | , | , | read | + | Custom permissions | Viewer | share | share | read, share | + | Custom permissions | Custom permissions | update | update | read, update | + | Custom permissions | Editor | share, update | read, update, share | read, update, share | diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature index 9e7079261b8..865f28c9135 100644 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature +++ b/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature @@ -10,26 +10,17 @@ Feature: Sharing folders with multiple internal users using advanced permissions | username | | Alice | | Brian | + | Carol | @issue-ocis-1922 Scenario Outline: share a folder with multiple users using role as advanced permissions role and different extra permissions - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | user0 | - | Carol | - | David | - And user "Alice" has created folder "/simple-folder" in the server + Given user "Alice" has created folder "/simple-folder" in the server And user "Alice" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | - | Regular User | user | | Brian Murphy | user | | Carol King | user | - | David Lopez | user | - And the user removes "David Lopez" as a collaborator from the share - And the user removes "Regular User" as a collaborator from the share And the user shares with the selected collaborators And user "Brian" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server @@ -51,21 +42,17 @@ Feature: Sharing folders with multiple internal users using advanced permissions | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | - But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" folder "/Shares/simple-folder" should not exist in the server - And user "David Lopez" should not be listed in the collaborators list on the webUI - And as "David" folder "/Shares/simple-folder" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Custom permissions | Custom permissions | delete | delete | read, delete | - | Custom permissions | Custom permissions | update | update | read, update | - | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | - | Custom permissions | Custom permissions | update, create | update, create | read, update, create | - | Custom permissions | Custom permissions | create | create | read, create | - | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | - | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | - | Custom permissions | Custom permissions | share, update | share, update | read, update, share | - | Custom permissions | Custom permissions | share, create | share, create | read, share, create | - | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | - | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | - | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Custom permissions | Custom permissions | delete | delete | read, delete | + | Custom permissions | Custom permissions | update | update | read, update | + | Custom permissions | Custom permissions | create | create | read, create | + | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | + | Custom permissions | Custom permissions | update, create | update, create | read, update, create | + | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | + | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | + | Custom permissions | Custom permissions | share, update | share, update | read, update, share | + | Custom permissions | Custom permissions | share, create | share, create | read, share, create | + | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | + | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | + | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature index c3cc80f4c07..71c74264620 100644 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature @@ -15,60 +15,51 @@ Feature: Sharing folders with internal groups with role as advanced permissions And these groups have been created in the server: | groupname | | grp1 | - And user "Alice" has been added to group "grp1" in the server + | grp2 | And user "Brian" has been added to group "grp1" in the server + And user "Carol" has been added to group "grp2" in the server - @issue-1837 - Scenario Outline: share a folder with multiple users with role as advanced permissions and different extra permissions - Given group "grp2" has been created in the server - And user "Brian" has been added to group "grp2" in the server - And user "Alice" has created folder "simple-folder" in the server + + Scenario Outline: share a folder with multiple groups with role as advanced permissions and different extra permissions + Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | | grp1 | group | - | Carol King | user | | grp2 | group | - And the user removes "grp1" as a collaborator from the share - And the user removes "Alice Hansen" as a collaborator from the share - Then group "grp1" should not be visible in the collaborators selected options in the webUI - And user "Alice Hansen" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators + And the user shares with the selected collaborators And user "Brian" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server - Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI - And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI + Then custom permissions "" should be set for group "grp2" for folder "simple-folder" on the webUI + And custom permissions "" should be set for group "grp1" for folder "simple-folder" on the webUI And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And group "grp1" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And user "Brian" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | grp2 | + | share_with | grp1 | | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | And user "Carol" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | Carol | + | share_with | grp2 | | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | - But group "grp1" should not be listed in the collaborators list on the webUI - And as "Alice" folder "/Shares/simple-folder" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Custom permissions | Custom permissions | delete | delete | read, delete | - | Custom permissions | Custom permissions | update | update | read, update | - | Custom permissions | Custom permissions | create | create | read, create | - | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | - | Custom permissions | Custom permissions | share, update | share, update | read, update, share | - | Custom permissions | Custom permissions | share, create | share, create | read, share, create | - | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | - | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | - | Custom permissions | Custom permissions | update, create | update, create | read, update, create | - | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | - | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | - | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Custom permissions | Custom permissions | delete | delete | read, delete | + | Custom permissions | Custom permissions | update | update | read, update | + | Custom permissions | Custom permissions | create | create | read, create | + | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | + | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | + | Custom permissions | Custom permissions | update, create | update, create | read, update, create | + | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | + | Custom permissions | Custom permissions | share, update | share, update | read, update, share | + | Custom permissions | Custom permissions | share, create | share, create | read, share, create | + | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | + | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | + | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature index c5e902edc0a..acff388deb0 100644 --- a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature @@ -11,26 +11,17 @@ Feature: Sharing folders with multiple internal users with different permissions | username | | Alice | | Brian | + | Carol | @issue-ocis-1743 @issue-ocis-1227 Scenario Outline: share a folder with multiple users with different roles and permissions - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | user0 | - | Carol | - | David | - And user "Alice" has created folder "simple-folder" in the server + Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | - | Regular User | user | - | Brian Murphy | user | + | Brian Murphy | user | | Carol King | user | - | David Lopez | user | - And the user removes "David Lopez" as a collaborator from the share - And the user removes "Regular User" as a collaborator from the share And the user shares with the selected collaborators And user "Brian" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server @@ -52,15 +43,11 @@ Feature: Sharing folders with multiple internal users with different permissions | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | - But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" folder "simple-folder (2)" should not exist in the server - And user "David Lopez" should not be listed in the collaborators list on the webUI - And as "David" folder "simple-folder (2)" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Viewer | , | share | read, share | - | Editor | Editor | , | delete, update, create, share | all | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Viewer | share | share | read, share | - | Custom permissions | Custom permissions | delete, update, create | delete, update, create | read, delete, update, create | - | Custom permissions | Editor | share, delete, update, create | delete, update, create, share | all | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Viewer | Viewer | , | share | read, share | + | Editor | Editor | , | delete, update, create, share | all | + | Custom permissions | Custom permissions | , | , | read | + | Custom permissions | Viewer | share | share | read, share | + | Custom permissions | Custom permissions | delete, update, create | delete, update, create | read, delete, update, create | + | Custom permissions | Editor | share, delete, update, create | delete, update, create, share | all | diff --git a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature index 93546d23af8..590fc6063e4 100644 --- a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature @@ -15,52 +15,45 @@ Feature: Sharing folders with internal groups with different roles and permissio And these groups have been created in the server: | groupname | | grp1 | - And user "Alice" has been added to group "grp1" in the server + | grp2 | And user "Brian" has been added to group "grp1" in the server + And user "Carol" has been added to group "grp2" in the server - @issue-1837 - Scenario Outline: share a folder with multiple users with different roles and permissions - Given group "grp2" has been created in the server - And user "Alice" has created folder "simple-folder" in the server - And user "Brian" has been added to group "grp2" in the server + + Scenario Outline: share a folder with multiple groups with different roles and permissions + Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | | grp1 | group | - | Carol King | user | | grp2 | group | - And the user removes "grp1" as a collaborator from the share - Then group "grp1" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators + And the user shares with the selected collaborators And user "Brian" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server - Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI - And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI + Then custom permissions "" should be set for group "grp2" for folder "simple-folder" on the webUI + And custom permissions "" should be set for group "grp1" for folder "simple-folder" on the webUI And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And group "grp1" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And user "Brian" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | grp2 | + | share_with | grp1 | | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | And user "Carol" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | Carol | + | share_with | grp2 | | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | - But group "grp1" should not be listed in the collaborators list on the webUI - And as "Alice" folder "/Shares/simple-folder" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Viewer | , | , | read, share | - | Editor | Editor | , | , | all | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Viewer | share | , | read, share | - | Custom permissions | Custom permissions | delete, update, create | delete, update, create | read, delete, update, create | - | Custom permissions | Editor | share, delete, update, create | , | all | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Viewer | Viewer | , | share | read, share | + | Editor | Editor | , | delete, update, create, share | all | + | Custom permissions | Custom permissions | , | , | read | + | Custom permissions | Viewer | share | share | read, share | + | Custom permissions | Custom permissions | delete, update, create | delete, update, create | read, delete, update, create | + | Custom permissions | Editor | share, delete, update, create | delete, update, create, share | all | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature b/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature index f1daeeaf788..81a36d8e403 100644 --- a/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature @@ -13,59 +13,38 @@ Feature: Sharing folders with internal groups with role as advanced permissions And these groups have been created in the server: | groupname | | grp1 | - And user "Alice" has been added to group "grp1" in the server + | grp2 | And user "Brian" has been added to group "grp1" in the server + And user "Carol" has been added to group "grp2" in the server And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server - @issue-1837 - Scenario Outline: share a folder with multiple users with role as advanced permissions and different extra permissions - Given group "grp2" has been created in the server - And user "Brian" has been added to group "grp2" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for folder "simple-folder" using the webUI + Scenario Outline: share a folder with multiple groups with role as advanced permissions and different extra permissions + Given user "Alice" has logged in using the webUI + When the user opens the share dialog for folder "simple-folder" using the webUI And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | | grp1 | group | - | Carol King | user | | grp2 | group | - And the user removes "grp1" as a collaborator from the share - And the user removes "Alice Hansen" as a collaborator from the share - Then group "grp1" should not be visible in the collaborators selected options in the webUI - And user "Alice Hansen" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators - Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI - And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI + And the user shares with the selected collaborators + Then custom permissions "" should be set for group "grp2" for folder "simple-folder" on the webUI + And custom permissions "" should be set for group "grp1" for folder "simple-folder" on the webUI And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And group "grp1" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And user "Brian" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | grp2 | + | share_with | grp1 | | file_target | /simple-folder | | item_type | folder | | permissions | | And user "Carol" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | Carol | + | share_with | grp2 | | file_target | /simple-folder | | item_type | folder | | permissions | | - But group "grp1" should not be listed in the collaborators list on the webUI - And as "Alice" folder "simple-folder (2)" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - # | Custom permissions | Custom permissions | delete | delete | read, delete | - # | Custom permissions | Custom permissions | update | update | read, update | - # | Custom permissions | Custom permissions | create | create | read, create | - # | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | - # | Custom permissions | Custom permissions | share, update | share, update | read, update, share | - # | Custom permissions | Custom permissions | share, create | share, create | read, share, create | - # | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | - # | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | - # | Custom permissions | Custom permissions | update, create | update, create | read, update, create | - # | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | - # | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature b/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature index dc3b55d8db2..fa36504010c 100644 --- a/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature @@ -9,29 +9,18 @@ Feature: Sharing files with multiple internal users with different permissions | username | | Alice | | Brian | + | Carol | And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server Scenario Outline: share a file with multiple users with different roles and permissions - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | user0 | - | Carol | - | David | - And user "Alice" has logged in using the webUI + Given user "Alice" has logged in using the webUI When the user opens the share dialog for file "lorem.txt" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | - | Regular User | user | | Brian Murphy | user | | Carol King | user | - | David Lopez | user | - And the user removes "David Lopez" as a collaborator from the share - And the user removes "Regular User" as a collaborator from the share - Then user "David Lopez" should not be visible in the collaborators selected options in the webUI - And user "Regular User" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators + And the user shares with the selected collaborators Then custom permissions "" should be set for user "Brian Murphy" for file "lorem.txt" on the webUI And custom permissions "" should be set for user "Carol King" for file "lorem.txt" on the webUI And user "Brian Murphy" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI @@ -50,17 +39,6 @@ Feature: Sharing files with multiple internal users with different permissions | file_target | /lorem.txt | | item_type | file | | permissions | | - But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" file "lorem.txt" should not exist in the server - And user "David Lopez" should not be listed in the collaborators list on the webUI - And as "David" file "lorem.txt" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - # | Viewer | Viewer | share | share | read, share | - # | Viewer | Viewer | , | , | read | - # | Editor | Editor | share | share | share, read, update | - # | Editor | Editor | , | , | read, update | - # | Custom permissions | Viewer | , | , | read | - # | Custom permissions | Viewer | share | share | read, share | - # | Custom permissions | Editor | update | , | read, update | - | Custom permissions | Editor | share, update | , | read, update, share | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Custom permissions | Editor | share, update | read, update, share | read, update, share | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature b/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature index 0aea2367f61..88cc02168f3 100644 --- a/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature @@ -9,30 +9,18 @@ Feature: Sharing folders with multiple internal users with different permissions | username | | Alice | | Brian | + | Carol | And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server Scenario Outline: share a folder with multiple users with different roles and permissions - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | user0 | - | Carol | - | David | - And user "Alice" has logged in using the webUI + Given user "Alice" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | - | Regular User | user | | Brian Murphy | user | | Carol King | user | - | David Lopez | user | - And the user removes "David Lopez" as a collaborator from the share - And the user removes "Regular User" as a collaborator from the share - Then user "David Lopez" should not be visible in the collaborators selected options in the webUI - And user "Regular User" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators + And the user shares with the selected collaborators Then custom permissions "" should be set for user "Brian Murphy" for folder "simple-folder" on the webUI And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI And user "Brian Murphy" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI @@ -51,17 +39,6 @@ Feature: Sharing folders with multiple internal users with different permissions | file_target | /simple-folder | | item_type | folder | | permissions | | - But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" folder "simple-folder" should not exist in the server - And user "David Lopez" should not be listed in the collaborators list on the webUI - And as "David" folder "simple-folder" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - # | Viewer | Viewer | share | share | read, share | - # | Viewer | Viewer | , | , | read | - # | Editor | Editor | share | share | all | - # | Editor | Editor | , | , | read, update, delete, create | - # | Custom permissions | Viewer | , | , | read | - # | Custom permissions | Viewer | share | share | read, share | - # | Custom permissions | Editor | delete, update, create | , | read, delete, update, create | - | Custom permissions | Editor | share, delete, update, create | , | all | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Custom permissions | Editor | share, delete, update, create | delete, update, create, share | all | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature index d39d4572820..9ffa977233a 100644 --- a/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature +++ b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature @@ -13,53 +13,38 @@ Feature: Sharing files with internal groups with permissions And these groups have been created in the server: | groupname | | grp1 | - And user "Alice" has been added to group "grp1" in the server + | grp2 | And user "Brian" has been added to group "grp1" in the server + And user "Carol" has been added to group "grp2" in the server And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server - Scenario Outline: share a file with multiple users with different roles and permissions - Given user "user0" has been created with default attributes and without skeleton files in the server - And group "grp2" has been created in the server - And user "Brian" has been added to group "grp2" in the server - And user "Alice" has logged in using the webUI + Scenario Outline: share a file with multiple groups with different roles and permissions + Given user "Alice" has logged in using the webUI When the user opens the share dialog for file "lorem.txt" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | | grp1 | group | - | Carol King | user | | grp2 | group | - And the user removes "grp1" as a collaborator from the share - Then group "grp1" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators - Then custom permissions "" should be set for user "grp2" for file "lorem.txt" on the webUI - And custom permissions "" should be set for user "Carol King" for file "lorem.txt" on the webUI + And the user shares with the selected collaborators + Then custom permissions "" should be set for group "grp2" for file "lorem.txt" on the webUI + And custom permissions "" should be set for group "grp1" for file "lorem.txt" on the webUI + And group "grp2" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI And group "grp2" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI And user "Brian" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | grp2 | + | share_with | grp1 | | file_target | /lorem.txt | | item_type | file | | permissions | | And user "Carol" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | Carol | + | share_with | grp2 | | file_target | /lorem.txt | | item_type | file | | permissions | | - But group "grp1" should not be listed in the collaborators list on the webUI - And as "Alice" file "lorem.txt" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - # | Viewer | Viewer | share | share | read, share | - # | Viewer | Viewer | , | , | read | - # | Editor | Editor | share | share | share, read, update | - # | Editor | Editor | , | , | read, update | - # | Custom permissions | Viewer | , | , | read | - # | Custom permissions | Viewer | share | share | read, share | - # | Custom permissions | Editor | update | , | read, update | - | Custom permissions | Editor | share, update | , | read, update, share | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Custom permissions | Editor | share, update | read, update, share | read, update, share | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature index 7fad1649bc0..78721086f8f 100644 --- a/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature +++ b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature @@ -13,55 +13,38 @@ Feature: Sharing folders with internal groups with different roles and permissio And these groups have been created in the server: | groupname | | grp1 | - And user "Alice" has been added to group "grp1" in the server + | grp2 | And user "Brian" has been added to group "grp1" in the server + And user "Carol" has been added to group "grp2" in the server And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server - @issue-1837 - Scenario Outline: share a folder with multiple users with different roles and permissions - Given group "grp2" has been created in the server - And user "Brian" has been added to group "grp2" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for folder "simple-folder" using the webUI + Scenario Outline: share a folder with multiple groups with different roles and permissions + Given user "Alice" has logged in using the webUI + When the user opens the share dialog for folder "simple-folder" using the webUI And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | | grp1 | group | - | Carol King | user | | grp2 | group | - And the user removes "grp1" as a collaborator from the share - And the user removes "Alice Hansen" as a collaborator from the share - Then group "grp1" should not be visible in the collaborators selected options in the webUI - And user "Alice Hansen" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators - Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI - And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI + And the user shares with the selected collaborators + Then custom permissions "" should be set for group "grp2" for folder "simple-folder" on the webUI + And custom permissions "" should be set for group "grp1" for folder "simple-folder" on the webUI And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And group "grp1" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And user "Brian" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | grp2 | + | share_with | grp1 | | file_target | /simple-folder | | item_type | folder | | permissions | | And user "Carol" should have received a share with these details in the server: | field | value | | uid_owner | Alice | - | share_with | Carol | + | share_with | grp2 | | file_target | /simple-folder | | item_type | folder | | permissions | | - But group "grp1" should not be listed in the collaborators list on the webUI - And as "Alice" folder "simple-folder" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - # | Viewer | Viewer | share | share | read, share | - # | Viewer | Viewer | , | , | read | - # | Editor | Editor | share | share | all | - # | Editor | Editor | , | , | read, update, delete, create | - # | Custom permissions | Viewer | , | , | read | - # | Custom permissions | Viewer | share | share | read, share | - # | Custom permissions | Editor | delete, update, create | , | read, delete, update, create | - | Custom permissions | Editor | share, delete, update, create | , | all | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + | Custom permissions | Editor | share, delete, update, create | delete, update, create, share | all | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature b/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature index f00038ade7f..2a04a9a2905 100644 --- a/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature +++ b/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature @@ -9,29 +9,18 @@ Feature: Sharing folders with multiple internal users using advanced permissions | username | | Alice | | Brian | + | Carol | And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server + Scenario Outline: share a folder with multiple users using role as advanced permissions role and different extra permissions - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | user0 | - | Carol | - | David | - And user "Alice" has logged in using the webUI + Given user "Alice" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: | collaborator | type | - | Regular User | user | | Brian Murphy | user | | Carol King | user | - | David Lopez | user | - And the user removes "David Lopez" as a collaborator from the share - And the user removes "Regular User" as a collaborator from the share - Then user "David Lopez" should not be visible in the collaborators selected options in the webUI - And user "Regular User" should not be visible in the collaborators selected options in the webUI - When the user shares with the selected collaborators + And the user shares with the selected collaborators Then custom permissions "" should be set for user "Brian Murphy" for folder "simple-folder" on the webUI And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI And user "Brian Murphy" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI @@ -50,21 +39,6 @@ Feature: Sharing folders with multiple internal users using advanced permissions | file_target | /simple-folder | | item_type | folder | | permissions | | - But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" folder "simple-folder" should not exist in the server - And user "David Lopez" should not be listed in the collaborators list on the webUI - And as "David" folder "simple-folder" should not exist in the server Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - # | Custom permissions | Custom permissions | delete | delete | read, delete | - # | Custom permissions | Custom permissions | update | update | read, update | - # | Custom permissions | Custom permissions | create | create | read, create | - # | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | - # | Custom permissions | Custom permissions | share, update | share, update | read, update, share | - # | Custom permissions | Custom permissions | share, create | share, create | read, share, create | - # | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | - # | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | - # | Custom permissions | Custom permissions | update, create | update, create | read, update, create | - # | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | - # | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/pageObjects/FilesPageElement/SharingDialog/collaboratorsDialog.js b/tests/acceptance/pageObjects/FilesPageElement/SharingDialog/collaboratorsDialog.js index 231d90559f2..a2e1cb08b59 100644 --- a/tests/acceptance/pageObjects/FilesPageElement/SharingDialog/collaboratorsDialog.js +++ b/tests/acceptance/pageObjects/FilesPageElement/SharingDialog/collaboratorsDialog.js @@ -15,6 +15,7 @@ module.exports = { .waitForElementVisible(deleteSelector) .waitForAnimationToFinish() // wait for animation of share sliding out .click(deleteSelector) + .waitForAjaxCallsToStartAndFinish() }, /** * Open the role selection dialog for a new share or for editing the given collaborator diff --git a/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js b/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js index 91806f732ad..c8689a61160 100644 --- a/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js +++ b/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js @@ -3,6 +3,7 @@ const _ = require('lodash') const { COLLABORATOR_PERMISSION_ARRAY, calculateDate } = require('../../helpers/sharingHelper') const { client } = require('nightwatch-api') const userSettings = require('../../helpers/userSettings') +const timeoutHelper = require('../../helpers/timeoutHelper') const collaboratorDialog = client.page.FilesPageElement.SharingDialog.collaboratorsDialog() const SHARE_TYPE_STRING = { user: 'user', @@ -66,8 +67,18 @@ module.exports = { * @param {string} userOrGroup * @param {string} userOrGroupName */ - isGroupNotPresentInSelectedCollaboratorsOptions: function (userOrGroup, userOrGroupName) { + isUserOrGroupPresentInSelectedCollaboratorsOptions: async function ( + userOrGroup, + userOrGroupName, + expectVisible = true + ) { let requiredSelector + let isVisible = false + + const timeout = expectVisible + ? this.api.globals.waitForConditionTimeout + : this.api.globals.waitForNegativeConditionTimeout + if (userOrGroup === 'group') { requiredSelector = util.format( this.elements.groupInSelectedCollaboratorsList.selector, @@ -79,10 +90,19 @@ module.exports = { userOrGroupName ) } - return this.waitForElementNotVisible({ - selector: requiredSelector, - locateStrategy: 'xpath' - }) + + await this.isVisible( + { + selector: requiredSelector, + locateStrategy: 'xpath', + timeout: timeoutHelper.parseTimeout(timeout), + suppressNotFoundErrors: !expectVisible + }, + (result) => { + isVisible = result.value === true + } + ) + return isVisible }, /** @@ -678,7 +698,7 @@ module.exports = { }, groupInSelectedCollaboratorsList: { selector: - '//span[contains(@class, "files-share-invite-recipient")]//span[.="Group"]/following-sibling::p[.="%s"]', + '//span[contains(@class, "files-share-invite-recipient")]//span[@data-testid="recipient-icon"]/following-sibling::p[.="%s"]', locateStrategy: 'xpath' }, userInSelectedCollaboratorsList: { diff --git a/tests/acceptance/stepDefinitions/sharingContext.js b/tests/acceptance/stepDefinitions/sharingContext.js index 0779cac2011..50670cbea40 100644 --- a/tests/acceptance/stepDefinitions/sharingContext.js +++ b/tests/acceptance/stepDefinitions/sharingContext.js @@ -135,14 +135,10 @@ const assertCollaboratorslistDoesNotContain = async function (type, name) { } const collaboratorsDialog = client.page.FilesPageElement.SharingDialog.collaboratorsDialog() - // check if fileslist is not present because it's empty - try { - await client.waitForElementNotPresent({ - selector: '#files-collaborators-list', - locateStrategy: 'css' - }) + // return if there is no collaboartor list + if (!(await collaboratorsDialog.hasCollaboratorsList(false))) { return - } catch (e) {} + } return collaboratorsDialog .getCollaboratorsList( @@ -314,11 +310,11 @@ const assertSharePermissions = async function (currentSharePermissions, permissi } Then( - 'custom permission/permissions {string} should be set for user {string} for file/folder {string} on the webUI', - async function (permissions, user, resource) { + 'custom permission/permissions {string} should be set for user/group {string} for file/folder {string} on the webUI', + async function (permissions, userOrGroup, resource) { await client.page.FilesPageElement.filesList().openSharingDialog(resource) const currentSharePermissions = - await client.page.FilesPageElement.sharingDialog().getDisplayedPermission(user) + await client.page.FilesPageElement.sharingDialog().getDisplayedPermission(userOrGroup) return assertSharePermissions(currentSharePermissions, permissions) } ) @@ -388,9 +384,35 @@ When('the user removes {string} as a collaborator from the share', function (use Then( /^(user|group) "([^"]*)" should not be visible in the collaborators selected options in the webUI$/, async function (userOrGroup, userOrGroupName) { - await client.page.FilesPageElement.sharingDialog().isGroupNotPresentInSelectedCollaboratorsOptions( - userOrGroup, - userOrGroupName + const isUserOrGroupPresent = + await client.page.FilesPageElement.sharingDialog().isUserOrGroupPresentInSelectedCollaboratorsOptions( + userOrGroup, + userOrGroupName, + false + ) + + assert.strictEqual( + isUserOrGroupPresent, + false, + `${userOrGroup} "${userOrGroupName}" was present in the collaborators selected options.` + ) + } +) + +Then( + /^(user|group) "([^"]*)" should be visible in the collaborators selected options in the webUI$/, + async function (userOrGroup, userOrGroupName) { + const isUserOrGroupPresent = + await client.page.FilesPageElement.sharingDialog().isUserOrGroupPresentInSelectedCollaboratorsOptions( + userOrGroup, + userOrGroupName, + true + ) + + assert.strictEqual( + isUserOrGroupPresent, + true, + `${userOrGroup} "${userOrGroupName}" was not present in the collaborators selected options.` ) } )