diff --git a/.drone.star b/.drone.star index fd4daa08dbf..50b51c5c3e8 100644 --- a/.drone.star +++ b/.drone.star @@ -99,9 +99,6 @@ config = { "webUIPreview", "webUILogin", ], - "oCISSharingBasic": [ - "webUISharingAcceptShares", - ], "oCISFiles1": [ "webUICreateFilesFolders", "webUIDeleteFilesFolders", @@ -138,14 +135,6 @@ config = { ], "oCISSharingPerm1": [ "webUISharingPermissionsUsers", - "webUISharingFolderPermissionsGroups", - ], - "oCISSharingPerm2": [ - "webUISharingFilePermissionsGroups", - "webUISharingFilePermissionMultipleUsers", - "webUISharingFolderPermissionMultipleUsers", - "webUISharingFolderAdvancedPermissionMultipleUsers", - "webUISharingFolderAdvancedPermissionsGroups", ], "oCISSharingPublic1": [ "webUISharingPublicBasic", @@ -164,7 +153,6 @@ config = { "webUITrashbinDelete", "webUITrashbinFilesFolders", "webUITrashbinRestore", - "webUIUserJourney", ], }, "extraEnvironment": { @@ -197,12 +185,6 @@ basicTestSuites = [ "webUIRenameFolders", "webUISharingAcceptShares", "webUISharingAutocompletion", - "webUISharingFilePermissionMultipleUsers", - "webUISharingFilePermissionsGroups", - "webUISharingFolderAdvancedPermissionMultipleUsers", - "webUISharingFolderAdvancedPermissionsGroups", - "webUISharingFolderPermissionMultipleUsers", - "webUISharingFolderPermissionsGroups", "webUISharingInternalGroups", "webUISharingInternalGroupsEdgeCases", "webUISharingInternalGroupsSharingIndicator", @@ -220,10 +202,6 @@ basicTestSuites = [ "webUIUpload", ] -ocisSpecificTestSuites = [ - "webUIUserJourney", -] - # minio mc environment variables minio_mc_environment = { "CACHE_BUCKET": { @@ -272,8 +250,6 @@ def checkTestSuites(): if (test["type"] == FULL): expected += basicTestSuites - expected += ocisSpecificTestSuites - if (sorted(suites) != sorted(expected)): print("Error: Suites dont match " + testGroupName) print(Diff(sorted(suites), sorted(expected))) 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 5686ecb60da..2669428e6f4 100644 --- a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md +++ b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md @@ -17,14 +17,6 @@ Other free text and markdown formatting can be used elsewhere in the document if - [webUITrashbinRestore/trashbinRestore.feature:176](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUITrashbinRestore/trashbinRestore.feature#L176) -### [Saving public share is not possible](https://github.com/owncloud/web/issues/5321) - -- [webUISharingPublicManagement/shareByPublicLink.feature:24](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature#L24) - ### [empty subfolder inside a folder to be uploaded is not created on the server](https://github.com/owncloud/web/issues/6348) -- [webUIUpload/upload.feature:43](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/upload.feature#L43) - -### [PROPFIND to sub-folder of a shared resources with same name gives 404](https://github.com/owncloud/ocis/issues/3859) - -- [webUISharingAcceptShares/acceptShares.feature:73](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L73) +- [webUIUpload/upload.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/upload.feature#L36) diff --git a/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature b/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature index 8cdb27cffa3..f53d85b5ba9 100644 --- a/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature +++ b/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature @@ -6,38 +6,6 @@ Feature: deleting files and folders Background: Given user "Alice" has been created with default attributes and without skeleton files in the server - @smokeTest @ocisSmokeTest @disablePreviews - Scenario: Delete files & folders one by one and check its existence after page reload - Given user "Alice" has created folder "simple-empty-folder" in the server - And 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 created file "lorem-big.txt" in the server - And user "Alice" has created folder "strängé नेपाली folder" in the server - And user "Alice" has created file "strängé filename (duplicate #2 &).txt" in the server - And user "Alice" has created file "sample,1.txt" in the server - And user "Alice" has created folder "Sample,Folder,With,Comma" in the server - And user "Alice" has logged in using the webUI - When the user deletes the following elements using the webUI - | name | - | simple-folder | - | lorem.txt | - | strängé नेपाली folder | - | strängé filename (duplicate #2 &).txt | - | sample,1.txt | - | Sample,Folder,With,Comma | - Then as "Alice" folder "simple-folder" should not exist in the server - And as "Alice" file "lorem.txt" should not exist in the server - And as "Alice" folder "strängé नेपाली folder" should not exist in the server - And as "Alice" file "strängé filename (duplicate #2 &).txt" should not exist in the server - And as "Alice" file "sample,1.txt" should not exist in the server - And as "Alice" folder "Sample,Folder,With,Comma" should not exist in the server - And no message should be displayed on the webUI - And the deleted elements should not be listed on the webUI - But folder "simple-empty-folder" should be listed on the webUI - And file "lorem-big.txt" should be listed on the webUI - And file "strängé नेपाली folder" should not be listed on the webUI - But the deleted elements should not be listed on the webUI after a page reload - Scenario Outline: Delete a file with problematic characters Given user "Alice" has created file in the server @@ -54,61 +22,6 @@ Feature: deleting files and folders | "&and#hash" | - @ocis-reva-issue-106 @ocis-reve-issue-442 @skipOnOC10 @issue-4582 - Scenario: Delete all except for a few files at once - Given user "Alice" has uploaded file "data.zip" to "data.zip" in the server - And user "Alice" has created file "lorem.txt" in the server - And user "Alice" has created file "fileToDelete.txt" in the server - And user "Alice" has created folder "folderToDelete" in the server - And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has logged in using the webUI - When the user marks all files for batch action using the webUI - And the user unmarks these files for batch action using the webUI - | name | - | lorem.txt | - | simple-folder | - And the user batch deletes the marked files using the webUI - Then as "Alice" file "lorem.txt" should exist in the server - And as "Alice" folder "simple-folder" should exist in the server - And folder "simple-folder" should be listed on the webUI - And file "lorem.txt" should be listed on the webUI - But as "Alice" file "data.zip" should not exist in the server - And as "Alice" file "fileToDelete.txt" should not exist in the server - And as "Alice" folder "folderToDelete" should not exist in the server - And file "data.zip" should not be listed on the webUI - And the count of files and folders shown on the webUI should be 2 - And no message should be displayed on the webUI - - - Scenario: Delete the last file in a folder - Given user "Alice" has created file "zzzz-must-be-last-file-in-folder.txt" in the server - And user "Alice" has logged in using the webUI - When the user deletes file "zzzz-must-be-last-file-in-folder.txt" using the webUI - Then as "Alice" file "zzzz-must-be-last-file-in-folder.txt" should not exist in the server - And file "zzzz-must-be-last-file-in-folder.txt" should not be listed on the webUI - And no message should be displayed on the webUI - - - Scenario: delete a file on a public share - Given user "Alice" has created folder "simple-folder" in the server - And user "Alice" has created file "simple-folder/lorem.txt" in the server - And user "Alice" has created folder "simple-folder/simple-empty-folder" in the server - And user "Alice" has created folder "simple-folder/strängé filename (duplicate #2 &).txt" in the server - And user "Alice" has shared folder "simple-folder" with link with "read, update, create, delete" permissions in the server - When the public uses the webUI to access the last public link created by user "Alice" in a new session - And the user deletes the following elements using the webUI - | name | - | simple-empty-folder | - | lorem.txt | - | strängé filename (duplicate #2 &).txt | - Then as "Alice" file "simple-folder/lorem.txt" should not exist in the server - And as "Alice" folder "simple-folder/simple-empty-folder" should not exist in the server - And as "Alice" file "simple-folder/strängé filename (duplicate #2 &).txt" should not exist in the server - And the deleted elements should not be listed on the webUI - And no message should be displayed on the webUI - And the deleted elements should not be listed on the webUI after a page reload - - Scenario: delete a file on a public share with problematic characters Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has created folder "simple-folder" in the server @@ -142,61 +55,6 @@ Feature: deleting files and folders | question? | | &and#hash | - @issue-4582 - Scenario: Delete multiple files at once on a public share - Given user "Alice" has created folder "simple-folder" in the server - And user "Alice" has created file "simple-folder/data.zip" in the server - And user "Alice" has created file "simple-folder/lorem.txt" in the server - And user "Alice" has created file "simple-folder/simple-empty-folder" in the server - And user "Alice" has shared folder "simple-folder" with link with "read, update, create, delete" permissions in the server - When the public uses the webUI to access the last public link created by user "Alice" in a new session - And the user batch deletes these files using the webUI - | name | - | data.zip | - | lorem.txt | - | simple-empty-folder | - Then as "Alice" file "simple-folder/data.zip" should not exist in the server - And as "Alice" file "simple-folder/lorem.txt" should not exist in the server - And as "Alice" folder "simple-folder/simple-empty-folder" should not exist in the server - And the deleted elements should not be listed on the webUI - And the deleted elements should not be listed on the webUI after a page reload - - @issue-5435 - Scenario: Delete a file and folder from shared with me page - 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 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 - And as "Alice" file "lorem.txt" should not exist in the server - And no message should be displayed on the webUI - - - Scenario: Try to delete file and folder that used to exist but does not anymore - Given user "Alice" has created folder "simple-folder" in the server - And user "Alice" has created file "lorem.txt" in the server - # user logs in first and deletes the files/folders using the API requests (demanded by the scenario) - # so that the steps are organized as follows - And user "Alice" has logged in using the webUI - And the following files have been deleted by user "Alice" in the server - | name | - | lorem.txt | - | simple-folder | - When the user deletes file "lorem.txt" using the webUI - Then the "error" message with header 'Failed to delete "lorem.txt"' should be displayed on the webUI - When the user clears all error message from the webUI - And the user deletes folder "simple-folder" using the webUI - Then the "error" message with header 'Failed to delete "simple-folder"' should be displayed on the webUI - When the user reloads the current page of the webUI - Then file "lorem.txt" should not be listed on the webUI - And folder "simple-folder" should not be listed on the webUI - And as "Alice" file "lorem.txt" should not exist in the server - And as "Alice" folder "simple-folder" should not exist in the server Scenario: Delete folder with dot in the name diff --git a/tests/acceptance/features/webUIFilesCopy/copy.feature b/tests/acceptance/features/webUIFilesCopy/copy.feature index 0557a7059ba..2cf6fd970ba 100644 --- a/tests/acceptance/features/webUIFilesCopy/copy.feature +++ b/tests/acceptance/features/webUIFilesCopy/copy.feature @@ -7,52 +7,6 @@ Feature: copy files and folders 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 - Scenario: copy a file and a folder into a folder - Given user "Alice" has uploaded file "data.zip" to "data.zip" in the server - And user "Alice" has created folder "simple-empty-folder" in the server - And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has created folder "strängé नेपाली folder empty" in the server - And user "Alice" has logged in using the webUI - And the user reloads the current page of the webUI - When the user copies file "data.zip" into folder "simple-empty-folder" using the webUI - Then breadcrumb for folder "simple-empty-folder" should be displayed on the webUI - And file "data.zip" should be listed on the webUI - When the user browses to the files page - And the user copies folder "simple-folder" into folder "strängé नेपाली folder empty" using the webUI - Then breadcrumb for folder "strängé नेपाली folder empty" should be displayed on the webUI - And folder "simple-folder" should be listed on the webUI - - - Scenario: copy a file into a folder where a file with the same name already exists - Given user "Alice" has created file "strängé filename (duplicate #2 &).txt" in the server - And user "Alice" has created folder "strängé नेपाली folder" in the server - And user "Alice" has created file "strängé नेपाली folder/strängé filename (duplicate #2 &).txt" in the server - And user "Alice" has logged in using the webUI - And the user has browsed to the personal page - When the user tries to copy file "strängé filename (duplicate #2 &).txt" into folder "strängé नेपाली folder" using the webUI - Then the "modal error" message with header 'File with name "strängé filename (duplicate #2 &).txt" already exists.' should be displayed on the webUI - - @smokeTest @ocisSmokeTest @skipOnIphoneResolution - Scenario: Copy multiple files at once - Given user "Alice" has uploaded file "data.zip" to "data.zip" in the server - And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server - And user "Alice" has uploaded file "new-data.zip" to "testapp.zip" in the server - And user "Alice" has created folder "simple-empty-folder" in the server - And user "Alice" has logged in using the webUI - And the user has reloaded the current page of the webUI - When the user batch copies these files into folder "simple-empty-folder" using the webUI - | file_name | - | data.zip | - | lorem.txt | - | testapp.zip | - Then breadcrumb for folder "simple-empty-folder" should be displayed on the webUI - And the following files should be listed on the webUI - | file_name | - | data.zip | - | lorem.txt | - | testapp.zip | - Scenario Outline: copy a file into a folder (problematic characters) Given user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server @@ -83,24 +37,3 @@ Feature: copy files and folders And file "data.zip" should be listed on the webUI And as "Alice" file "simple-folder/simple-empty-folder/data.zip" should exist in the server And as "Alice" file "simple-folder/data.zip" should exist in the server - - - Scenario: copy a folder into the same folder - Given user "Alice" has created folder "simple-empty-folder" in the server - And user "Alice" has logged in using the webUI - When the user tries to copy folder "simple-empty-folder" into folder "simple-empty-folder" using the webUI - Then the "error" message with header "You can't paste the selected file at this location because you can't paste an item into itself." should be displayed on the webUI - And the user clears all error message from the webUI - And as "Alice" file "simple-empty-folder/simple-empty-folder" should not exist in the server - - - Scenario: copy a folder into another folder with same name - Given user "Alice" has created folder "simple-empty-folder" in the server - And user "Alice" has created folder "folder with space" in the server - And user "Alice" has created folder "folder with space/simple-empty-folder" in the server - And user "Alice" has logged in using the webUI - When the user copies folder "simple-empty-folder" into folder "folder with space/simple-empty-folder" using the webUI - Then breadcrumb for folder "folder with space" should be displayed on the webUI - And folder "simple-empty-folder" should be listed on the webUI - And as "Alice" folder "folder with space/simple-empty-folder/simple-empty-folder" should exist in the server - And as "Alice" folder "simple-empty-folder" should exist in the server diff --git a/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature b/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature index 42241e4aa6a..327bd721a5b 100644 --- a/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature +++ b/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature @@ -16,55 +16,6 @@ Feature: move files Then the error message 'The name cannot contain "/"' should be displayed on the webUI dialog prompt And file "lorem.txt" should be listed on the webUI - @smokeTest @ocisSmokeTest @skipOnIphoneResolution - Scenario: move a file into a folder - Given user "Alice" has logged in using the webUI - And user "Alice" has uploaded file "data.tar.gz" to "data.tar.gz" in the server - And user "Alice" has uploaded file "strängé filename (duplicate #2 &).txt" to "strängé filename (duplicate #2 &).txt" in the server - And user "Alice" has created folder "strängé नेपाली folder empty" in the server - And the user has reloaded the current page of the webUI - When the user moves file "lorem.txt" into folder "simple-folder" using the webUI - Then breadcrumb for folder "simple-folder" should be displayed on the webUI - And file "lorem.txt" should be listed on the webUI - When the user browses to the files page - And the user moves file "data.tar.gz" into folder "strängé नेपाली folder empty" using the webUI - Then breadcrumb for folder "strängé नेपाली folder empty" should be displayed on the webUI - And file "data.tar.gz" should be listed on the webUI - When the user browses to the files page - And the user moves file "strängé filename (duplicate #2 &).txt" into folder "strängé नेपाली folder empty" using the webUI - Then breadcrumb for folder "strängé नेपाली folder empty" should be displayed on the webUI - And file "strängé filename (duplicate #2 &).txt" should be listed on the webUI - When the user browses to the files page - Then file "lorem.txt" should not be listed on the webUI - And file "data.tar.gz" should not be listed on the webUI - And file "strängé filename (duplicate #2 &).txt" should not be listed on the webUI - - - Scenario: move a file into a folder where a file with the same name already exists - Given user "Alice" has logged in using the webUI - And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server - And the user has browsed to the personal page - When the user tries to move file "lorem.txt" into folder "simple-folder" using the webUI - Then the "modal error" message with header 'File with name "lorem.txt" already exists.' should be displayed on the webUI - - @smokeTest @ocisSmokeTest @disablePreviews @skipOnIphoneResolution - Scenario: Move multiple files at once - Given user "Alice" has logged in using the webUI - And user "Alice" has uploaded file "data.zip" to "data.zip" in the server - And user "Alice" has uploaded file "data.zip" to "testapp.zip" in the server - And the user has reloaded the current page of the webUI - When the user batch moves these files into folder "simple-folder" using the webUI - | file_name | - | data.zip | - | lorem.txt | - | testapp.zip | - Then breadcrumb for folder "simple-folder" should be displayed on the webUI - And the following files should be listed on the webUI - | file_name | - | data.zip | - | lorem.txt | - | testapp.zip | - Scenario Outline: move a file into a folder (problematic characters) Given user "Alice" has logged in using the webUI @@ -92,4 +43,3 @@ Feature: move files And file "data.zip" should be listed on the webUI And as "Alice" file "simple-folder/simple-empty-folder/data.zip" should exist in the server But as "Alice" file "simple-folder/data.zip" should not exist in the server - diff --git a/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature b/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature deleted file mode 100644 index 8006536d460..00000000000 --- a/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature +++ /dev/null @@ -1,85 +0,0 @@ -Feature: accept/decline shares coming from internal users - As a user - I want to have control of which received shares I accept - So that I can keep my file system clean - - Background: - 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 | - | Brian | - And user "Brian" has logged in using the webUI - - - Scenario: User receives files when auto accept share is disabled - oCIS behavior - Given user "Alice" has created file "toshare.txt" in the server - 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 "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 - - - Scenario: receive shares with same name from different users - Given user "Carol" has been created with default attributes and without skeleton files in the server - And user "Carol" has created file "lorem.txt" in the server - And user "Alice" has created file "lorem.txt" in the server - 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 (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 - 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 - When the user browses to the shared-with-me page in accepted shares view - 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 "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 - - @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 - And user "Alice" has created file "data.zip" in the server - And 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 "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 - 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 | - | data.zip | - | lorem.txt | - | simple-folder | - And the user browses to the shared-with-me page in declined shares view - Then file "data.zip" shared by "Alice Hansen" should be in "Declined" state on the webUI - And file "lorem.txt" shared by "Alice Hansen" should be in "Declined" state on the webUI - And folder "simple-folder" shared by "Alice Hansen" should be in "Declined" state on the webUI - - @issue-3859 - 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 - And user "Carol" has created folder "/simple-folder" in the server - And user "Carol" has created folder "/simple-folder/from_Carol" in the server - And user "Carol" has shared folder "/simple-folder" with user "Brian" in the server - And user "Alice" has created folder "/simple-folder" in the server - 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 - Then folder "simple-folder" shared by "Alice Hansen" should be in "Accepted" state on 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 diff --git a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature deleted file mode 100644 index 25f0cbfab34..00000000000 --- a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature +++ /dev/null @@ -1,49 +0,0 @@ -Feature: Sharing files with multiple internal users with different permissions - As a user - I want to set different permissions on shared files with other users - So that I can control the access on those files by other collaborators - - Background: - 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 | - | Brian | - | Carol | - - @issue-ocis-1743 @ocisSmokeTest - Scenario Outline: share a file with multiple users with different roles and permissions - Given user "Alice" has created file "lorem.txt" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for file "lorem.txt" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: - | collaborator | type | - | Brian Murphy | user | - | Carol King | user | - And the user shares with the selected collaborators - Then custom permissions "" should be set for user "Brian Murphy" for file "lorem.txt" on the webUI - And custom permissions "" should be set for user "Carol King" for file "lorem.txt" on the webUI - And user "Brian Murphy" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI - And user "Brian" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Brian | - | file_target | /Shares/lorem.txt | - | item_type | file | - | permissions | | - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Carol | - | file_target | /Shares/lorem.txt | - | item_type | file | - | permissions | | - Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Can view | , | read, share | read, share | - | Editor | Can edit | , | read, update, share | read, update, share | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Can view | share | share | read, share | - | Custom permissions | Custom permissions | update | update | read, update | - | Custom permissions | Can edit | share, update | read, update, share | read, update, share | diff --git a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature deleted file mode 100644 index c8bea4ea8c6..00000000000 --- a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature +++ /dev/null @@ -1,56 +0,0 @@ -@issue-ocis-1277 @issue-ocis-1922 -Feature: Sharing files with internal groups with permissions - As a user - I want to set different permissions on shared files with groups - So that I can control the access on those files by other users on the group - - Background: - 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 | - | Brian | - | Carol | - And these groups have been created in the server: - | groupname | - | grp1 | - | grp2 | - And user "Brian" has been added to group "grp1" in the server - And user "Carol" has been added to group "grp2" in the server - - - Scenario Outline: share a file with multiple groups with different roles and permissions - Given user "Alice" has created file "lorem.txt" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for file "lorem.txt" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: - | collaborator | type | - | grp1 | group | - | grp2 | group | - And the user shares with the selected collaborators - Then custom permissions "" should be set for group "grp2" for file "lorem.txt" on the webUI - And custom permissions "" should be set for group "grp1" for file "lorem.txt" on the webUI - And group "grp2" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI - And group "grp1" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI - And user "Brian" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | grp1 | - | file_target | /Shares/lorem.txt | - | item_type | file | - | permissions | | - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | grp2 | - | file_target | /Shares/lorem.txt | - | item_type | file | - | permissions | | - Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Can view | , | read, share | read, share | - | Editor | Can edit | , | read, update, share | read, update, share | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Can view | share | share | read, share | - | Custom permissions | Custom permissions | update | update | read, update | - | Custom permissions | Can edit | share, update | read, update, share | read, update, share | diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature deleted file mode 100644 index 97b9dc8747d..00000000000 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature +++ /dev/null @@ -1,55 +0,0 @@ -Feature: Sharing folders with multiple internal users using advanced permissions - As a user - I want to set advanced permissions on shared folders with other users - So that I can control the access on those folders by other collaborators - - Background: - 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 | - | Brian | - | Carol | - - @issue-ocis-1922 - Scenario Outline: share a folder with multiple users using role as advanced permissions role and different extra permissions - Given user "Alice" has created folder "/simple-folder" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: - | collaborator | type | - | Brian Murphy | user | - | Carol King | user | - And the user shares with the selected collaborators - Then custom permissions "" should be set for user "Brian Murphy" for folder "simple-folder" on the webUI - And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI - And user "Brian Murphy" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Brian" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Brian | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Carol | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Custom permissions | Custom permissions | delete | delete | read, delete | - | Custom permissions | Custom permissions | update | update | read, update | - | Custom permissions | Custom permissions | create | create | read, create | - | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | - | Custom permissions | Custom permissions | update, create | update, create | read, update, create | - | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | - | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | - | Custom permissions | Custom permissions | share, update | share, update | read, update, share | - | Custom permissions | Custom permissions | share, create | share, create | read, share, create | - | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | - | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | - | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature deleted file mode 100644 index 6a07fd46393..00000000000 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature +++ /dev/null @@ -1,62 +0,0 @@ -@issue-ocis-1922 -Feature: Sharing folders with internal groups with role as advanced permissions - As a user - I want to set different permissions on shared folders with groups - So that I can control the access on those folders by other users on the group - - Background: - 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 | - | Brian | - | Carol | - And these groups have been created in the server: - | groupname | - | grp1 | - | grp2 | - And user "Brian" has been added to group "grp1" in the server - And user "Carol" has been added to group "grp2" in the server - - - Scenario Outline: share a folder with multiple groups with role as advanced permissions and different extra permissions - Given user "Alice" has created folder "simple-folder" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: - | collaborator | type | - | grp1 | group | - | grp2 | group | - And the user shares with the selected collaborators - Then custom permissions "" should be set for group "grp2" for folder "simple-folder" on the webUI - And custom permissions "" should be set for group "grp1" for folder "simple-folder" on the webUI - And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And group "grp1" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Brian" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | grp1 | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | grp2 | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Custom permissions | Custom permissions | delete | delete | read, delete | - | Custom permissions | Custom permissions | update | update | read, update | - | Custom permissions | Custom permissions | create | create | read, create | - | Custom permissions | Custom permissions | delete, update | delete, update | read, delete, update | - | Custom permissions | Custom permissions | delete, create | delete, create | read, delete, create | - | Custom permissions | Custom permissions | update, create | update, create | read, update, create | - | Custom permissions | Custom permissions | share, delete | share, delete | read, share, delete | - | Custom permissions | Custom permissions | share, update | share, update | read, update, share | - | Custom permissions | Custom permissions | share, create | share, create | read, share, create | - | Custom permissions | Custom permissions | share, delete, update | share, delete, update | read, share, delete, update | - | Custom permissions | Custom permissions | share, create, delete | share, create, delete | read, share, delete, create | - | Custom permissions | Custom permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature deleted file mode 100644 index 93bca4dcaa4..00000000000 --- a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature +++ /dev/null @@ -1,50 +0,0 @@ - -Feature: Sharing folders with multiple internal users with different permissions - As a user - I want to set different permissions on shared folders with other users - So that I can control the access on those folders by other collaborators - - Background: - 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 | - | Brian | - | Carol | - - @issue-ocis-1743 @issue-ocis-1227 - Scenario Outline: share a folder with multiple users with different roles and permissions - Given user "Alice" has created folder "simple-folder" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: - | collaborator | type | - | Brian Murphy | user | - | Carol King | user | - And the user shares with the selected collaborators - Then custom permissions "" should be set for user "Brian Murphy" for folder "simple-folder" on the webUI - And custom permissions "" should be set for user "Carol King" for folder "simple-folder" on the webUI - And user "Brian Murphy" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Carol King" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Brian" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Brian | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | Carol | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Can view | , | share | read, share | - | Editor | Can edit | , | delete, update, create, share | all | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Can view | share | share | read, share | - | Custom permissions | Custom permissions | delete, update, create | delete, update, create | read, delete, update, create | - | Custom permissions | Can edit | share, delete, update, create | delete, update, create, share | all | diff --git a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature deleted file mode 100644 index 15b6c54d990..00000000000 --- a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature +++ /dev/null @@ -1,56 +0,0 @@ -@ocis-issue-1277 @ocis-issue-2260 -Feature: Sharing folders with internal groups with different roles and permissions - As a user - I want to set different permissions on shared folders with groups - So that I can control the access on those folders by other users on the group - - Background: - 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 | - | Brian | - | Carol | - And these groups have been created in the server: - | groupname | - | grp1 | - | grp2 | - And user "Brian" has been added to group "grp1" in the server - And user "Carol" has been added to group "grp2" in the server - - - Scenario Outline: share a folder with multiple groups with different roles and permissions - Given user "Alice" has created folder "simple-folder" in the server - And user "Alice" has logged in using the webUI - When the user opens the share dialog for folder "simple-folder" using the webUI - And the user selects the following collaborators for the share as "" with "" permissions: - | collaborator | type | - | grp1 | group | - | grp2 | group | - And the user shares with the selected collaborators - Then custom permissions "" should be set for group "grp2" for folder "simple-folder" on the webUI - And custom permissions "" should be set for group "grp1" for folder "simple-folder" on the webUI - And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And group "grp1" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "Brian" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | grp1 | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - And user "Carol" should have received a share with these details in the server: - | field | value | - | uid_owner | Alice | - | share_with | grp2 | - | file_target | /Shares/simple-folder | - | item_type | folder | - | permissions | | - Examples: - | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | - | Viewer | Can view | , | share | read, share | - | Editor | Can edit | , | delete, update, create, share | all | - | Custom permissions | Custom permissions | , | , | read | - | Custom permissions | Can view | share | share | read, share | - | Custom permissions | Custom permissions | delete, update, create | delete, update, create | read, delete, update, create | - | Custom permissions | Can edit | share, delete, update, create | delete, update, create, share | all | diff --git a/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature b/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature index a6d0708d951..055b11339b0 100644 --- a/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature +++ b/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature @@ -20,24 +20,6 @@ Feature: Public link share management When the public uses the webUI to access the last public link created by user "Alice" in a new session Then the user should be redirected to the files-drop page - @issue-5321 - Scenario: mount public link - Given user "Brian" has been created with default attributes and without skeleton files in the server - And user "Alice" has uploaded file with content "Alice file" to "simple-folder/lorem.txt" in the server - And user "Alice" has created a public link with following settings in the server - | path | simple-folder | - | name | Public-link | - | permissions | read, update, create, delete | - When the public uses the webUI to access the last public link created by user "Alice" in a new session - And the public adds the public link to "%remote_server%" as user "Brian" with password "%alt2%" using the webUI in the server - Then folder "simple-folder" should be listed on the webUI - When the user opens folder "simple-folder" using the webUI - Then file "lorem.txt" should be listed on the webUI - And the content of file "simple-folder/lorem.txt" for user "Brian" should be "Alice file" in the server - When the user uploads overwriting file "lorem.txt" using the webUI - Then file "lorem.txt" should be listed on the webUI - And as "Brian" the content of "simple-folder/lorem.txt" in the server should be the same as the content of local file "lorem.txt" - @issue-ocis-1328 Scenario: user shares a file through public link and then it appears in a shared-via-link page Given the setting "shareapi_allow_public_notification" of app "core" has been set to "yes" in the server diff --git a/tests/acceptance/features/webUIUpload/upload.feature b/tests/acceptance/features/webUIUpload/upload.feature index 0a73843907b..2a30f250ff8 100644 --- a/tests/acceptance/features/webUIUpload/upload.feature +++ b/tests/acceptance/features/webUIUpload/upload.feature @@ -11,13 +11,6 @@ Feature: File Upload And user "Alice" has uploaded file with content "initial content" to "simple-folder/lorem.txt" in the server And user "Alice" has logged in using the webUI - @smokeTest @ocisSmokeTest - Scenario: simple upload of a file that does not exist before - When the user uploads file "new-lorem.txt" using the webUI - Then no message should be displayed on the webUI - And file "new-lorem.txt" should be listed on the webUI - And as "Alice" the content of "new-lorem.txt" in the server should be the same as the content of local file "new-lorem.txt" - @smokeTest @ocisSmokeTest Scenario: simple upload of a folder that does not exist before Given a folder "CUSTOM" has been created with the following files in separate sub-folders in the middleware @@ -100,32 +93,6 @@ Feature: File Upload Then file "big-video.mp4" should be listed on the webUI And as "Alice" the content of "big-video.mp4" in the server should be the same as the content of local file "big-video.mp4" - - Scenario: upload a new file into a sub folder - When the user opens folder "simple-folder" using the webUI - And the user uploads file "new-lorem.txt" using the webUI - Then no message should be displayed on the webUI - And file "new-lorem.txt" should be listed on the webUI - And as "Alice" the content of "simple-folder/new-lorem.txt" in the server should be the same as the content of local file "new-lorem.txt" - - @smokeTest @disablePreviews - Scenario: overwrite an existing file - When the user uploads overwriting file "lorem.txt" using the webUI - Then no message should be displayed on the webUI - And file "lorem.txt" should be listed on the webUI - And as "Alice" the content of "lorem.txt" in the server should be the same as the content of local file "lorem.txt" - And the versions list for resource "lorem.txt" should contain 1 entry - But file "lorem (2).txt" should not be listed on the webUI - - @smokeTest @disablePreviews @issue-ocis-reva-54 - Scenario: overwrite an existing file when versioning is disabled - Given the app "files_versions" has been disabled in the server - When the user uploads overwriting file "lorem.txt" using the webUI - Then no message should be displayed on the webUI - And file "lorem.txt" should be listed on the webUI - And as "Alice" the content of "lorem.txt" in the server should be the same as the content of local file "lorem.txt" - But file "lorem (2).txt" should not be listed on the webUI - @disablePreviews Scenario: overwrite an existing file in a sub-folder When the user opens folder "simple-folder" using the webUI @@ -141,12 +108,6 @@ Feature: File Upload Then file "lorem.txt" should be listed on the webUI And as "Alice" the content of "simple-folder/lorem.txt" in the server should be the same as the content of local file "lorem.txt" - Scenario: upload a file with comma in the filename - When the user uploads file "file,with,comma,.txt" using the webUI - Then no message should be displayed on the webUI - And file "file,with,comma,.txt" should be listed on the webUI - And as "Alice" the content of "file,with,comma,.txt" should be the same in the server as the content of local file "file,with,comma,.txt" - Scenario: simple upload of a folder, with comma in its name, that does not exist before When the user uploads folder "Folder,With,Comma" using the webUI diff --git a/tests/acceptance/features/webUIUserJourney/journey1.feature b/tests/acceptance/features/webUIUserJourney/journey1.feature deleted file mode 100644 index 0cdbb26492b..00000000000 --- a/tests/acceptance/features/webUIUserJourney/journey1.feature +++ /dev/null @@ -1,27 +0,0 @@ -Feature: User Journey 1 - - As a user - I would like to do basic file operations - - Background: - Given user "Alice" has been created with default attributes and without skeleton files in the server - - @journey - Scenario: simple upload of a file that does not exist before - When user "Alice" has logged in using the webUI - And the user uploads file "new-lorem.txt" using the webUI - Then no message should be displayed on the webUI - And file "new-lorem.txt" should be listed on the webUI - And as "Alice" the content of "new-lorem.txt" in the server should be the same as the content of local file "new-lorem.txt" - When the user browses to the files page - And the user downloads file "new-lorem.txt" using the webUI - Then no message should be displayed on the webUI - When the user renames file "new-lorem.txt" to "new-lorem2.txt" using the webUI - Then file "new-lorem2.txt" should be listed on the webUI - When the user deletes file "new-lorem2.txt" using the webUI - And the user browses to the trashbin page - Then file "new-lorem2.txt" should be listed on the webUI - When the user restores file "new-lorem2.txt" from the trashbin using the webUI - Then there should be no resources listed on the webUI - When the user browses to the files page - Then file "new-lorem2.txt" should be listed on the webUI diff --git a/tests/e2e/cucumber/features/journeys/kindergarten.feature b/tests/e2e/cucumber/features/journeys/kindergarten.feature index 5f15da7ca91..47a365b5c3e 100644 --- a/tests/e2e/cucumber/features/journeys/kindergarten.feature +++ b/tests/e2e/cucumber/features/journeys/kindergarten.feature @@ -10,6 +10,13 @@ Feature: Kindergarten can use web to organize a day | Alice | | Brian | | Carol | + And "Admin" creates following group using API + | id | + | sales | + | security | + And "Admin" adds user to the group using API + | user | group | + | Brian | sales | Scenario: Alice can share this weeks meal plan with all parents When "Alice" logs in @@ -34,9 +41,19 @@ Feature: Kindergarten can use web to organize a day # Implementation of sharing with different roles is currently broken # since we switched to bulk creating of shares with a single dropdown And "Alice" shares the following resources using the sidebar panel - | resource | recipient | type | role | - | groups/Pre-Schools Pirates/meal plan | Brian | user | Can edit | - | groups/Pre-Schools Pirates/meal plan | Carol | user | Can view | + | resource | recipient | type | role | resourceType | + | groups/Pre-Schools Pirates/meal plan | Brian | user | Can edit | folder | + | groups/Pre-Schools Pirates/meal plan | Carol | user | Can edit | folder | + | groups/Pre-Schools Pirates/meal plan/lorem-big.txt | Brian | user | Can view | file | + | groups/Pre-Schools Pirates/meal plan/lorem-big.txt | Carol | user | Can view | file | + | groups/Kindergarten Koalas/meal plan | sales | group | custom_permissions:read,update,delete | folder | + | groups/Kindergarten Koalas/meal plan | security | group | custom_permissions:read,update,delete | folder | + | groups/Kindergarten Koalas/meal plan/lorem.txt | sales | group | custom_permissions:read | file | + | groups/Kindergarten Koalas/meal plan/lorem.txt | security | group | custom_permissions:read | file | + | groups/Teddy Bear Daycare/meal plan | Brian | user | custom_permissions:read,update,create | folder | + | groups/Teddy Bear Daycare/meal plan | Carol | user | custom_permissions:read,update,create | folder | + | groups/Teddy Bear Daycare/meal plan/data.zip | Brian | user | custom_permissions:read,update | file | + | groups/Teddy Bear Daycare/meal plan/data.zip | Carol | user | custom_permissions:read,update | file | # Then what do we check for to be confident that the above things done by Alice have worked? When "Brian" logs in And "Brian" opens the "files" app diff --git a/tests/e2e/cucumber/features/smoke/copyMove.feature b/tests/e2e/cucumber/features/smoke/copyMove.feature index 28b18d6dcb5..8f80bf8090b 100644 --- a/tests/e2e/cucumber/features/smoke/copyMove.feature +++ b/tests/e2e/cucumber/features/smoke/copyMove.feature @@ -150,3 +150,49 @@ Feature: Copy | Sub1 | | Sub2 | And "Alice" logs out + + + Scenario: Copy and move resources with same name in personal space + Given "Admin" creates following user using API + | id | + | Alice | + And "Alice" logs in + And "Alice" creates the following folders in personal space using API + | name | + | sub | + | folder1 | + | sub/folder1 | + | sub1/folder1 | + And "Alice" creates the following files into personal space using API + | pathToFile | content | + | example1.txt | personal space location | + | folder1/example1.txt | folder1 location | + | sub/folder1/example1.txt | sub/folder1 location | + | sub1/folder1/example1.txt | sub1/folder1 location | + And "Alice" opens the "files" app + + # copy and move file + When "Alice" copies the following resource using sidebar-panel + | resource | to | option | + | example1.txt | folder1 | keep both | + # issue https://github.com/owncloud/web/issues/10515 + # | example1.txt | folder1 | replace | + And "Alice" moves the following resource using sidebar-panel + | resource | to | option | + | example1.txt | sub/folder1 | keep both | + # issue https://github.com/owncloud/web/issues/10515 + # | folder1/example1.txt | sub/folder1 | replace | + + # copy and move folder + And "Alice" copies the following resource using sidebar-panel + | resource | to | option | + | folder1 | sub | keep both | + # issue https://github.com/owncloud/web/issues/10515 + # | folder1 | sub | replace | + And "Alice" moves the following resource using sidebar-panel + | resource | to | option | + | folder1 | sub | keep both | + # issue https://github.com/owncloud/web/issues/10515 + # | sub1/folder1 | sub | replace | + And "Alice" logs out + \ No newline at end of file diff --git a/tests/e2e/cucumber/features/smoke/shares/share.feature b/tests/e2e/cucumber/features/smoke/shares/share.feature index 907c30222f4..287bc4b7226 100644 --- a/tests/e2e/cucumber/features/smoke/shares/share.feature +++ b/tests/e2e/cucumber/features/smoke/shares/share.feature @@ -158,3 +158,44 @@ Feature: share And "Brian" navigates to the shared with me page And "Brian" logs out + + + Scenario: receive two shares with same name + Given "Admin" creates following users using API + | id | + | Carol | + And "Alice" logs in + And "Alice" creates the following folder in personal space using API + | name | + | test-folder | + And "Alice" creates the following files into personal space using API + | pathToFile | content | + | testfile.txt | example text | + And "Alice" opens the "files" app + And "Alice" shares the following resource using the sidebar panel + | resource | recipient | type | role | + | testfile.txt | Brian | user | Can view | + | test-folder | Brian | user | Can view | + And "Alice" logs out + And "Carol" logs in + And "Carol" creates the following folder in personal space using API + | name | + | test-folder | + And "Carol" creates the following files into personal space using API + | pathToFile | content | + | testfile.txt | example text | + And "Carol" opens the "files" app + And "Carol" shares the following resource using the sidebar panel + | resource | recipient | type | role | + | testfile.txt | Brian | user | Can view | + | test-folder | Brian | user | Can view | + And "Carol" logs out + When "Brian" navigates to the shared with me page + Then following resources should be displayed in the Shares for user "Brian" + | resource | + | testfile.txt | + | test-folder | + # https://github.com/owncloud/ocis/issues/8471 + # | testfile (1).txt | + # | test-folder (1) | + And "Brian" logs out diff --git a/tests/e2e/cucumber/steps/ui/resources.ts b/tests/e2e/cucumber/steps/ui/resources.ts index 562bbd1f31c..82b0a8606ba 100644 --- a/tests/e2e/cucumber/steps/ui/resources.ts +++ b/tests/e2e/cucumber/steps/ui/resources.ts @@ -142,11 +142,12 @@ When( const { page } = this.actorsEnvironment.getActor({ key: stepUser }) const resourceObject = new objects.applicationFiles.Resource({ page }) - for (const { resource, to } of stepTable.hashes()) { + for (const { resource, to, option } of stepTable.hashes()) { await resourceObject[actionType === 'copies' ? 'copy' : 'move']({ resource, newLocation: to, - method + method, + option: option }) } } @@ -319,7 +320,7 @@ When( ) Then( - /^following resources (should|should not) be displayed in the (search list|files list) for user "([^"]*)"$/, + /^following resources (should|should not) be displayed in the (search list|files list|Shares) for user "([^"]*)"$/, async function ( this: World, actionType: string, diff --git a/tests/e2e/support/objects/app-files/resource/actions.ts b/tests/e2e/support/objects/app-files/resource/actions.ts index 187b405e511..0143e7ffed3 100644 --- a/tests/e2e/support/objects/app-files/resource/actions.ts +++ b/tests/e2e/support/objects/app-files/resource/actions.ts @@ -113,6 +113,8 @@ const highlightedFileRowSelector = '#files-space-table tr.oc-table-highlighted' const emptyTrashbinButtonSelector = '.oc-files-actions-empty-trash-bin-trigger' const resourceLockIcon = '//*[@data-test-resource-name="%s"]/ancestor::tr//td//span[contains(@class, "oc-resource-icon-status-badge-inner")]' +const sharesNavigationButtonSelector = '.oc-sidebar-nav [data-nav-name="files-shares"]' +const keepBothButton = '.oc-modal-body-actions-confirm' export const clickResource = async ({ page, @@ -701,16 +703,15 @@ export interface moveOrCopyResourceArgs { newLocation: string action: 'copy' | 'move' method: string + option?: string } export interface moveOrCopyMultipleResourceArgs extends Omit { resources: string[] } -export const pasteResource = async ( - args: Omit -): Promise => { - const { page, resource, newLocation, method } = args +export const pasteResource = async (args: moveOrCopyResourceArgs): Promise => { + const { page, resource, newLocation, action, method, option } = args await page.locator(breadcrumbRoot).click() const newLocationPath = newLocation.split('/') @@ -727,11 +728,24 @@ export const pasteResource = async ( } else { await page.locator(pasteButton).click() } - - await waitForResources({ - page, - names: [resource] - }) + if (option) { + await Promise.all([ + page.waitForResponse( + (resp) => + resp.url().endsWith(resource) && + resp.status() === 201 && + resp.request().method() === action.toUpperCase() + ), + option === 'replace' + ? page.locator(actionSecondaryConfirmationButton).click() + : page.locator(keepBothButton).click() + ]) + } else { + await waitForResources({ + page, + names: [resource] + }) + } } export const moveOrCopyMultipleResources = async ( @@ -826,7 +840,7 @@ export const moveOrCopyMultipleResources = async ( } export const moveOrCopyResource = async (args: moveOrCopyResourceArgs): Promise => { - const { page, resource, newLocation, action, method } = args + const { page, resource, newLocation, action, method, option } = args const { dir: resourceDir, base: resourceBase } = path.parse(resource) if (resourceDir) { @@ -837,13 +851,13 @@ export const moveOrCopyResource = async (args: moveOrCopyResourceArgs): Promise< case 'dropdown-menu': { await page.locator(util.format(resourceNameSelector, resourceBase)).click({ button: 'right' }) await page.locator(util.format(filesContextMenuAction, action)).click() - await pasteResource({ page, resource: resourceBase, newLocation, method }) + await pasteResource({ page, resource: resourceBase, newLocation, action, method, option }) break } case 'batch-action': { await page.locator(util.format(checkBox, resourceBase)).click() await page.locator(util.format(filesBatchAction, action)).click() - await pasteResource({ page, resource: resourceBase, newLocation, method }) + await pasteResource({ page, resource: resourceBase, newLocation, action, method, option }) break } case 'sidebar-panel': { @@ -852,7 +866,7 @@ export const moveOrCopyResource = async (args: moveOrCopyResourceArgs): Promise< const actionButtonType = action === 'copy' ? 'Copy' : 'Cut' await page.locator(util.format(sideBarActionButton, actionButtonType)).click() - await pasteResource({ page, resource: resourceBase, newLocation, method }) + await pasteResource({ page, resource: resourceBase, newLocation, action, method, option }) break } case 'keyboard': { @@ -872,7 +886,7 @@ export const moveOrCopyResource = async (args: moveOrCopyResourceArgs): Promise< (resp) => resp.url().endsWith(resource) && resp.status() === 201 && - resp.request().method() === (action === 'copy' ? 'COPY' : 'MOVE') + resp.request().method() === action.toUpperCase() ), page.keyboard.press('Control+v') ]) @@ -1355,6 +1369,19 @@ export const getDisplayedResourcesFromFilesList = async (page): Promise => { + const files = [] + await page.locator(sharesNavigationButtonSelector).click() + const result = await page.locator('[data-test-resource-path]') + + const count = await result.count() + for (let i = 0; i < count; i++) { + files.push(await result.nth(i).getAttribute('data-test-resource-name')) + } + + return files +} + export interface switchViewModeArgs { page: Page target: 'resource-table' | 'resource-tiles' diff --git a/tests/e2e/support/objects/app-files/resource/index.ts b/tests/e2e/support/objects/app-files/resource/index.ts index d302e4b0bf1..dce63168cfb 100644 --- a/tests/e2e/support/objects/app-files/resource/index.ts +++ b/tests/e2e/support/objects/app-files/resource/index.ts @@ -187,6 +187,8 @@ export class Resource { return po.getDisplayedResourcesFromFilesList(this.#page) } else if (args.keyword === 'search list') { return po.getDisplayedResourcesFromSearch(this.#page) + } else if (args.keyword === 'Shares') { + return po.getDisplayedResourcesFromShares(this.#page) } else { throw new Error('Unknown keyword') }