From 8a052916fa80fa300a0cadcb0bde66390783820d Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Fri, 13 Oct 2023 14:07:10 +0200 Subject: [PATCH] [full-ci] [test-only] enable auto-accepting in e2e and UI test (#9775) * enable autoaccepting in e2e test * delete accepting share steps from acceptance UI tests * cange line of expected failures file * bump ocis * fix tests * fix after review --- .drone.star | 1 + docker-compose.yml | 1 + ...-failures-with-ocis-server-ocis-storage.md | 12 +- .../deleteFilesFolders.feature | 5 +- .../webUIFilesActionMenu/versions.feature | 4 +- .../features/webUIFilesCopy/copy.feature | 5 +- .../webUIMoveFilesFolders/moveFiles.feature | 4 +- .../accessToSharesFolder.feature | 9 +- .../webUIPreview/mediaPreview.feature | 4 +- .../webUIResharing1/reshareUsers.feature | 117 +----------------- .../webUIResharing2/reshareUsers.feature | 24 +--- .../disableSharing.feature | 5 +- .../restrictReSharing.feature | 6 +- .../restrictSharing.feature | 4 +- .../acceptShares.feature | 105 +--------------- .../shareAutocompletion.feature | 3 +- .../shareAutocompletionSpecialChars.feature | 3 +- .../shareFileWithMultipleUsers.feature | 5 +- .../sharePermissionsGroup.feature | 5 +- ...thMultipleUsersAdvancedPermissions.feature | 5 +- .../shareAdvancePermissionsGroup.feature | 5 +- .../shareFolderWithMultipleUsers.feature | 5 +- .../sharePermissionsGroup.feature | 5 +- .../shareWithGroups.feature | 20 +-- .../shareWithGroupsEdgeCases.feature | 13 +- .../shareWithGroups.feature | 8 +- .../shareWithUsers.feature | 29 +---- .../shareWithUsers.feature | 8 +- .../shareWithUsers.feature | 4 +- .../shareWithUsers.feature | 15 +-- .../shareWithUsers.feature | 70 +---------- .../sharePermissionsUsers.feature | 16 +-- .../publicLinkCreate.feature | 14 --- .../trashbinRestore.feature | 4 +- .../features/journeys/kindergarten.feature | 6 - .../features/smoke/denyShareAccess.feature | 3 - .../features/smoke/fullTextSearch.feature | 3 - .../features/smoke/groupActions.feature | 6 +- .../features/smoke/internalLink.feature | 9 +- .../e2e/cucumber/features/smoke/link.feature | 6 - .../cucumber/features/smoke/reshare.feature | 8 +- .../cucumber/features/smoke/search.feature | 10 -- .../e2e/cucumber/features/smoke/share.feature | 7 +- .../features/smoke/spaces/project.feature | 3 - .../e2e/cucumber/features/smoke/tags.feature | 3 - tests/e2e/cucumber/steps/api.ts | 11 +- tests/e2e/support/api/index.ts | 1 + tests/e2e/support/api/share/index.ts | 2 +- tests/e2e/support/api/share/share.ts | 43 ------- tests/e2e/support/api/userSettings/index.ts | 1 + .../e2e/support/api/userSettings/settings.ts | 25 ++++ 51 files changed, 88 insertions(+), 602 deletions(-) create mode 100644 tests/e2e/support/api/userSettings/index.ts create mode 100644 tests/e2e/support/api/userSettings/settings.ts diff --git a/.drone.star b/.drone.star index 3e18a9366cc..d093563422b 100644 --- a/.drone.star +++ b/.drone.star @@ -1256,6 +1256,7 @@ def ocisService(type, tika_enabled = False): "WEB_ASSET_PATH": "%s/dist" % dir["web"], "FRONTEND_SEARCH_MIN_LENGTH": "2", "FRONTEND_OCS_ENABLE_DENIALS": True, + "FRONTEND_AUTO_ACCEPT_SHARES": True, } if type == "app-provider": environment["GATEWAY_GRPC_ADDR"] = "0.0.0.0:9142" diff --git a/docker-compose.yml b/docker-compose.yml index d13918b6ab8..c6d46dfb829 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,7 @@ services: FRONTEND_OCS_ENABLE_DENIALS: "true" FRONTEND_FULL_TEXT_SEARCH_ENABLED: "true" FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST: '/etc/ocis/password-policy-banned-passwords.txt' + FRONTEND_AUTO_ACCEPT_SHARES: "true" # IDM IDM_CREATE_DEMO_USERS: "${DEMO_USERS:-true}" 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 cbf8b2deb36..9476cdbfd75 100644 --- a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md +++ b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md @@ -29,7 +29,7 @@ Other free text and markdown formatting can be used elsewhere in the document if - [webUIFavorites/unfavoriteFile.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L70) - [webUIFavorites/unfavoriteFile.feature:86](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L86) - [webUIFavorites/unfavoriteFile.feature:101](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L101) -- [webUIResharing1/reshareUsers.feature:177](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L177) +- [webUIResharing1/reshareUsers.feature:68](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L68) ### [when sharer renames the shared resource, sharee get the updated name](https://github.com/owncloud/ocis/issues/2256) - [webUIRenameFiles/renameFiles.feature:227](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L227) @@ -37,20 +37,20 @@ Other free text and markdown formatting can be used elsewhere in the document if ### [Cannot create users with special characters](https://github.com/owncloud/ocis/issues/1417) - [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:37](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L37) - [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:38](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L38) -- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:39](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L39) +- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:35](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L35) - [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L36) ### [Share additional info](https://github.com/owncloud/ocis/issues/1253) -- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:138](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L138) +- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:126](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L126) ### [Expiration date set is not implemented in user share](https://github.com/owncloud/ocis/issues/1250) -- [webUISharingInternalGroups/shareWithGroups.feature:244](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L244) +- [webUISharingInternalGroups/shareWithGroups.feature:228](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L228) ### [Different path for shares inside folder](https://github.com/owncloud/ocis/issues/1231) ### [Implement expiration date for shares](https://github.com/owncloud/ocis/issues/1250) -- [webUISharingInternalGroups/shareWithGroups.feature:222](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L222) +- [webUISharingInternalGroups/shareWithGroups.feature:208](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L208) - [webUISharingExpirationDate/shareWithExpirationDate.feature:21](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingExpirationDate/shareWithExpirationDate.feature#L21) ### [Listing shares via ocs API does not show path for parent folders](https://github.com/owncloud/ocis/issues/1231) @@ -108,4 +108,4 @@ Other free text and markdown formatting can be used elsewhere in the document if - [webUIRenameFiles/renameFiles.feature:250](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L250) ### [PROPFIND to sub-folder of a shared resources with same name gives 404](https://github.com/owncloud/ocis/issues/3859) -- [webUISharingAcceptShares/acceptShares.feature:240](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L240) +- [webUISharingAcceptShares/acceptShares.feature:163](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L163) diff --git a/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature b/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature index cbe7a529369..96d11ae02cc 100644 --- a/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature +++ b/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature @@ -206,16 +206,13 @@ Feature: deleting files and folders @issue-5435 Scenario: Delete a file and folder from shared with me page - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And user "Brian" has been created with default attributes and without skeleton files in the server + Given user "Brian" has been created with default attributes and without skeleton files in the server And user "Brian" has created folder "simple-folder" in the server And user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" in the server And user "Alice" has logged in using the webUI And the user has browsed to the shared-with-me page - When the user accepts share "simple-folder" offered by user "Brian Murphy" using the webUI - When the user accepts share "lorem.txt" offered by user "Brian Murphy" using the webUI When the user unshares folder "simple-folder" using the webUI And the user unshares file "lorem.txt" using the webUI Then as "Alice" folder "simple-folder" should not exist in the server diff --git a/tests/acceptance/features/webUIFilesActionMenu/versions.feature b/tests/acceptance/features/webUIFilesActionMenu/versions.feature index cbbcae76a94..2d5c3f972ba 100644 --- a/tests/acceptance/features/webUIFilesActionMenu/versions.feature +++ b/tests/acceptance/features/webUIFilesActionMenu/versions.feature @@ -72,13 +72,11 @@ Feature: Versions of a file @issue-ocis-2319 @skipOnOCIS Scenario: change the file content of a received shared file - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And user "Brian" has been created with default attributes and without skeleton files in the server And user "Brian" has created folder "simple-folder" in the server And user "Brian" has uploaded file with content "a text file" to "simple-folder/lorem.txt" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user has opened folder "Shares" And the user has opened folder "simple-folder" diff --git a/tests/acceptance/features/webUIFilesCopy/copy.feature b/tests/acceptance/features/webUIFilesCopy/copy.feature index 7d21e476b47..79b7698cda6 100644 --- a/tests/acceptance/features/webUIFilesCopy/copy.feature +++ b/tests/acceptance/features/webUIFilesCopy/copy.feature @@ -4,8 +4,7 @@ Feature: copy files and folders So that I can work safely on a copy without changing the original Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And user "Alice" has been created with default attributes and without skeleton files in the server @smokeTest @ocisSmokeTest @skipOnIphoneResolution @@ -91,7 +90,6 @@ Feature: copy files and folders And user "Brian" has been created with default attributes and without skeleton files in the server And user "Brian" has created folder "simple-folder" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" with "read" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI When the user tries to copy file "lorem.txt" into folder "Shares/simple-folder" using the webUI Then as "Alice" file "Shares/simple-folder/lorem.txt" should not exist in the server @@ -103,7 +101,6 @@ Feature: copy files and folders And user "Brian" has been created with default attributes and without skeleton files in the server And user "Brian" has created folder "simple-folder" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" with "read" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI When the user tries to copy folder "simple-empty-folder" into folder "Shares/simple-folder" using the webUI Then as "Alice" file "Shares/simple-folder/simple-empty-folder" should not exist in the server diff --git a/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature b/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature index 903d253f8c5..03f537220d7 100644 --- a/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature +++ b/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature @@ -104,12 +104,10 @@ Feature: move files @issue-ocis-873 @issue-6896 @skipOnOCIS Scenario: sharee moves a file shared by sharer into another folder - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And user "Brian" has been created with default attributes and without skeleton files in the server And user "Alice" has uploaded file with content "test content" to "simple-folder/testFile.txt" in the server And user "Alice" has shared folder "/simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has logged in using the webUI And user "Brian" has created folder "/Shares/testFolder" in the server And the user has opened folder "Shares" diff --git a/tests/acceptance/features/webUIOperationsWithFolderShares/accessToSharesFolder.feature b/tests/acceptance/features/webUIOperationsWithFolderShares/accessToSharesFolder.feature index d969c0e0ae5..7e204ec1141 100644 --- a/tests/acceptance/features/webUIOperationsWithFolderShares/accessToSharesFolder.feature +++ b/tests/acceptance/features/webUIOperationsWithFolderShares/accessToSharesFolder.feature @@ -5,8 +5,7 @@ Feature: Upload into a folder Shares The folder "Shares" in ownCloud10 is a folder in which you can download or save files Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And user "Alice" has been created with default attributes and without skeleton files in the server And user "Brian" has been created with default attributes and without skeleton files in the server @@ -21,7 +20,6 @@ Feature: Upload into a folder Shares Scenario: the Shares folder exists after accepting the first shared file Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server When user "Alice" logs in using the webUI Then folder "Shares" should be listed on the webUI @@ -29,7 +27,6 @@ Feature: Upload into a folder Shares Scenario: upload of a file into a folder Shares in oc10 Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user has opened folder "Shares" When the user uploads file "new-lorem.txt" using the webUI @@ -39,7 +36,6 @@ Feature: Upload into a folder Shares Scenario: upload of a folder into a folder Shares in oc 10 Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user has opened folder "Shares" When the user uploads folder "PARENT" using the webUI @@ -51,7 +47,6 @@ Feature: Upload into a folder Shares Given user "Brian" has been created with default attributes and without skeleton files in the server And user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user has opened folder "Shares" When the user creates a folder with the name "New folder" using the webUI @@ -61,7 +56,6 @@ Feature: Upload into a folder Shares Scenario: move a file or a folder into a folder Shares in oc10 Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" with "read" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Alice" has created folder "NewFolder" in the server And user "Alice" has logged in using the webUI When the user moves folder "NewFolder" into folder "Shares" using the webUI @@ -71,7 +65,6 @@ Feature: Upload into a folder Shares Scenario: the user can delete files that they wrote into the folder Shares Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And user "Alice" has created folder "Shares/NewFolder" in the server And user "Alice" has uploaded file with content "some data" to "Shares/textfile.txt" in the server diff --git a/tests/acceptance/features/webUIPreview/mediaPreview.feature b/tests/acceptance/features/webUIPreview/mediaPreview.feature index bbb7110b218..e4f03fe65ac 100644 --- a/tests/acceptance/features/webUIPreview/mediaPreview.feature +++ b/tests/acceptance/features/webUIPreview/mediaPreview.feature @@ -151,11 +151,9 @@ Feature: display image in preview app on the webUI Scenario: Open jpeg file with preview app in shared-with-me page - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And user "Brian" has been created with default attributes and without skeleton files in the server + Given user "Brian" has been created with default attributes and without skeleton files in the server And user "Brian" has uploaded file "testavatar.jpeg" to "testavatar.jpeg" in the server And user "Brian" has shared file "testavatar.jpeg" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "testavatar.jpeg" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user browses to the shared-with-me page When the user views the file "testavatar.jpeg" in the preview app by clicking on the file name using the webUI diff --git a/tests/acceptance/features/webUIResharing1/reshareUsers.feature b/tests/acceptance/features/webUIResharing1/reshareUsers.feature index 5021045405b..488f1381f44 100644 --- a/tests/acceptance/features/webUIResharing1/reshareUsers.feature +++ b/tests/acceptance/features/webUIResharing1/reshareUsers.feature @@ -5,8 +5,7 @@ Feature: Resharing shared files with different permissions So that I can control the access on those files/folders by other collaborators Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -14,99 +13,13 @@ Feature: Resharing shared files with different permissions | Carol | And user "Brian" has created folder "simple-folder" in the server - # this scenario is skipped on ocis because it opens share folder which in not possible in OCIS - # but it works for OC10 see issue https://github.com/owncloud/web/issues/6896 for more detail - @skipOnOCIS - Scenario: share a folder with another user with share permissions and reshare without share permissions to different user, and check if user is displayed for original sharer - Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Alice" has logged in using the webUI - And the user opens folder "Shares" using the webUI - When the user shares folder "simple-folder" with user "Carol King" as "Custom permissions" with permissions "," using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server - And the user re-logs in as "Brian" using the webUI - Then user "Carol King" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI - And no custom permissions should be set for collaborator "Carol King" for folder "simple-folder" on the webUI - And user "Alice Hansen" should be listed as "Can view" in the collaborators list for folder "simple-folder" on the webUI - And user "Alice" should have received a share with these details in the server: - | field | value | - | uid_owner | Brian | - | share_with | Alice | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | read, share | - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Carol | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | read | - - # this scenario is skipped on ocis because it opens share folder which in not possible in OCIS - # but it works for OC10 see issue https://github.com/owncloud/web/issues/6896 for more detail - @skipOnOCIS - Scenario: share a folder with another user with share permissions and reshare without share permissions to different user, and check if user is displayed for the receiver - Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Alice" has logged in using the webUI - And the user opens folder "Shares" using the webUI - When the user shares folder "simple-folder" with user "Carol King" as "Viewer" with permissions "," using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Carol | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | read, share | - - @skipOnOCIS - Scenario: share a folder without share permissions and check if another user can reshare - Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - When user "Alice" logs in using the webUI - And the user opens folder "Shares" using the webUI - Then the user should not be able to share resource "simple-folder" using the webUI - - @skipOnOCIS - Scenario: share a file without share permissions and check if another user can reshare - Given user "Brian" has created file "lorem.txt" in the server - And user "Brian" has shared file "lorem.txt" with user "Alice" with "read" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server - When user "Alice" logs in using the webUI - And the user opens folder "Shares" using the webUI - Then the user should not be able to share resource "lorem.txt" using the webUI - - @skipOnOCIS - Scenario: share a received folder without share permissions and check if another user can reshare - Given user "Brian" has shared folder "simple-folder" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Alice" has shared folder "/Shares/simple-folder" with user "Carol" with "read" permissions in the server - And user "Carol" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server - When user "Carol" logs in using the webUI - And the user opens folder "Shares" using the webUI - Then the user should not be able to share resource "simple-folder" using the webUI - - @skipOnOCIS - Scenario: share a received file without share permissions and check if another user can reshare - Given user "Brian" has created file "lorem.txt" in the server - And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server - And user "Alice" has shared folder "/Shares/lorem.txt" with user "Carol" with "read" permissions in the server - And user "Carol" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server - When user "Carol" logs in using the webUI - And the user opens folder "Shares" using the webUI - Then the user should not be able to share resource "lorem.txt" using the webUI @skipOnOCIS Scenario: User is allowed to reshare a file/folder with the equivalent received permissions, and collaborators should not be listed for the receiver Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share, delete" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user opens folder "Shares" using the webUI When the user shares folder "simple-folder" with user "Carol King" as "Custom permissions" with permissions "share, delete" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server And the user re-logs in as "Carol" using the webUI And the user opens folder "Shares" using the webUI And the collaborators list for folder "simple-folder" should be empty @@ -123,11 +36,9 @@ Feature: Resharing shared files with different permissions @skipOnOCIS Scenario: User is allowed to reshare a file/folder with the lesser permissions, and check if it is listed for original owner Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share, delete" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user opens folder "Shares" using the webUI When the user shares folder "simple-folder" with user "Carol King" as "Custom permissions" with permissions "delete" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server And the user re-logs in as "Brian" using the webUI Then user "Alice Hansen" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI And custom permissions "share, delete" should be set for user "Alice Hansen" for folder "simple-folder" on the webUI @@ -141,35 +52,15 @@ Feature: Resharing shared files with different permissions | item_type | folder | | permissions | delete, read | - @skipOnOCIS - Scenario: Reshare a file and folder from shared with me page - Given user "Brian" has created file "lorem.txt" in the server - And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Brian" has shared file "lorem.txt" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server - And user "Alice" has logged in using the webUI - And the user has browsed to the shared-with-me page - When the user shares folder "simple-folder" with user "Carol King" as "Editor" using the webUI - And the user shares file "lorem.txt" with user "Carol King" as "Editor" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" 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 as "Carol" folder "/Shares/simple-folder" should exist in the server - And as "Carol" file "/Shares/lorem.txt" should exist in the server - Scenario: Reshare a file and folder from shared with others page Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Brian" has logged in using the webUI And the user has browsed to the shared-with-others page When the user shares folder "simple-folder" with user "Carol King" as "Editor" using the webUI And the user shares file "lorem.txt" with user "Carol King" as "Editor" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Brian" using the sharing API in the server - And user "Carol" accepts the share "Shares/lorem.txt" offered by user "Brian" using the sharing API in the server Then as "Carol" folder "/Shares/simple-folder" should exist in the server And as "Carol" file "/Shares/lorem.txt" should exist in the server @@ -177,17 +68,13 @@ Feature: Resharing shared files with different permissions Scenario: Reshare a file and folder from favorites page Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has shared file "lorem.txt" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Alice" has favorited element "/Shares/simple-folder" in the server And user "Alice" has favorited element "/Shares/lorem.txt" in the server And user "Alice" has logged in using the webUI When the user browses to the favorites page using the webUI And the user shares folder "Shares/simple-folder" with user "Carol King" as "Editor" using the webUI And the user shares file "Shares/lorem.txt" with user "Carol King" as "Editor" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" 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 as "Carol" folder "/Shares/simple-folder" should exist in the server And as "Carol" file "/Shares/lorem.txt" should exist in the server @@ -195,9 +82,7 @@ Feature: Resharing shared files with different permissions Scenario: Resource owner sees resharer in collaborators list Given user "Brian" has created file "lorem.txt" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has shared folder "/Shares/simple-folder" with user "Carol" in the server - And user "Carol" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server When user "Brian" has logged in using the webUI And the user opens the share dialog for folder "simple-folder" using the webUI Then user "Alice Hansen" should be listed as "Can edit" in the collaborators list on the webUI diff --git a/tests/acceptance/features/webUIResharing2/reshareUsers.feature b/tests/acceptance/features/webUIResharing2/reshareUsers.feature index d1a553fbbd5..7b93b86ba31 100644 --- a/tests/acceptance/features/webUIResharing2/reshareUsers.feature +++ b/tests/acceptance/features/webUIResharing2/reshareUsers.feature @@ -5,8 +5,7 @@ Feature: Resharing shared files with different permissions So that I can control the access on those files/folders by other collaborators Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -17,9 +16,7 @@ Feature: Resharing shared files with different permissions @issue-ocis-1922 Scenario: Reshare a folder without share permissions using API and check if it is listed on the collaborators list for original owner Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has shared folder "Shares/simple-folder" with user "Carol" with "read" permissions in the server - And user "Carol" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI Then user "Carol King" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI @@ -30,37 +27,20 @@ Feature: Resharing shared files with different permissions @skipOnOCIS Scenario: Reshare a folder without share permissions using API and check if it is listed on the collaborators list for resharer Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Alice" has shared folder "Shares/simple-folder" with user "Carol" with "read" permissions in the server - And user "Carol" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Alice" has logged in using the webUI And the user opens folder "Shares" using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI Then user "Carol King" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI And no custom permissions should be set for collaborator "Carol King" for folder "simple-folder" on the webUI - # this scenario is skipped on ocis because it opens share folder which in not possible in OCIS - # but it works for OC10 see issue https://github.com/owncloud/web/issues/6896 for more detail - @skipOnOCIS - Scenario: Reshare a folder without share permissions using API and check if the receiver can reshare - Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Alice" has shared folder "/Shares/simple-folder" with user "Carol" with "read" permissions in the server - And user "Carol" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server - When user "Carol" logs in using the webUI - And the user opens folder "Shares" using the webUI - Then the user should not be able to share folder "simple-folder" using the webUI - # this scenario is skipped on ocis because it opens share folder which in not possible in OCIS # but it works for OC10 see issue https://github.com/owncloud/web/issues/6896 for more detail @skipOnOCIS Scenario Outline: share a received folder with another user with same permissions(including share permissions) and check if the user is displayed in collaborators list for resharer Given user "Brian" has shared folder "simple-folder" with user "Alice" with "" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user opens folder "Shares" using the webUI When the user shares folder "simple-folder" with user "Carol King" as "" with permissions "" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server Then user "Carol King" should be listed as "" in the collaborators list 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 "Carol" should have received a share with these details in the server: @@ -83,11 +63,9 @@ Feature: Resharing shared files with different permissions @skipOnOCIS Scenario Outline: share a received folder with another user with same permissions(including share permissions) and check if the user is displayed in collaborators list for original owner Given user "Brian" has shared folder "simple-folder" with user "Alice" with "" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI And the user opens folder "Shares" using the webUI When the user shares folder "simple-folder" with user "Carol King" as "" with permissions "" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server And the user re-logs in as "Brian" using the webUI Then user "Carol King" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI diff --git a/tests/acceptance/features/webUIRestrictSharing/disableSharing.feature b/tests/acceptance/features/webUIRestrictSharing/disableSharing.feature index cfbad8f9d32..218a3ada7eb 100644 --- a/tests/acceptance/features/webUIRestrictSharing/disableSharing.feature +++ b/tests/acceptance/features/webUIRestrictSharing/disableSharing.feature @@ -5,8 +5,7 @@ Feature: disable sharing So that users cannot share files Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And user "Alice" has been created with default attributes and without skeleton files in the server And user "Alice" has created folder "simple-folder" in the server And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server @@ -32,9 +31,7 @@ Feature: disable sharing Scenario: Check file presence in shared-with-me page when sharing is disabled Given user "Brian" has been created with default attributes and without skeleton files in the server And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And the setting "shareapi_enabled" of app "core" has been set to "no" in the server When user "Brian" logs in using the webUI And the user opens folder "Shares" using the webUI diff --git a/tests/acceptance/features/webUIRestrictSharing/restrictReSharing.feature b/tests/acceptance/features/webUIRestrictSharing/restrictReSharing.feature index b54d40c3ce9..8821d7b23f0 100644 --- a/tests/acceptance/features/webUIRestrictSharing/restrictReSharing.feature +++ b/tests/acceptance/features/webUIRestrictSharing/restrictReSharing.feature @@ -6,8 +6,7 @@ Feature: restrict resharing I want to be able to forbid a user that received a share from me to share it further Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -25,7 +24,6 @@ Feature: restrict resharing And user "Brian" has created folder "simple-folder" in the server And user "Brian" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server When user "Alice" logs in using the webUI And the user browses to the files page And the user opens folder "Shares" using the webUI @@ -40,8 +38,6 @@ Feature: restrict resharing Given the setting "shareapi_allow_resharing" of app "core" has been set to "no" in the server And user "Carol" has uploaded file "lorem.txt" to "lorem.txt" in the server And user "Carol" has shared file "lorem.txt" with group "grp1" in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Carol" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Carol" in the server When user "Alice" logs in using the webUI And the user opens folder "Shares" using the webUI Then the user should not be able to share file "lorem.txt" using the webUI diff --git a/tests/acceptance/features/webUIRestrictSharing/restrictSharing.feature b/tests/acceptance/features/webUIRestrictSharing/restrictSharing.feature index 9398b67963e..40b8c6eb037 100644 --- a/tests/acceptance/features/webUIRestrictSharing/restrictSharing.feature +++ b/tests/acceptance/features/webUIRestrictSharing/restrictSharing.feature @@ -5,8 +5,7 @@ Feature: restrict Sharing So that users can only share files with specific users and groups Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -47,7 +46,6 @@ Feature: restrict Sharing Scenario: Do not restrict users to only share with groups they are member of Given the setting "shareapi_only_share_with_membership_groups" of app "core" has been set to "no" in the server When the user shares folder "simple-folder" with group "grp2" as "Viewer" using the webUI - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Brian" using the sharing API in the server Then as "Carol" folder "/Shares/simple-folder" should exist in the server @smokeTest diff --git a/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature b/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature index 06ba2cb8724..b77c4621f5d 100644 --- a/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature +++ b/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature @@ -4,8 +4,7 @@ Feature: accept/decline shares coming from internal users So that I can keep my file system clean Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -35,7 +34,6 @@ Feature: accept/decline shares coming from internal users And user "Alice" has created folder "/simple-folder" in the server And user "Brian" has been added to group "grp1" in the server And user "Alice" has shared folder "/simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And the user has browsed to the personal page And the user opens folder "Shares" using the webUI When the user shares folder "simple-folder" with group "grp1" as "Viewer" using the webUI @@ -55,8 +53,6 @@ Feature: accept/decline shares coming from internal users And user "Brian" has been added to group "grp1" in the server And user "Alice" has shared folder "/simple-folder" with user "Brian" in the server And user "Alice" has shared file "/testimage.jpg" with group "grp1" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server - And user "Brian" has accepted the share "Shares/testimage.jpg" offered by user "Alice" in the server And the user has browsed to the personal page When the user opens folder "Shares" using the webUI And the user deletes folder "simple-folder" using the webUI @@ -86,7 +82,7 @@ Feature: accept/decline shares coming from internal users And user "Alice" has uploaded file with content "test" to "toshare.txt" in the server And user "Alice" has shared file "toshare.txt" with user "Brian" in the server When the user browses to the shared-with-me page - Then file "toshare.txt" shared by "Alice Hansen" should be in "Pending" state on the webUI + Then file "toshare.txt" shared by "Alice Hansen" should be in "Accepted" state on the webUI When the user browses to the files page Then file "toshare.txt" should not be listed on the webUI And folder "Shares" should not be listed on the webUI @@ -99,8 +95,8 @@ Feature: accept/decline shares coming from internal users And user "Carol" has shared file "lorem.txt" with user "Brian" in the server And user "Alice" has shared file "lorem.txt" with user "Brian" in the server When the user browses to the shared-with-me page - Then file "lorem.txt" shared by "Alice Hansen" should be in "Pending" state on the webUI - And file "lorem.txt" shared by "Carol King" should be in "Pending" state on the webUI + Then file "lorem (1).txt" shared by "Alice Hansen" should be in "Accepted" state on the webUI + And file "lorem.txt" shared by "Carol King" should be in "Accepted" state on the webUI @ocisSmokeTest Scenario: decline an offered (pending) share @@ -114,62 +110,11 @@ Feature: accept/decline shares coming from internal users And the user declines share "toshare.txt" offered by user "Alice Hansen" using the webUI And the user browses to the shared-with-me page in declined shares view Then file "toshare.txt" shared by "Alice Hansen" should be in "Declined" state on the webUI - And file "anotherfile.txt" shared by "Alice Hansen" should be in "Pending" state on the webUI + And file "anotherfile.txt" shared by "Alice Hansen" should be in "Accepted" state on the webUI When the user browses to the files page Then file "toshare.txt" should not be listed on the webUI And file "anotherfile.txt" should not be listed on the webUI - @ocisSmokeTest @skipOnOCIS - Scenario: accept an offered (pending) share - Given user "Alice" has created file "toshare.txt" in the server - And user "Alice" has created file "anotherfile.txt" in the server - And user "Alice" has uploaded file with content "test" to "toshare.txt" in the server - And user "Alice" has uploaded file with content "test" to "anotherfile.txt" in the server - And user "Alice" has shared file "toshare.txt" with user "Brian" in the server - And user "Alice" has shared file "anotherfile.txt" with user "Brian" in the server - And the user has browsed to the shared-with-me page - When the user accepts share "toshare.txt" offered by user "Alice Hansen" using the webUI - Then file "toshare.txt" shared by "Alice Hansen" should be in "Accepted" state on the webUI - And file "anotherfile.txt" shared by "Alice Hansen" should be in "Pending" state on the webUI - When the user browses to the files page - And the user opens folder "Shares" using the webUI - Then file "toshare.txt" should be listed on the webUI - And file "anotherfile.txt" should not be listed on the webUI - - @skipOnOCIS - Scenario: accept a previously declined share - Given user "Alice" has created file "lorem.txt" in the server - And user "Alice" has uploaded file "testavatar.jpg" to "testimage.jpg" in the server - And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Alice" has shared file "testimage.jpg" with user "Brian" in the server - And user "Brian" has declined the share "Shares/lorem.txt" offered by user "Alice" in the server - When the user browses to the shared-with-me page in declined shares view - And the user accepts share "lorem.txt" offered by user "Alice Hansen" using the webUI - When the user browses to the shared-with-me page in accepted shares view - Then file "lorem.txt" shared by "Alice Hansen" should be in "Accepted" state on the webUI - And file "testimage.jpg" shared by "Alice Hansen" should be in "Pending" state on the webUI - When the user browses to the files page - And the user opens folder "Shares" using the webUI - Then file "lorem.txt" should be listed on the webUI - And file "testimage.jpg" should not be listed on the webUI - - @issue-4102 @issue-5531 @issue-6896 @skipOnOCIS - Scenario: delete an accepted share - Given user "Alice" has created file "lorem.txt" in the server - And user "Alice" has uploaded file "testavatar.jpg" to "testimage.jpg" in the server - And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Alice" has shared file "testimage.jpg" with user "Brian" in the server - And the user has browsed to the shared-with-me page - When the user accepts share "lorem.txt" offered by user "Alice Hansen" using the webUI - And the user browses to the files page - And the user opens folder "Shares" using the webUI - And the user deletes file "lorem.txt" using the webUI - Then file "lorem.txt" should not be listed on the webUI - And file "testimage.jpg" should not be listed on the webUI - When the user browses to the shared-with-me page in declined shares view - Then file "lorem.txt" shared by "Alice Hansen" should be in "Declined" state on the webUI - And file "testimage.jpg" shared by "Alice Hansen" should be in "Pending" state on the webUI - @issue-3101 @issue-4102 Scenario: Decline multiple accepted shares at once from shared with me page Given user "Alice" has created file "lorem.txt" in the server @@ -178,9 +123,6 @@ Feature: accept/decline shares coming from internal users And user "Alice" has shared folder "simple-folder" with user "Brian" in the server And user "Alice" has shared file "lorem.txt" with user "Brian" in the server And user "Alice" has shared file "data.zip" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/data.zip" offered by user "Alice" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server When the user browses to the shared-with-me page in accepted shares view And the user batch declines these shares using the webUI | name | @@ -196,29 +138,12 @@ Feature: accept/decline shares coming from internal users Scenario: shared file status is changed to declined when user deletes the file Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server And the user has reloaded the current page of the webUI And the user opens folder "Shares" using the webUI When the user deletes file "lorem.txt" using the webUI And the user browses to the shared-with-me page in declined shares view Then file "lorem.txt" shared by "Alice Hansen" should be in "Declined" state on the webUI - @ocis-issue-714 @issue-5532 @skipOnOCIS - Scenario: the deleted shared file is restored back to the personal file list when accepted from the shared with me file list - Given user "Alice" has created file "lorem.txt" in the server - And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server - And the following files have been deleted by user "Brian" in the server - | name | - | Shares/lorem.txt | - When the user browses to the shared-with-me page in declined shares view - And the user accepts share "lorem.txt" offered by user "Alice Hansen" using the webUI - And the user browses to the shared-with-me page in accepted shares view - Then file "lorem.txt" shared by "Alice Hansen" should be in "Accepted" state on the webUI - When the user browses to the files page - And the user opens folder "Shares" using the webUI - Then file "lorem.txt" should be listed on the webUI - @skipOnOCIS Scenario: receive shares with same name from different users, accept one by one Given user "Carol" has been created with default attributes and without skeleton files in the server @@ -229,9 +154,7 @@ Feature: accept/decline shares coming from internal users And user "Alice" has created folder "/simple-folder/from_Alice" in the server And user "Alice" has shared folder "/simple-folder" with user "Brian" in the server And the user has browsed to the shared-with-me page - When the user accepts share "simple-folder" offered by user "Alice Hansen" using the webUI Then folder "simple-folder" shared by "Alice Hansen" should be in "Accepted" state on the webUI - When the user accepts share "simple-folder" offered by user "Carol King" using the webUI Then folder "simple-folder (2)" shared by "Carol King" should be in "Accepted" state on the webUI And as "Brian" folder "from_Alice" should exist inside folder "/Shares/simple-folder" in the server And as "Brian" folder "from_Carol" should exist inside folder "/Shares/simple-folder (2)" in the server @@ -246,25 +169,7 @@ Feature: accept/decline shares coming from internal users And user "Alice" has created folder "/simple-folder/from_Alice" in the server And user "Alice" has shared folder "/simple-folder" with user "Brian" in the server And the user has browsed to the shared-with-me page - When the user accepts share "simple-folder" offered by user "Alice Hansen" using the webUI Then folder "simple-folder" shared by "Alice Hansen" should be in "Accepted" state on the webUI - When the user accepts share "simple-folder" offered by user "Carol King" using the webUI Then folder "simple-folder" shared by "Carol King" should be in "Accepted" state on the webUI And as "Brian" folder "from_Alice" should exist inside folder "/Shares/simple-folder" in the server And as "Brian" folder "from_Carol" should exist inside folder "/Shares/simple-folder" in the server - - @issue-ocis-1950 @skipOnOCIS - Scenario: accept a share that you received as user and as group member - Given these groups have been created in the server: - | groupname | - | grp1 | - And user "Alice" has created folder "/simple-folder" in the server - And user "Brian" has been added to group "grp1" in the server - And user "Alice" has shared folder "/simple-folder" with user "Brian" in the server - And user "Alice" has shared folder "/simple-folder" with group "grp1" in the server - And the user has browsed to the shared-with-me page - When the user accepts share "simple-folder" offered by user "Alice Hansen" using the webUI - Then folder "simple-folder" shared by "Alice Hansen" should be in "Accepted" state on the webUI - When the user browses to the files page - And the user opens folder "Shares" using the webUI - Then folder "simple-folder" should be listed on the webUI diff --git a/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature b/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature index ed02642d91c..7efefd0e5d1 100644 --- a/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature +++ b/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletion.feature @@ -8,8 +8,7 @@ Feature: Autocompletion of share-with names So that I can efficiently share my files with other users or groups Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server # Users that are in the special known users already And these users have been created with default attributes and without skeleton files in the server but not initialized: | username | diff --git a/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature b/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature index 1a5a74c1635..95209c37b82 100644 --- a/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature +++ b/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature @@ -5,8 +5,7 @@ Feature: Autocompletion of share-with names So that I can efficiently share my files with other users or groups Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server but not initialized: | username | | regularuser | diff --git a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature index 840bb3ce3b4..25f0cbfab34 100644 --- a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature @@ -4,8 +4,7 @@ Feature: Sharing files with multiple internal users with different permissions So that I can control the access on those files by other collaborators Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -22,8 +21,6 @@ Feature: Sharing files with multiple internal users with different permissions | Brian Murphy | user | | Carol King | user | 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 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 diff --git a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature index a479254fdb6..c8bea4ea8c6 100644 --- a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature @@ -5,8 +5,7 @@ Feature: Sharing files with internal groups with permissions So that I can control the access on those files by other users on the group Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -29,8 +28,6 @@ Feature: Sharing files with internal groups with permissions | grp1 | group | | grp2 | group | 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 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 diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature index 865f28c9135..97b9dc8747d 100644 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature +++ b/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature @@ -4,8 +4,7 @@ Feature: Sharing folders with multiple internal users using advanced permissions So that I can control the access on those folders by other collaborators Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -22,8 +21,6 @@ Feature: Sharing folders with multiple internal users using advanced permissions | Brian Murphy | user | | Carol King | user | 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 "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 diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature index 71c74264620..6a07fd46393 100644 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature @@ -5,8 +5,7 @@ Feature: Sharing folders with internal groups with role as advanced permissions So that I can control the access on those folders by other users on the group Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -29,8 +28,6 @@ Feature: Sharing folders with internal groups with role as advanced permissions | grp1 | group | | grp2 | group | 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 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 diff --git a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature index 72527c46ad0..93bca4dcaa4 100644 --- a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature @@ -5,8 +5,7 @@ Feature: Sharing folders with multiple internal users with different permissions So that I can control the access on those folders by other collaborators Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -23,8 +22,6 @@ Feature: Sharing folders with multiple internal users with different permissions | Brian Murphy | user | | Carol King | user | 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 "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 diff --git a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature index 30d28058d2a..15b6c54d990 100644 --- a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature @@ -5,8 +5,7 @@ Feature: Sharing folders with internal groups with different roles and permissio So that I can control the access on those folders by other users on the group Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -29,8 +28,6 @@ Feature: Sharing folders with internal groups with different roles and permissio | grp1 | group | | grp2 | group | 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 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 diff --git a/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature b/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature index 749f4da2ec5..4d651ac3f77 100644 --- a/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature +++ b/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature @@ -4,8 +4,7 @@ Feature: Sharing files and folders with internal groups So that those groups can access the files and folders Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -34,10 +33,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user shares folder "simple-folder" with group "grp1" as "" using the webUI And the user shares file "testimage.jpg" with group "grp1" as "" using the webUI - And user "Alice" accepts the share "Shares/simple-folder" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/simple-folder" offered by user "Carol" using the sharing API in the server - And user "Alice" accepts the share "Shares/testimage.jpg" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/testimage.jpg" offered by user "Carol" using the sharing API in the server Then group "grp1" 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 file "testimage.jpg" on the webUI And user "Alice" should have received a share with these details in the server: @@ -79,8 +74,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user renames file "lorem.txt" to "new-lorem.txt" using the webUI And the user shares file "new-lorem.txt" with group "grp1" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/new-lorem.txt" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/new-lorem.txt" offered by user "Carol" using the sharing API in the server And the user re-logs in as "Alice" using the webUI Then as "Alice" the content of "/Shares/new-lorem.txt" in the server should not be the same as the content of local file "new-lorem.txt" # overwrite the received shared file @@ -104,8 +97,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user renames folder "simple-folder" to "new-simple-folder" using the webUI And the user shares folder "new-simple-folder" with group "grp1" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/new-simple-folder" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/new-simple-folder" offered by user "Carol" using the sharing API in the server And the user re-logs in as "Alice" using the webUI And the user opens folder "Shares" using the webUI And the user opens folder "new-simple-folder" using the webUI @@ -141,8 +132,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user renames folder "simple-folder" to "new-simple-folder" using the webUI And the user shares folder "new-simple-folder" with group "grp1" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/new-simple-folder" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/new-simple-folder" offered by user "Carol" using the sharing API in the server # unshare the received shared folder and check it is gone And the user re-logs in as "Alice" using the webUI And the user opens folder "Shares" using the webUI @@ -167,7 +156,6 @@ Feature: Sharing files and folders with internal groups Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has logged in using the webUI And user "Alice" has shared file "lorem.txt" with group "grp1" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server When the user opens the share dialog for file "lorem.txt" using the webUI Then group "grp1" should be listed as "Can edit" in the collaborators list on the webUI When the user deletes "grp1" as collaborator for the current file using the webUI @@ -183,9 +171,7 @@ Feature: Sharing files and folders with internal groups And user "Carol" has been added to group "grp2" in the server And user "Alice" has logged in using the webUI And user "Alice" has shared file "lorem.txt" with group "grp1" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server And user "Alice" has shared file "lorem.txt" with group "grp2" in the server - And user "Carol" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server When the user opens the share dialog for file "lorem.txt" using the webUI Then group "grp1" should be listed as "Can edit" in the collaborators list on the webUI And group "grp2" should be listed as "Can edit" in the collaborators list on the webUI @@ -226,8 +212,6 @@ Feature: Sharing files and folders with internal groups | shareTypeString | group | | shareWith | grp1 | | expireDate | +14 | - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Carol" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Carol" in the server And user "Carol" has logged in using the webUI When the user edits the collaborator expiry date of "grp1" of file "lorem.txt" to "+7" days using the webUI Then user "Alice" should have received a share with target "Shares/lorem.txt" and expiration date in 7 days in the server @@ -247,8 +231,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has created file "lorem.txt" in the server And user "Carol" has logged in using the webUI When the user shares folder "lorem.txt" with group "grp1" as "Viewer" using the webUI - And user "Alice" accepts the share "Shares/lorem.txt" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/lorem.txt" offered by user "Carol" using the sharing API in the server Then user "Carol" should have a share with these details in the server: | field | value | | path | /lorem.txt | diff --git a/tests/acceptance/features/webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature b/tests/acceptance/features/webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature index 612a8dbe377..6f33d5e20c0 100644 --- a/tests/acceptance/features/webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature +++ b/tests/acceptance/features/webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature @@ -5,8 +5,7 @@ Feature: Sharing files and folders with internal groups So that those groups can access the files and folders Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -24,8 +23,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user shares folder "simple-folder" with group "" as "Viewer" using the webUI And the user shares file "testimage.jpg" with group "" as "Viewer" using the webUI - And user "Alice" accepts the share "Shares/simple-folder" offered by user "Carol" using the sharing API in the server - And user "Alice" accepts the share "Shares/testimage.jpg" offered by user "Carol" using the sharing API in the server Then group "" should be listed as "Can view" in the collaborators list for folder "simple-folder" on the webUI And group "" should be listed as "Can view" in the collaborators list for file "testimage.jpg" on the webUI Examples: @@ -43,8 +40,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user shares file "randomfile.txt" with user "Alice Hansen" as "Editor" using the webUI And the user shares file "randomfile.txt" with group "Alice" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server And the user types "Alice" in the share-with-field Then "group" "Alice" should not be listed in the autocomplete list on the webUI And the content of file "Shares/randomfile.txt" for user "Alice" should be "Carol file" in the server @@ -60,8 +55,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user shares file "randomfile.txt" with group "Alice" as "Editor" using the webUI And the user shares file "randomfile.txt" with user "Alice Hansen" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server And the user types "Alice" in the share-with-field Then "user" "Alice Hansen" should not be listed in the autocomplete list on the webUI And the content of file "Shares/randomfile.txt" for user "Brian" should be "Carol file" in the server @@ -77,8 +70,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user shares file "randomfile.txt" with user "Alice Hansen" as "Editor" using the webUI And the user shares file "randomfile.txt" with group "ALICE" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server And the user types "ALICE" in the share-with-field Then "group" "ALICE" should not be listed in the autocomplete list on the webUI And the content of file "Shares/randomfile.txt" for user "Brian" should be "Carol file" in the server @@ -94,8 +85,6 @@ Feature: Sharing files and folders with internal groups And user "Carol" has logged in using the webUI When the user shares file "randomfile.txt" with group "ALICE" as "Editor" using the webUI And the user shares file "randomfile.txt" with user "Alice Hansen" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server - And user "Brian" accepts the share "Shares/randomfile.txt" offered by user "Carol" using the sharing API in the server And the user types "Alice" in the share-with-field Then "user" "Alice Hansen" should not be listed in the autocomplete list on the webUI And the content of file "Shares/randomfile.txt" for user "Brian" should be "Carol file" in the server diff --git a/tests/acceptance/features/webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature b/tests/acceptance/features/webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature index b58d7a0d938..c1dadece853 100644 --- a/tests/acceptance/features/webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature +++ b/tests/acceptance/features/webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature @@ -5,8 +5,7 @@ Feature: Sharing files and folders with internal groups So that those groups can access the files and folders Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -23,7 +22,6 @@ Feature: Sharing files and folders with internal groups And user "Alice" has uploaded file with content "test" to "/simple-folder/lorem.txt" in the server And user "Alice" has uploaded file with content "test" to "/simple-folder/simple-empty-folder/inside.txt" in the server And user "Alice" has shared folder "simple-folder" with group "grp1" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server When user "Alice" has logged in using the webUI Then the following resources should have share indicators on the webUI | fileName | expectedIndicators | @@ -46,7 +44,6 @@ Feature: Sharing files and folders with internal groups And user "Alice" has created folder "simple-folder/simple-empty-folder" in the server And user "Alice" has created file "simple-folder/lorem.txt" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has shared folder "Shares/simple-folder" with group "grp1" in the server When user "Brian" has logged in using the webUI And the user opens folder "Shares" using the webUI @@ -67,7 +64,6 @@ Feature: Sharing files and folders with internal groups And user "Alice" has created folder "simple-folder/simple-empty-folder" in the server And user "Alice" has created file "simple-folder/lorem.txt" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has shared folder "/Shares/simple-folder/simple-empty-folder" with group "grp1" in the server When user "Brian" has logged in using the webUI And the user opens folder "Shares" using the webUI @@ -88,7 +84,6 @@ Feature: Sharing files and folders with internal groups And user "Alice" has created folder "simple-folder/simple-empty-folder" in the server And user "Alice" has created file "simple-folder/lorem.txt" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server When user "Brian" has logged in using the webUI And the user opens folder "Shares" using the webUI Then the following resources should have share indicators on the webUI @@ -107,7 +102,6 @@ Feature: Sharing files and folders with internal groups And user "Brian" has created file "simple-folder/lorem.txt" in the server And user "Alice" has created file "textfile0.txt" in the server And user "Alice" has shared file "/textfile0.txt" with group "grp1" in the server - And user "Brian" has accepted the share "Shares/textfile0.txt" offered by user "Alice" in the server When user "Brian" has logged in using the webUI Then the following resources should not have share indicators on the webUI | simple-folder | diff --git a/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature b/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature index 4177833c9d5..83849dfdf2c 100644 --- a/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature +++ b/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature @@ -4,8 +4,7 @@ Feature: Sharing files and folders with internal users So that those users can access the files and folders Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -20,9 +19,7 @@ Feature: Sharing files and folders with internal users And user "Brian" has created file "simple-folder/lorem.txt" in the server And user "Brian" has logged in using the webUI When the user shares folder "simple-folder" with user "Alice Hansen" as "" using the webUI - And user "Alice" accepts the share "Shares/simple-folder" offered by user "Brian" using the sharing API in the server And the user shares file "testimage.jpg" with user "Alice Hansen" as "" using the webUI - And user "Alice" accepts the share "Shares/testimage.jpg" offered by user "Brian" using the sharing API in the server Then user "Alice Hansen" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And user "Alice Hansen" should be listed as "" in the collaborators list for file "testimage.jpg" on the webUI And user "Alice" should have received a share with these details in the server: @@ -57,7 +54,6 @@ Feature: Sharing files and folders with internal users And user "Brian" has logged in using the webUI And user "Brian" has renamed file "lorem.txt" to "new-lorem.txt" in the server And user "Brian" has shared file "new-lorem.txt" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/new-lorem.txt" offered by user "Brian" in the server When the user re-logs in as "Alice" using the webUI And the user opens folder "Shares" using the webUI Then as "Alice" the content of "Shares/new-lorem.txt" in the server should not be the same as the content of local file "new-lorem.txt" @@ -77,7 +73,6 @@ Feature: Sharing files and folders with internal users And user "Brian" has created file "simple-folder/data.zip" in the server And user "Brian" has logged in using the webUI When the user shares folder "simple-folder" with user "Alice Hansen" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/simple-folder" offered by user "Brian" using the sharing API in the server And the user re-logs in as "Alice" using the webUI And the user browses to the folder "Shares" on the files page And the user reloads the current page of the webUI @@ -108,7 +103,6 @@ Feature: Sharing files and folders with internal users And user "Brian" has logged in using the webUI When the user renames folder "simple-folder" to "new-simple-folder" using the webUI And the user shares folder "new-simple-folder" with user "Alice Hansen" as "Editor" using the webUI - And user "Alice" accepts the share "Shares/new-simple-folder" offered by user "Brian" using the sharing API in the server # unshare the received shared folder and check it is gone And the user re-logs in as "Alice" using the webUI And the user browses to the folder "Shares" on the files page @@ -125,7 +119,6 @@ Feature: Sharing files and folders with internal users Given user "Brian" has created file "simple-folder/lorem.txt" in the server And user "Brian" has logged in using the webUI And user "Brian" has shared folder "simple-folder" with user "Alice" with "create, read, share" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server When the user re-logs in as "Alice" using the webUI And the user opens folder "Shares" using the webUI And the user opens folder "simple-folder" using the webUI @@ -137,9 +130,7 @@ Feature: Sharing files and folders with internal users And user "Alice" has created file "lorem.txt" in the server And user "Alice" has logged in using the webUI And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server And user "Alice" has shared file "lorem.txt" with user "Carol" in the server - And user "Carol" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server When the user opens the share dialog for file "lorem.txt" using the webUI Then user "Brian Murphy" should be listed as "Can edit" in the collaborators list on the webUI And user "Carol King" should be listed as "Can edit" in the collaborators list on the webUI @@ -198,7 +189,6 @@ Feature: Sharing files and folders with internal users And user "Carol" has been created with default attributes and without skeleton files in the server And user "Alice" has uploaded file with content "test" to "/simple-folder/lorem.txt" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has shared folder "Shares/simple-folder" with user "Carol" in the server And user "Brian" has logged in using the webUI And the user has opened folder "Shares" @@ -216,9 +206,7 @@ Feature: Sharing files and folders with internal users And user "Brian" has created file "sample,1.txt" in the server And user "Brian" has logged in using the webUI When the user shares folder "Sample,Folder,With,Comma" with user "Alice Hansen" as "" using the webUI - And user "Alice" accepts the share "Shares/Sample,Folder,With,Comma" offered by user "Brian" using the sharing API in the server And the user shares file "sample,1.txt" with user "Alice Hansen" as "" using the webUI - And user "Alice" accepts the share "Shares/sample,1.txt" offered by user "Brian" using the sharing API in the server Then user "Alice Hansen" should be listed as "" in the collaborators list for folder "Sample,Folder,With,Comma" on the webUI And user "Alice Hansen" should be listed as "" in the collaborators list for file "sample,1.txt" on the webUI And user "Alice" should have received a share with these details in the server: @@ -261,7 +249,6 @@ Feature: Sharing files and folders with internal users Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has logged in using the webUI And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server When the user opens the share dialog for file "lorem.txt" using the webUI Then user "Brian Murphy" should be listed as "Can edit" in the collaborators list on the webUI And as "Brian" file "Shares/lorem.txt" should exist in the server @@ -269,17 +256,3 @@ Feature: Sharing files and folders with internal users Then user "Brian Murphy" should not be listed in the collaborators list on the webUI And file "lorem.txt" should not be listed in shared-with-others page on the webUI And as "Brian" file "Shares/lorem.txt" should not exist in the server - - # This test is skipped in OCIS as it's starting to fail frequently - # and it won't be that much relevant after sharing jail is implemented - # see issue https://github.com/owncloud/web/issues/6419 and - # https://github.com/owncloud/web/issues/6321#issuecomment-1057813530 for more context - @skipOnOCIS - Scenario: Sharing the share_folder to user is not possible - Given user "Carol" has been created with default attributes and without skeleton files in the server - And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for file "Shares" using the webUI - Then the share permission denied message should be displayed in the sharing dialog on the webUI - diff --git a/tests/acceptance/features/webUISharingInternalUsersBlacklisted/shareWithUsers.feature b/tests/acceptance/features/webUISharingInternalUsersBlacklisted/shareWithUsers.feature index 9d129836785..d0587b9bd9b 100644 --- a/tests/acceptance/features/webUISharingInternalUsersBlacklisted/shareWithUsers.feature +++ b/tests/acceptance/features/webUISharingInternalUsersBlacklisted/shareWithUsers.feature @@ -5,8 +5,7 @@ Feature: Sharing files and folders with internal users So that those users can access the files and folders Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -20,9 +19,7 @@ Feature: Sharing files and folders with internal users And group "grp1" has been created in the server And user "Alice" has been added to group "grp1" in the server And user "Carol" has shared file "testimage.jpg" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/testimage.jpg" offered by user "Carol" in the server And user "Carol" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Carol" in the server And the administrator has enabled exclude groups from sharing in the server And the administrator has excluded group "grp1" from sharing in the server When user "Alice" logs in using the webUI @@ -40,7 +37,6 @@ Feature: Sharing files and folders with internal users And user "Carol" has created folder "common" in the server And user "Carol" has moved file "testimage.jpg" to "common/testimage.jpg" in the server And user "Carol" has shared folder "common" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/common" offered by user "Carol" in the server And the administrator has enabled exclude groups from sharing in the server And the administrator has excluded group "grp1" from sharing in the server And user "Alice" has logged in using the webUI @@ -58,7 +54,6 @@ Feature: Sharing files and folders with internal users And user "Carol" has created folder "common" in the server And user "Carol" has created folder "common/inside-common" in the server And user "Carol" has shared folder "common" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/common" offered by user "Carol" in the server And the administrator has enabled exclude groups from sharing in the server And the administrator has excluded group "grp1" from sharing in the server And user "Alice" has logged in using the webUI @@ -85,7 +80,6 @@ Feature: Sharing files and folders with internal users And user "Carol" has been created with default attributes and without skeleton files in the server And user "Brian" has uploaded file "testavatar.jpg" to "testimage.jpg" in the server And user "Brian" has shared file "/testimage.jpg" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/testimage.jpg" offered by user "Brian" in the server And the administrator has enabled exclude groups from sharing in the server And the administrator has excluded group "grp1" from sharing in the server And user "Alice" has logged in using the webUI diff --git a/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature b/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature index 814d6931654..2475bc4708a 100644 --- a/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature +++ b/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature @@ -4,8 +4,7 @@ Feature: Shares collaborator list So that I can know the collaborators of a shared resource Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -16,7 +15,6 @@ Feature: Shares collaborator list Scenario Outline: change the collaborators of a file & folder Given user "Brian" has logged in using the webUI And user "Brian" has shared folder "/simple-folder" with user "Alice" with "" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server When the user changes the collaborator role of "Alice Hansen" for folder "simple-folder" to "" with permissions "" using the webUI # check role without reloading the collaborators panel, see issue #1786 Then user "Alice Hansen" should be listed as "" in the collaborators list on the webUI diff --git a/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature b/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature index d98eb066138..bb65b93b576 100644 --- a/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature +++ b/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature @@ -4,8 +4,7 @@ Feature: Shares in share-with pages So that I can know what is shared with me and by me Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -18,9 +17,7 @@ Feature: Shares in share-with pages And user "Brian" has renamed folder "simple-folder" to "new-simple-folder" in the server And user "Brian" has renamed file "lorem.txt" to "ipsum.txt" in the server And user "Brian" has shared file "ipsum.txt" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/ipsum.txt" offered by user "Brian" in the server And user "Brian" has shared folder "new-simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/new-simple-folder" offered by user "Brian" in the server And user "Alice" has logged in using the webUI When the user browses to the shared-with-me page Then file "ipsum.txt" should be listed on the webUI @@ -32,11 +29,8 @@ Feature: Shares in share-with pages And user "Brian" has created file "lorem.txt" in the server And user "Brian" has logged in using the webUI And user "Brian" has shared file "lorem.txt" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has shared folder "simple-folder" with user "Carol" in the server - And user "Carol" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server When the user browses to the shared-with-others page Then the following resources should have the following collaborators | fileName | expectedCollaborators | @@ -68,7 +62,6 @@ Feature: Shares in share-with pages Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has created file "data.zip" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has logged in using the webUI When the user browses to the shared-with-me page Then folder "simple-folder" should be listed on the webUI @@ -78,7 +71,6 @@ Feature: Shares in share-with pages Scenario: clicking a folder on shared-with-me page jumps to the main file list inside the folder Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Alice" has created file "simple-folder/collaborate-on-this.txt" in the server And user "Brian" has logged in using the webUI When the user browses to the shared-with-me page @@ -89,7 +81,6 @@ Feature: Shares in share-with pages Scenario: unsharing an entry on the shared-with-me page unshares from self Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has logged in using the webUI When the user browses to the shared-with-me page And the user unshares folder "simple-folder" using the webUI @@ -100,7 +91,6 @@ Feature: Shares in share-with pages Scenario: unsharing an entry on the shared-with-me page unshares from self Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has logged in using the webUI When the user browses to the shared-with-me page And the user unshares folder "simple-folder" using the webUI @@ -113,9 +103,7 @@ Feature: Shares in share-with pages Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has created file "lorem.txt" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Alice" has shared file "lorem.txt" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Alice" in the server And user "Brian" has logged in using the webUI And the user browses to the shared-with-me page in accepted shares view When the user batch unshares these files using the webUI @@ -152,7 +140,6 @@ Feature: Shares in share-with pages Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has logged in using the webUI When the user shares resource "simple-folder" with user "Brian Murphy" using the quick action on the webUI - And user "Brian" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server Then user "Brian Murphy" should be listed as "Can view" 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 | diff --git a/tests/acceptance/features/webUISharingInternalUsersSharingIndicator/shareWithUsers.feature b/tests/acceptance/features/webUISharingInternalUsersSharingIndicator/shareWithUsers.feature index aa0d1edbaa6..1abeffff880 100644 --- a/tests/acceptance/features/webUISharingInternalUsersSharingIndicator/shareWithUsers.feature +++ b/tests/acceptance/features/webUISharingInternalUsersSharingIndicator/shareWithUsers.feature @@ -5,8 +5,7 @@ Feature: Sharing files and folders with internal users So that those users can access the files and folders Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -60,7 +59,6 @@ Feature: Sharing files and folders with internal users And user "Alice" has created folder "/simple-folder/simple-empty-folder/new-folder" in the server And user "Alice" has uploaded file with content "test" to "/simple-folder/simple-empty-folder/lorem.txt" in the server And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server When user "Alice" has logged in using the webUI And the user opens the share dialog for folder "simple-folder" using the webUI Then the following resources should have share indicators on the webUI @@ -76,71 +74,6 @@ Feature: Sharing files and folders with internal users | new-folder | user-indirect | | lorem.txt | user-indirect | - # this scenario is skipped on ocis because it opens share folder which in not possible in OCIS - # but it works for OC10 see issue https://github.com/owncloud/web/issues/6896 for more detail - @skipOnOCIS @issue-4167 @issue-6894 - Scenario: sharing indicator of items inside a re-shared folder - Given user "Carol" has been created with default attributes and without skeleton files in the server - And user "Alice" has created folder "/simple-folder/simple-empty-folder" in the server - And user "Alice" has created file "/simple-folder/lorem.txt" in the server - And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server - And user "Brian" has shared folder "Shares/simple-folder" with user "Carol" in the server - When user "Brian" has logged in using the webUI - And the user opens folder "Shares" using the webUI - And the user opens the sharing sidebar for folder "simple-folder" - Then the following resources should have share indicators on the webUI - | fileName | expectedIndicators | - | simple-folder | user-direct | - When the user opens folder "simple-folder" using the webUI - Then the following resources should have share indicators on the webUI - | fileName | expectedIndicators | - | simple-empty-folder | user-indirect | - | lorem.txt | user-indirect | - - # this scenario is skipped on ocis because it opens share folder which in not possible in OCIS - # but it works for OC10 see issue https://github.com/owncloud/web/issues/6896 for more detail - @skipOnOCIS @issue-4167 - Scenario: sharing indicator of items inside a re-shared subfolder - Given user "Carol" has been created with default attributes and without skeleton files in the server - And user "Alice" has created folder "/simple-folder/simple-empty-folder" in the server - And user "Alice" has created file "/simple-folder/lorem.txt" in the server - And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server - And user "Brian" has shared folder "Shares/simple-folder/simple-empty-folder" with user "Carol" in the server - And user "Brian" has logged in using the webUI - When the user opens folder "Shares" using the webUI - And the user opens the sharing sidebar for folder "simple-folder" - Then the following resources should have share indicators on the webUI - | fileName | expectedIndicators | - | simple-folder | user-indirect | - When the user opens folder "simple-folder" using the webUI - And the user opens the sharing sidebar for file "lorem.txt" - Then the following resources should have share indicators on the webUI - | fileName | expectedIndicators | - | simple-empty-folder | user-direct | - | lorem.txt | user-indirect | - - # this scenario is skipped on ocis because it opens share folder which in not possible in OCIS - # but it works for OC10 see issue https://github.com/owncloud/web/issues/6896 for more detail - @skipOnOCIS @issue-2060 @issue-4167 @ocis-issue-891 - Scenario: sharing indicator of items inside an incoming shared folder - Given user "Alice" has created folder "/simple-folder/simple-empty-folder" in the server - And user "Alice" has created file "/simple-folder/lorem.txt" in the server - And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server - When user "Brian" has logged in using the webUI - And the user opens folder "Shares" using the webUI - And the user opens the sharing sidebar for folder "simple-folder" - Then the following resources should have share indicators on the webUI - | fileName | expectedIndicators | - | simple-folder | user-indirect | - When the user opens folder "simple-folder" using the webUI - Then the following resources should have share indicators on the webUI - | fileName | expectedIndicators | - | simple-empty-folder | user-indirect | - | lorem.txt | user-indirect | - @issue-2060 @issue-4172 Scenario: no sharing indicator of items inside a not shared folder Given user "Brian" has created folder "simple-folder" in the server @@ -148,7 +81,6 @@ Feature: Sharing files and folders with internal users And user "Brian" has created file "/simple-folder/lorem.txt" in the server And user "Alice" has created file "textfile0.txt" in the server And user "Alice" has shared file "/textfile0.txt" with user "Brian" in the server - And user "Brian" has accepted the share "Shares/textfile0.txt" offered by user "Alice" in the server When user "Brian" has logged in using the webUI Then the following resources should not have share indicators on the webUI | simple-folder | diff --git a/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature b/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature index 9c1699e038c..7bc494c8071 100644 --- a/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature +++ b/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature @@ -4,8 +4,7 @@ Feature: Sharing files and folders with internal users with different permission So that I can control the access on those files/folders by other collaborators Background: - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And these users have been created with default attributes and without skeleton files in the server: | username | | Alice | @@ -20,7 +19,6 @@ Feature: Sharing files and folders with internal users with different permission @issue-ocis-2260 Scenario: Change permissions of the previously shared folder to read, share Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has logged in using the webUI Then no custom permissions should be set for collaborator "Alice Hansen" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "Alice Hansen" for folder "simple-folder" to "share" using the webUI @@ -35,7 +33,6 @@ Feature: Sharing files and folders with internal users with different permission @issue-1853 @issue-ocis-2260 Scenario: Change permissions of the previously shared folder to all permissions Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share, create, delete" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has logged in using the webUI Then custom permissions "share, create, delete" should be set for user "Alice Hansen" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "Alice Hansen" for folder "simple-folder" to "create, delete, share" using the webUI @@ -51,7 +48,6 @@ Feature: Sharing files and folders with internal users with different permission @issue-1853 @issue-ocis-2260 Scenario: Change permissions of the previously shared folder to update, delete Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share, create" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has logged in using the webUI Then custom permissions "share, create" should be set for user "Alice Hansen" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "Alice Hansen" for folder "simple-folder" to "delete, update" using the webUI @@ -67,7 +63,6 @@ Feature: Sharing files and folders with internal users with different permission @issue-ocis-2260 Scenario: Change permissions of the previously shared folder to read, create, share Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, delete" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has logged in using the webUI Then custom permissions "delete" should be set for user "Alice Hansen" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "Alice Hansen" for folder "simple-folder" to "create, share" using the webUI @@ -84,7 +79,6 @@ Feature: Sharing files and folders with internal users with different permission Scenario Outline: share a folder with another internal user assigning a role and the permissions Given user "Brian" has logged in using the webUI When the user shares folder "simple-folder" with user "Alice Hansen" as "" with permissions "" using the webUI - And user "Alice" accepts the share "Shares/simple-folder" offered by user "Brian" using the sharing API in the server Then user "Alice Hansen" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And custom permissions "" should be set for user "Alice Hansen" for folder "simple-folder" on the webUI And user "Alice" should have received a share with these details in the server: @@ -105,7 +99,6 @@ Feature: Sharing files and folders with internal users with different permission @issue-ocis-2260 Scenario Outline: Change permissions of the previously shared file Given user "Brian" has shared file "lorem.txt" with user "Alice" with "" permissions in the server - And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Brian" in the server And user "Brian" has logged in using the webUI Then custom permission "" should be set for user "Alice Hansen" for file "lorem.txt" on the webUI When the user sets custom permission for current role of collaborator "Alice Hansen" for file "lorem.txt" to "share" using the webUI @@ -125,7 +118,6 @@ Feature: Sharing files and folders with internal users with different permission Scenario: Delete all custom permissions of the previously shared folder Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read, update" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has logged in using the webUI When the user disables all the custom permissions of collaborator "Alice Hansen" for folder "simple-folder" using the webUI Then no custom permissions should be set for collaborator "Alice Hansen" for folder "simple-folder" on the webUI @@ -141,7 +133,6 @@ Feature: Sharing files and folders with internal users with different permission Scenario Outline: share a file with another internal user assigning a role and the permissions Given user "Brian" has logged in using the webUI When the user shares file "lorem.txt" with user "Alice Hansen" as "" with permissions "" using the webUI - And user "Alice" accepts the share "Shares/lorem.txt" offered by user "Brian" using the sharing API in the server Then user "Alice Hansen" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI And custom permissions "" should be set for user "Alice Hansen" for file "lorem.txt" on the webUI And user "Alice" should have received a share with these details in the server: @@ -160,7 +151,6 @@ Feature: Sharing files and folders with internal users with different permission @issue-ocis-2260 Scenario: Share a folder without share permissions using API and check if it is listed on the collaborators list for original owner Given user "Brian" has shared folder "simple-folder" with user "Alice" with "read" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Brian" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI Then user "Alice Hansen" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI @@ -170,9 +160,7 @@ Feature: Sharing files and folders with internal users with different permission Scenario: Resource owner upgrades share permissions of a re-share Given user "Carol" has been created with default attributes and without skeleton files in the server And user "Brian" has shared folder "simple-folder" with user "Alice" with "read, share, delete" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has shared folder "/Shares/simple-folder" with user "Carol" with "read, delete" permissions in the server - And user "Carol" has accepted the share "Shares/simple-folder" offered by user "Alice" in the server And user "Brian" has logged in using the webUI When the user sets custom permission for current role of collaborator "Carol King" for folder "simple-folder" to "delete, update" using the webUI Then custom permissions "delete, update" should be set for user "Carol King" for folder "simple-folder" on the webUI @@ -190,13 +178,11 @@ Feature: Sharing files and folders with internal users with different permission Scenario: User is allowed to update permissions of a reshared sub-folder within the permissions that the user has received Given user "Carol" has been created with default attributes and without skeleton files in the server And user "Brian" has shared folder "simple-folder" with user "Alice" with "all" permissions in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server And user "Alice" has shared folder "/Shares/simple-folder" with user "Carol" with "share, delete" permissions in the server And user "Alice" has logged in using the webUI When the user opens folder "Shares" using the webUI And the user opens folder "simple-folder" using the webUI And the user shares folder "simple-empty-folder" with user "Carol King" as "Custom permissions" with permissions "share, delete, create, update" using the webUI - And user "Carol" accepts the share "Shares/simple-empty-folder" offered by user "Alice" using the sharing API in the server Then user "Carol" should have received a share with these details in the server: | field | value | | uid_owner | Alice | diff --git a/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature b/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature index 167022319f2..1aaa3ce3511 100644 --- a/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature +++ b/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature @@ -179,17 +179,3 @@ Feature: Create public link shares """ The link has been copied to your clipboard. """ - - # This test is skipped in OCIS as the sharing jail has been implemented - @skipOnOCIS - Scenario: Sharing the share_folder as public link is not possible - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server - And user "Brian" has been created with default attributes and without skeleton files in the server - And user "Brian" has created folder "simple-folder" in the server - And user "Carol" has been created with default attributes and without skeleton files in the server - And user "Brian" has shared folder "simple-folder" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/simple-folder" offered by user "Brian" in the server - And user "Alice" has logged in using the webUI - And the user opens the link share dialog for folder "Shares" using the webUI - Then the link share permission denied message should be displayed in the sharing dialog on the webUI diff --git a/tests/acceptance/features/webUITrashbinRestore/trashbinRestore.feature b/tests/acceptance/features/webUITrashbinRestore/trashbinRestore.feature index 4aefd7ce6b0..d066dd75ec6 100644 --- a/tests/acceptance/features/webUITrashbinRestore/trashbinRestore.feature +++ b/tests/acceptance/features/webUITrashbinRestore/trashbinRestore.feature @@ -174,13 +174,11 @@ Feature: Restore deleted files/folders @issue-ocis-1124 Scenario: delete and restore a file inside a received shared folder - Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server - And the administrator has set the default folder for received shares to "Shares" in the server + Given the administrator has set the default folder for received shares to "Shares" in the server And user "Carol" has been created with default attributes and without skeleton files in the server And user "Carol" has created folder "folder-to-share" in the server And user "Carol" has uploaded file with content "does-not-matter" to "folder-to-share/fileToShare.txt" in the server And user "Carol" has shared folder "folder-to-share" with user "Alice" in the server - And user "Alice" has accepted the share "Shares/folder-to-share" offered by user "Carol" in the server And the user has reloaded the current page of the webUI When the user opens folder "Shares" using the webUI And the user opens folder "folder-to-share" using the webUI diff --git a/tests/e2e/cucumber/features/journeys/kindergarten.feature b/tests/e2e/cucumber/features/journeys/kindergarten.feature index c776a16db08..5f15da7ca91 100644 --- a/tests/e2e/cucumber/features/journeys/kindergarten.feature +++ b/tests/e2e/cucumber/features/journeys/kindergarten.feature @@ -41,9 +41,6 @@ Feature: Kindergarten can use web to organize a day When "Brian" logs in And "Brian" opens the "files" app And "Brian" navigates to the shared with me page - And "Brian" accepts the following share - | name | - | meal plan | And "Brian" downloads the following resources using the sidebar panel | resource | from | type | | data.zip | meal plan | file | @@ -52,9 +49,6 @@ Feature: Kindergarten can use web to organize a day When "Carol" logs in And "Carol" opens the "files" app And "Carol" navigates to the shared with me page - And "Carol" accepts the following shares - | name | - | meal plan | And "Carol" downloads the following resources using the sidebar panel | resource | from | type | | data.zip | meal plan | file | diff --git a/tests/e2e/cucumber/features/smoke/denyShareAccess.feature b/tests/e2e/cucumber/features/smoke/denyShareAccess.feature index 7fe0dcfecc0..e0861f07e51 100644 --- a/tests/e2e/cucumber/features/smoke/denyShareAccess.feature +++ b/tests/e2e/cucumber/features/smoke/denyShareAccess.feature @@ -22,9 +22,6 @@ Feature: deny share access And "Brian" logs in And "Brian" opens the "files" app And "Brian" navigates to the shared with me page - And "Brian" accepts the following share - | name | - | folder_to_shared | And "Brian" opens folder "folder_to_shared" Then following resources should not be displayed in the files list for user "Brian" | resource | diff --git a/tests/e2e/cucumber/features/smoke/fullTextSearch.feature b/tests/e2e/cucumber/features/smoke/fullTextSearch.feature index 0ff3c757e32..d76de07b4bc 100644 --- a/tests/e2e/cucumber/features/smoke/fullTextSearch.feature +++ b/tests/e2e/cucumber/features/smoke/fullTextSearch.feature @@ -24,9 +24,6 @@ Feature: Search | fileToShare.txt | Brian | user | Can edit | And "Alice" logs out And "Brian" logs in - And "Brian" accepts the following share using API - | name | - | fileToShare.txt | And "Brian" creates the following folder in personal space using API | name | | testFolder | diff --git a/tests/e2e/cucumber/features/smoke/groupActions.feature b/tests/e2e/cucumber/features/smoke/groupActions.feature index 12b4f276576..da2ff3e717a 100644 --- a/tests/e2e/cucumber/features/smoke/groupActions.feature +++ b/tests/e2e/cucumber/features/smoke/groupActions.feature @@ -22,6 +22,10 @@ Feature: Group actions | Brian | sales | | Brian | finance | | Brian | security | + And "Brian" logs in + # disabling auto accepting to check accepting share + And "Brian" disables auto-accepting using API + And "Alice" logs in And "Alice" creates the following folders in personal space using API | name | @@ -53,11 +57,9 @@ Feature: Group actions | sharedFolder | finance | group | Can edit | | sharedFolder | security | group | Can edit | - When "Brian" logs in And "Brian" opens the "files" app And "Brian" navigates to the shared with me page - # multiple share accept And "Brian" accepts all pending shares using the batch actions And "Alice" logs out And "Brian" logs out diff --git a/tests/e2e/cucumber/features/smoke/internalLink.feature b/tests/e2e/cucumber/features/smoke/internalLink.feature index 9fb77faf2ce..700d808de43 100644 --- a/tests/e2e/cucumber/features/smoke/internalLink.feature +++ b/tests/e2e/cucumber/features/smoke/internalLink.feature @@ -17,10 +17,11 @@ Feature: internal link share When "Alice" edits the public link named "Link" of resource "myfolder" changing role to "Invited people" And "Brian" opens the public link "Link" And "Brian" logs in from the internal link - And "Brian" opens shared-with-me page from the internal link - And "Brian" accepts the following share - | name | - | myfolder | + + # comment out after fixing #9776 + # And "Brian" opens shared-with-me page from the internal link + And "Brian" opens the "files" app + And "Brian" navigates to the shared with me page And "Brian" uploads the following resource | resource | to | | simple.pdf | myfolder | diff --git a/tests/e2e/cucumber/features/smoke/link.feature b/tests/e2e/cucumber/features/smoke/link.feature index 96a3bc18187..8789152f555 100644 --- a/tests/e2e/cucumber/features/smoke/link.feature +++ b/tests/e2e/cucumber/features/smoke/link.feature @@ -98,12 +98,6 @@ Feature: link And "Alice" renames the most recently created public link of resource "testavatar.jpg" to "imageLink" And "Alice" logs out And "Brian" logs in - And "Brian" navigates to the shared with me page - And "Brian" accepts the following share - | name | - | folderPublic | - | simple.pdf | - | testavatar.jpg | When "Brian" opens the public link "folderLink" And "Brian" uploads the following resources | resource | diff --git a/tests/e2e/cucumber/features/smoke/reshare.feature b/tests/e2e/cucumber/features/smoke/reshare.feature index 4801c728969..eb04b7b5e31 100644 --- a/tests/e2e/cucumber/features/smoke/reshare.feature +++ b/tests/e2e/cucumber/features/smoke/reshare.feature @@ -20,11 +20,8 @@ Feature: reshare And "Alice" shares the following resource using API | resource | recipient | type | role | | folder_to_shared | Brian | user | Can edit | + And "Brian" logs in - And "Brian" accepts the following share using API - | name | - | folder_to_shared | - And "Brian" opens the "files" app And "Brian" navigates to the shared with me page And "Brian" reshares the following resource @@ -34,9 +31,6 @@ Feature: reshare And "Carol" logs in And "Carol" opens the "files" app And "Carol" navigates to the shared with me page - And "Carol" accepts the following share - | name | - | folder_to_shared | And "Carol" reshares the following resource | resource | recipient | type | role | resourceType | | folder_to_shared | Alice | user | Can view | folder | diff --git a/tests/e2e/cucumber/features/smoke/search.feature b/tests/e2e/cucumber/features/smoke/search.feature index ff55f815926..929fffe36f6 100644 --- a/tests/e2e/cucumber/features/smoke/search.feature +++ b/tests/e2e/cucumber/features/smoke/search.feature @@ -24,11 +24,6 @@ Feature: Search And "Brian" logs out When "Alice" logs in - And "Alice" navigates to the shared with me page - And "Alice" accepts the following share - | name | - | new_share_from_brian | - | new-lorem-big.txt | And "Alice" opens the "files" app And "Alice" creates the following resources | resource | type | @@ -130,11 +125,6 @@ Feature: Search # search re-shared resources When "Carol" logs in - And "Carol" navigates to the shared with me page - And "Carol" accepts the following share - | name | - | new_share_from_brian | - | new-lorem-big.txt | And "Carol" opens the "files" app And "Carol" creates the following resources | resource | type | diff --git a/tests/e2e/cucumber/features/smoke/share.feature b/tests/e2e/cucumber/features/smoke/share.feature index 4069d7e4e7a..570e9d1d173 100644 --- a/tests/e2e/cucumber/features/smoke/share.feature +++ b/tests/e2e/cucumber/features/smoke/share.feature @@ -5,6 +5,9 @@ Feature: share | id | | Alice | | Brian | + And "Brian" logs in + # disabling auto accepting to check accepting share + And "Brian" disables auto-accepting using API Scenario: folder Given "Alice" logs in @@ -23,7 +26,7 @@ Feature: share | folder_to_shared | Brian | user | Can edit | folder | | shared_folder | Brian | user | Can edit | folder | | folder_to_customShared | Brian | user | custom_permissions:read,create,delete | folder | - And "Brian" logs in + And "Brian" opens the "files" app And "Brian" navigates to the shared with me page And "Brian" accepts the following share @@ -93,7 +96,7 @@ Feature: share | testavatar.jpeg | Brian | user | Can view | file | | simple.pdf | Brian | user | custom_permissions:read,update,share | file | | sharedFile.txt | Brian | user | Can edit | file | - And "Brian" logs in + And "Brian" opens the "files" app And "Brian" navigates to the shared with me page Then "Brian" should not be able to open the file "shareToBrian.txt" diff --git a/tests/e2e/cucumber/features/smoke/spaces/project.feature b/tests/e2e/cucumber/features/smoke/spaces/project.feature index d5a68de60df..d7102bfb564 100644 --- a/tests/e2e/cucumber/features/smoke/spaces/project.feature +++ b/tests/e2e/cucumber/features/smoke/spaces/project.feature @@ -92,9 +92,6 @@ Feature: spaces.personal And "Brian" logs in And "Brian" opens the "files" app And "Brian" navigates to the shared with me page - And "Brian" accepts the following share - | name | - | folder_to_shared | And "Brian" renames the following resource | resource | as | | folder_to_shared/lorem.txt | lorem_new.txt | diff --git a/tests/e2e/cucumber/features/smoke/tags.feature b/tests/e2e/cucumber/features/smoke/tags.feature index 10e28ce2cab..801f15c3da7 100644 --- a/tests/e2e/cucumber/features/smoke/tags.feature +++ b/tests/e2e/cucumber/features/smoke/tags.feature @@ -72,9 +72,6 @@ Feature: Users can use web to organize tags And "Brian" logs in And "Brian" navigates to the shared with me page - And "Brian" accepts the following share - | name | - | folder_to_shared | Then the following resources should contain the following tags in the files list for user "Brian" | resource | tags | | folder_to_shared/lorem.txt | tag 1, tag 2 | diff --git a/tests/e2e/cucumber/steps/api.ts b/tests/e2e/cucumber/steps/api.ts index 780c07ac2b3..58575dba2c2 100644 --- a/tests/e2e/cucumber/steps/api.ts +++ b/tests/e2e/cucumber/steps/api.ts @@ -90,15 +90,10 @@ Given( ) Given( - '{string} accepts the following share(s) using API', - async function (this: World, stepUser: string, stepTable: DataTable): Promise { + '{string} disables auto-accepting using API', + async function (this: World, stepUser: string): Promise { const user = this.usersEnvironment.getUser({ key: stepUser }) - for (const info of stepTable.hashes()) { - await api.share.acceptShare({ - user, - path: info.name - }) - } + await api.settings.disableAutoAcceptShare({ user }) } ) diff --git a/tests/e2e/support/api/index.ts b/tests/e2e/support/api/index.ts index 21c87342d2a..f3c0c5a7336 100644 --- a/tests/e2e/support/api/index.ts +++ b/tests/e2e/support/api/index.ts @@ -4,3 +4,4 @@ export * as dav from './davSpaces' export * as share from './share' export * as keycloak from './keycloak' export * as provision from './provision' +export * as settings from './userSettings' diff --git a/tests/e2e/support/api/share/index.ts b/tests/e2e/support/api/share/index.ts index 74edf1687ba..8447644fe7c 100644 --- a/tests/e2e/support/api/share/index.ts +++ b/tests/e2e/support/api/share/index.ts @@ -1 +1 @@ -export { createShare, acceptShare } from './share' +export { createShare } from './share' diff --git a/tests/e2e/support/api/share/share.ts b/tests/e2e/support/api/share/share.ts index 8caea0abbb6..f61ae5bbbd9 100644 --- a/tests/e2e/support/api/share/share.ts +++ b/tests/e2e/support/api/share/share.ts @@ -1,6 +1,4 @@ import join from 'join-path' -import convert from 'xml-js' -import _ from 'lodash/object' import { checkResponseStatus, request } from '../http' import { User } from '../../types' @@ -54,44 +52,3 @@ export const createShare = async ({ }) checkResponseStatus(response, 'Failed while creating share') } - -export const acceptShare = async ({ user, path }: { user: User; path: string }): Promise => { - const params = new URLSearchParams({ - include_tags: 'false', - state: 'all', - shared_with_me: 'true' - }) - const shareId = await getShareId({ user, path, params: params.toString() }) - const response = await request({ - method: 'POST', - path: join('ocs', 'v2.php', 'apps', 'files_sharing', 'api', 'v1', 'shares', 'pending', shareId), - user: user - }) - checkResponseStatus(response, 'Failed while accepting share') -} - -const getShareId = async ({ - user, - path, - params = 'include_tags=false&state=all&shared_with_me=true' -}: { - user: User - path: string - params?: string -}): Promise => { - const response = await request({ - method: 'GET', - path: join('ocs', 'v2.php', 'apps', 'files_sharing', 'api', 'v1', 'shares', `?${params}`), - user: user - }) - checkResponseStatus(response, 'Failed while geting share id') - const fileData = JSON.parse(convert.xml2json(await response.text(), { compact: true })) - let elements = _.get(fileData, 'ocs.data.element') - elements = elements instanceof Array ? elements : [elements] - for (const element of elements) { - const elementPath = element.path._text.split('/').pop() - if (elementPath === path) { - return element.id._text - } - } -} diff --git a/tests/e2e/support/api/userSettings/index.ts b/tests/e2e/support/api/userSettings/index.ts new file mode 100644 index 00000000000..0b06c1c2578 --- /dev/null +++ b/tests/e2e/support/api/userSettings/index.ts @@ -0,0 +1 @@ +export { disableAutoAcceptShare } from './settings' diff --git a/tests/e2e/support/api/userSettings/settings.ts b/tests/e2e/support/api/userSettings/settings.ts new file mode 100644 index 00000000000..3724bbb0098 --- /dev/null +++ b/tests/e2e/support/api/userSettings/settings.ts @@ -0,0 +1,25 @@ +import join from 'join-path' + +import { checkResponseStatus, request } from '../http' +import { User } from '../../types' + +export const disableAutoAcceptShare = async ({ user }: { user: User }): Promise => { + const body = JSON.stringify({ + value: { + accountUuid: 'me', + bundleId: '2a506de7-99bd-4f0d-994e-c38e72c28fd9', + settingId: 'ec3ed4a3-3946-4efc-8f9f-76d38b12d3a9', + resource: { + type: 'TYPE_USER' + }, + boolValue: false + } + }) + const response = await request({ + method: 'POST', + path: join('api', 'v0', 'settings', 'values-save'), + body: body, + user: user + }) + checkResponseStatus(response, 'Failed while disabling auto-accept share') +}