diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 2bee9d9f6fe..57192255e7c 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -265,18 +265,16 @@ cannot share a folder with create permission - [coreApiSharePublicLink2/copyFromPublicLink.feature:174](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L174) - [coreApiSharePublicLink2/copyFromPublicLink.feature:189](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L189) - [coreApiSharePublicLink2/copyFromPublicLink.feature:190](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L190) -- [coreApiSharePublicLink3/updatePublicLinkShare.feature:45](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature#L45) -- [coreApiSharePublicLink3/updatePublicLinkShare.feature:46](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature#L46) #### [Upload-only shares must not overwrite but create a separate file](https://github.com/owncloud/ocis/issues/1267) -- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:24](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L24) -- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:273](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L273) +- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:10](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L10) +- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:176](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L176) #### [Set quota over settings](https://github.com/owncloud/ocis/issues/1290) -- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:160](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L160) -- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:179](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L179) +- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:115](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L115) +- [coreApiSharePublicLink3/uploadToPublicLinkShare.feature:129](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature#L129) #### [deleting a file inside a received shared folder is moved to the trash-bin of the sharer not the receiver](https://github.com/owncloud/ocis/issues/1124) diff --git a/tests/acceptance/features/coreApiSharePublicLink3/allowGroupToCreatePublicLinks.feature b/tests/acceptance/features/coreApiSharePublicLink3/allowGroupToCreatePublicLinks.feature deleted file mode 100644 index 47aea454066..00000000000 --- a/tests/acceptance/features/coreApiSharePublicLink3/allowGroupToCreatePublicLinks.feature +++ /dev/null @@ -1,110 +0,0 @@ -@api @files_sharing-app-required @notToImplementOnOcis -Feature: public share sharers groups setting - As an admin - I should be able to allow only certain groups to create public links - So that random links are not generated on my file system - - Background: - Given group "grp1" has been created - And user "Alice" has been created with default attributes and without skeleton files - And user "Alice" has uploaded file with content "file to share with user" to "/fileToShare.txt" - - - Scenario: users present in public share shares groups can create new public link shares - Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" - And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' - And user "Alice" has been added to group "grp1" - When user "Alice" creates a public link share using the sharing API with settings - | path | fileToShare.txt | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And the fields of the last response to user "Alice" should include - | item_type | file | - | mimetype | text/plain | - | file_target | /fileToShare.txt | - | path | /fileToShare.txt | - | permissions | read | - | share_type | public_link | - | displayname_file_owner | %displayname% | - | displayname_owner | %displayname% | - | uid_file_owner | %username% | - | uid_owner | %username% | - | name | | - - - Scenario: users not present in public share shares groups cannot create a new public link share - Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" - And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' - When user "Alice" creates a public link share using the sharing API with settings - | path | fileToShare.txt | - Then the OCS status code should be "403" - And the HTTP status code should be "200" - And the OCS status message should be "Public link creation is only possible for certain groups" - - - Scenario: existing links can still be updated by sharers even if they are not present in public share sharers groups - Given user "Alice" has created a public link share with settings - | path | /fileToShare.txt | - | permissions | read | - And parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" - And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' - When user "Alice" updates the last public link share using the sharing API with - | expireDate | +3 days | - Then the HTTP status code should be "200" - And the OCS status code should be "100" - And the fields of the last response to user "Alice" should include - | expiration | +3 days | - - - Scenario: existing links can still be deleted by sharers even if they are not present in public share sharers groups - Given user "Alice" has created a public link share with settings - | path | /fileToShare.txt | - | permissions | read | - | name | shared-link | - And parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" - And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1"]' - When user "Alice" deletes public link share named "shared-link" in file "fileToShare.txt" using the sharing API - Then the HTTP status code should be "200" - And the OCS status code should be "100" - And as user "Alice" the file "fileToShare.txt" should not have any shares - - - Scenario: creating a new link share is not restricted if no groups are inside the allowed public share sharers groups even if allowlist is enabled - Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" - When user "Alice" creates a public link share using the sharing API with settings - | path | fileToShare.txt | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And the fields of the last response to user "Alice" should include - | item_type | file | - | mimetype | text/plain | - | file_target | /fileToShare.txt | - | path | /fileToShare.txt | - | permissions | read | - | share_type | public_link | - | displayname_file_owner | %displayname% | - | displayname_owner | %displayname% | - | uid_file_owner | %username% | - | uid_owner | %username% | - | name | | - - - Scenario: multiple groups can be added to public share sharers groups allow list - Given parameter "public_share_sharers_groups_allowlist_enabled" of app "files_sharing" has been set to "yes" - And user "Brian" has been created with default attributes and without skeleton files - And user "Carol" has been created with default attributes and without skeleton files - And user "Brian" has uploaded file with content "file to share with user" to "/fileToShare.txt" - And user "Carol" has uploaded file with content "file to share with user" to "/fileToShare.txt" - And group "grp2" has been created - And user "Alice" has been added to group "grp1" - And user "Brian" has been added to group "grp2" - And parameter "public_share_sharers_groups_allowlist" of app "files_sharing" has been set to '["grp1", "grp2"]' - When user "Alice" creates a public link share using the sharing API with settings - | path | fileToShare.txt | - And user "Brian" creates a public link share using the sharing API with settings - | path | fileToShare.txt | - And user "Carol" creates a public link share using the sharing API with settings - | path | fileToShare.txt | - Then the HTTP status code of responses on all endpoints should be "200" - And the OCS status code of responses on each endpoint should be "100, 100, 403" respectively - And the OCS status message should be "Public link creation is only possible for certain groups" diff --git a/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature b/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature index 44f2b8f241c..a862142fb66 100644 --- a/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature +++ b/tests/acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature @@ -14,7 +14,7 @@ Feature: update a public link share When user "Alice" updates the last public link share using the sharing API with | expireDate | +3 days | Then the OCS status code should be "" - And the OCS status message should be "Ok" + And the OCS status message should be "OK" And the HTTP status code should be "200" And the fields of the last response to user "Alice" should include | id | A_STRING | @@ -28,8 +28,8 @@ Feature: update a public link share | token | A_STRING | | uid_file_owner | %username% | | displayname_file_owner | %displayname% | - | additional_info_owner | | - | additional_info_file_owner | | + | additional_info_owner | %emailaddress% | + | additional_info_file_owner | %emailaddress% | | item_type | folder | | item_source | A_STRING | | path | /FOLDER | @@ -419,11 +419,11 @@ Feature: update a public link share And as "Alice" file "PARENT/CHILD/child.txt" should not exist And as "Alice" file "PARENT/parent.txt" should not exist - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | ocs_api_version | public-webdav-api-version | - | 1 | old | - | 2 | old | +# @notToImplementOnOCIS @issue-ocis-2079 +# Examples: +# | ocs_api_version | public-webdav-api-version | +# | 1 | old | +# | 2 | old | Examples: @@ -478,7 +478,7 @@ Feature: update a public link share | spaces | 2 | 200 | - @skipOnOcV10 + Scenario Outline: API responds with a full set of parameters when owner renames the file with a public link in ocis Given using OCS API version "" And using DAV path diff --git a/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature b/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature index bedf7e7199c..59e71e72986 100644 --- a/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature +++ b/tests/acceptance/features/coreApiSharePublicLink3/uploadToPublicLinkShare.feature @@ -1,4 +1,4 @@ -@api @files_sharing-app-required @public_link_share-feature-required @issue-ocis-reva-315 @issue-ocis-reva-316 +@api @files_sharing-app-required @public_link_share-feature-required @issue-ocis-reva-315 @issue-ocis-reva-316 @issue-ocis-2079 Feature: upload to a public link share @@ -6,20 +6,6 @@ Feature: upload to a public link share Given user "Alice" has been created with default attributes and without skeleton files And user "Alice" has created folder "FOLDER" - @smokeTest @notToImplementOnOCIS @issue-ocis-2079 - Scenario: Uploading same file to a public upload-only share multiple times via old API - # The old API needs to have the header OC-Autorename: 1 set to do the autorename - Given user "Alice" has created a public link share with settings - | path | FOLDER | - | permissions | create | - When the public uploads file "test.txt" with content "test" using the old public WebDAV API - And the public uploads file "test.txt" with content "test2" with auto-rename mode using the old public WebDAV API - Then the HTTP status code should be "201" - And the following headers should match these regular expressions - | ETag | /^"[a-f0-9:\.]{1,32}"$/ | - And the content of file "/FOLDER/test.txt" for user "Alice" should be "test" - And the content of file "/FOLDER/test (2).txt" for user "Alice" should be "test2" - @smokeTest @issue-ocis-reva-286 Scenario: Uploading same file to a public upload-only share multiple times via new API # The new API does the autorename automatically in upload-only folders @@ -44,19 +30,13 @@ Feature: upload to a public link share When the public uploads file "test.txt" with content "test" using the public WebDAV API And the HTTP status code should be "404" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | dav-path | public-webdav-api-version | - | old | old | - | new | old | - @issue-ocis-reva-290 Examples: | dav-path | public-webdav-api-version | | old | new | | new | new | - @personalSpace @skipOnOcV10 + @personalSpace Examples: | dav-path | public-webdav-api-version | | spaces | new | @@ -69,11 +49,6 @@ Feature: upload to a public link share When the public uploads file "test.txt" with content "test" using the public WebDAV API And the HTTP status code should be "403" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - @issue-ocis-reva-292 Examples: | public-webdav-api-version | @@ -90,11 +65,6 @@ Feature: upload to a public link share And the following headers should match these regular expressions | ETag | /^"[a-f0-9:\.]{1,32}"$/ | - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - Examples: | public-webdav-api-version | @@ -110,11 +80,6 @@ Feature: upload to a public link share Then the HTTP status code should be "201" And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - Examples: | public-webdav-api-version | @@ -130,11 +95,6 @@ Feature: upload to a public link share Then the HTTP status code should be "201" And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - Examples: | public-webdav-api-version | @@ -149,11 +109,6 @@ Feature: upload to a public link share When the public uploads file "test.txt" with content "test-file" using the public WebDAV API Then the HTTP status code should be "507" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - @issue-ocis-reva-195 Examples: | public-webdav-api-version | @@ -168,32 +123,12 @@ Feature: upload to a public link share When the public uploads file "test.txt" with content "test-file" using the public WebDAV API Then the HTTP status code should be "507" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - @issue-ocis-reva-195 Examples: | public-webdav-api-version | | new | - Scenario Outline: Uploading file to a public shared folder does not work when allow public uploads has been disabled after sharing the folder with public API - Given user "Alice" has created a public link share with settings - | path | FOLDER | - | permissions | create | - And parameter "shareapi_allow_public_upload" of app "core" has been set to "no" - When the public uploads file "test.txt" with content "test-file" using the public WebDAV API - Then the HTTP status code should be "403" - - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - | new | - - Scenario Outline: Uploading file to a public shared folder does not work when allow public uploads has been disabled before sharing and again enabled after sharing the folder with public API Given parameter "shareapi_allow_public_upload" of app "core" has been set to "no" And user "Alice" has created a public link share with settings @@ -202,11 +137,6 @@ Feature: upload to a public link share When the public uploads file "test.txt" with content "test-file" using the public WebDAV API And the HTTP status code should be "403" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - @issue-ocis-reva-41 Examples: | public-webdav-api-version | @@ -223,11 +153,6 @@ Feature: upload to a public link share Then the HTTP status code should be "201" And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - @issue-ocis-reva-41 Examples: | public-webdav-api-version | @@ -242,33 +167,11 @@ Feature: upload to a public link share Then the HTTP status code should be "201" And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file" - @notToImplementOnOCIS @issue-ocis-2079 - Examples: - | public-webdav-api-version | - | old | - Examples: | public-webdav-api-version | | new | - @smokeTest @notToImplementOnOCIS @issue-ocis-2079 - Scenario: Uploading same file to a public upload-write and no edit and no overwrite share multiple times with old public API - Given user "Alice" has created a public link share with settings - | path | FOLDER | - | permissions | uploadwriteonly | - When the public uploads file "test.txt" with content "test" using the old public WebDAV API - Then the HTTP status code should be "201" - And the following headers should match these regular expressions - | ETag | /^"[a-f0-9:\.]{1,32}"$/ | - When the public uploads file "test.txt" with content "test2" using the old public WebDAV API - # Uncomment these once the issue is fixed - # Then the HTTP status code should be "201" - # And the content of file "/FOLDER/test.txt" for user "Alice" should be "test" - # And the content of file "/FOLDER/test (2).txt" for user "Alice" should be "test2" - Then the HTTP status code should be "403" - And the content of file "/FOLDER/test.txt" for user "Alice" should be "test" - @smokeTest @issue-ocis-reva-286 Scenario: Uploading same file to a public upload-write and no edit and no overwrite share multiple times with new public API Given user "Alice" has created a public link share with settings