Merge pull request #9143 from owncloud/use-sharingNG-in-given-steps-apiSpacesShares-suite-2

[full-ci] [tests-only] Use sharing ng in given steps api spaces shares suite
This commit is contained in:
Prarup Gurung
2024-05-15 14:39:40 +05:45
committed by GitHub
3 changed files with 153 additions and 42 deletions

View File

@@ -25,9 +25,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.
#### [PATCH request for TUS upload with wrong checksum gives incorrect response](https://github.com/owncloud/ocis/issues/1755)
- [apiSpacesShares/shareUploadTUS.feature:187](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L187)
- [apiSpacesShares/shareUploadTUS.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L201)
- [apiSpacesShares/shareUploadTUS.feature:264](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L264)
- [apiSpacesShares/shareUploadTUS.feature:267](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L267)
- [apiSpacesShares/shareUploadTUS.feature:286](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L286)
- [apiSpacesShares/shareUploadTUS.feature:364](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L364)
### [Settings service user can list other peoples assignments](https://github.com/owncloud/ocis/issues/5032)

View File

@@ -67,9 +67,11 @@ Feature: Share a file or folder that is inside a space via public link
@issue-5139
Scenario Outline: user participant of the project space with space manager role can share an entity inside project space via public link
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | manager |
Given user "Alice" has sent the following space share invitation:
| space | share sub-item |
| sharee | Brian |
| shareType | user |
| permissionsRole | Manager |
When user "Brian" creates a public link share inside of space "share sub-item" with settings:
| path | <resource> |
| shareType | 3 |
@@ -97,9 +99,11 @@ Feature: Share a file or folder that is inside a space via public link
@skipOnRevaMaster
Scenario Outline: user participant of the project space without space manager role cannot share an entity inside project space via public link
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | <space-role> |
Given user "Alice" has sent the following space share invitation:
| space | share sub-item |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" creates a public link share inside of space "share sub-item" with settings:
| path | <resource> |
| shareType | 3 |
@@ -111,11 +115,11 @@ Feature: Share a file or folder that is inside a space via public link
And the OCS status code should be "403"
And the OCS status message should be "No share permission"
Examples:
| resource | space-role |
| folder | editor |
| folder | viewer |
| folder/file.txt | editor |
| folder/file.txt | viewer |
| resource | space-role |
| folder | Space Editor |
| folder | Space Viewer |
| folder/file.txt | Space Editor |
| folder/file.txt | Space Viewer |
Scenario Outline: user creates a new public link share of a file inside the personal space with edit permissions
@@ -147,9 +151,11 @@ Feature: Share a file or folder that is inside a space via public link
@issue-5139
Scenario Outline: user participant of the project space can see the created public resources link
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | <space-role> |
Given user "Alice" has sent the following space share invitation:
| space | share sub-item |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Alice" creates a public link share inside of space "share sub-item" with settings:
| path | folder/file.txt |
| shareType | 3 |
@@ -169,7 +175,7 @@ Feature: Share a file or folder that is inside a space via public link
| space_id | %space_id% |
And for user "Brian" the space "share sub-item" should contain the last created public link of the file "folder/file.txt"
Examples:
| space-role |
| editor |
| viewer |
| manager |
| space-role |
| Space Editor |
| Space Viewer |
| Manager |

View File

@@ -13,7 +13,12 @@ Feature: upload resources on share using TUS protocol
Scenario: upload file with mtime to a received share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares" should contain these entries:
| file.txt |
@@ -23,7 +28,12 @@ Feature: upload resources on share using TUS protocol
Scenario: upload file with mtime to a sent share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Alice" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Personal" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
@@ -33,7 +43,12 @@ Feature: upload resources on share using TUS protocol
Scenario: overwriting a file with mtime in a received share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Alice" has uploaded file with content "uploaded content" to "/toShare/file.txt"
When user "Brian" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares" should contain these entries:
@@ -44,7 +59,12 @@ Feature: upload resources on share using TUS protocol
Scenario: overwriting a file with mtime in a sent share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has uploaded a file inside space "Shares" with content "uploaded content" to "toShare/file.txt"
When user "Alice" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Personal" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
@@ -56,7 +76,12 @@ Feature: upload resources on share using TUS protocol
Scenario: attempt to upload a file into a nonexistent folder within correctly received share
Given using OCS API version "1"
And user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" uploads a file with content "uploaded content" to "/toShare/nonExistentFolder/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares" should not contain these entries:
| nonExistentFolder |
@@ -65,7 +90,12 @@ Feature: upload resources on share using TUS protocol
Scenario: attempt to upload a file into a nonexistent folder within correctly received read only share
Given using OCS API version "1"
And user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian" with permissions "read"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" uploads a file with content "uploaded content" to "/toShare/nonExistentFolder/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares" should not contain these entries:
| nonExistentFolder |
@@ -73,7 +103,12 @@ Feature: upload resources on share using TUS protocol
Scenario: uploading a file to a received share folder
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
@@ -82,7 +117,12 @@ Feature: upload resources on share using TUS protocol
Scenario: uploading a file to a user read/write share folder
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian" with permissions "change"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Uploader |
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
@@ -93,7 +133,12 @@ Feature: upload resources on share using TUS protocol
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "toShare" with group "grp1" with permissions "change"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Uploader |
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
@@ -103,7 +148,12 @@ Feature: upload resources on share using TUS protocol
Scenario: overwrite file to a received share folder
Given user "Alice" has created folder "/toShare"
And user "Alice" has uploaded file with content "original content" to "/toShare/file.txt"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" uploads a file with content "overwritten content" to "/toShare/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
@@ -112,7 +162,12 @@ Feature: upload resources on share using TUS protocol
Scenario: attempt to upload a file into a folder within correctly received read only share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian" with permissions "read"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares" should not contain these entries:
| file.txt |
@@ -120,7 +175,12 @@ Feature: upload resources on share using TUS protocol
Scenario: upload a file to shared folder with checksum should return the checksum in the propfind for sharee
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Alice" has created a new TUS resource for the space "Personal" with content "" using the WebDAV API with these headers:
| Upload-Length | 5 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
@@ -134,7 +194,12 @@ Feature: upload resources on share using TUS protocol
Scenario: upload a file to shared folder with checksum should return the checksum in the download header for sharee
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Alice" has created a new TUS resource for the space "Personal" with content "" using the WebDAV API with these headers:
| Upload-Length | 5 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
@@ -152,7 +217,12 @@ Feature: upload resources on share using TUS protocol
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | textFile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Brian" requests the checksum of file "/textFile.txt" in space "Shares" via propfind using the WebDAV API
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964 MD5:827ccb0eea8a706c4c34a16891f84e7b ADLER32:02f80100"
@@ -165,14 +235,24 @@ Feature: upload resources on share using TUS protocol
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | textFile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Brian" downloads the file "/textFile.txt" of the space "Shares" using the WebDAV API
Then the header checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964"
Scenario: sharee uploads a file to a received share folder with correct checksum
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" creates a new TUS resource for the space "Shares" with content "" using the WebDAV API with these headers:
| Upload-Length | 16 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
@@ -186,7 +266,12 @@ Feature: upload resources on share using TUS protocol
@issue-1755
Scenario: sharee uploads a file to a received share folder with wrong checksum should not work
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" creates a new TUS resource for the space "Shares" with content "" using the WebDAV API with these headers:
| Upload-Length | 16 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
@@ -200,7 +285,12 @@ Feature: upload resources on share using TUS protocol
@issue-1755
Scenario: sharer uploads a file to shared folder with wrong checksum should not work
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Alice" has created a new TUS resource for the space "Personal" with content "" using the WebDAV API with these headers:
| Upload-Length | 16 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
@@ -230,7 +320,12 @@ Feature: upload resources on share using TUS protocol
Scenario: sharee uploads a chunked file with correct checksum to a received share folder should work
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has created a new TUS resource for the space "Shares" with content "" using the WebDAV API with these headers:
| Upload-Length | 10 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
@@ -251,7 +346,12 @@ Feature: upload resources on share using TUS protocol
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 c1dab0c0864b6ac9bdd3743a1408d679f1acd823" to the last created TUS Location with offset "0" and content "original content" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | textFile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Brian" overwrites recently shared file with offset "0" and data "overwritten content" with checksum "SHA1 fe990d2686a0fc86004efc31f5bf2475a45d4905" via TUS inside of the space "Shares" using the WebDAV API with these headers:
| Upload-Length | 19 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
@@ -268,7 +368,12 @@ Feature: upload resources on share using TUS protocol
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 c1dab0c0864b6ac9bdd3743a1408d679f1acd823" to the last created TUS Location with offset "0" and content "original content" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | textFile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Brian" overwrites recently shared file with offset "0" and data "overwritten content" with checksum "SHA1 fe990d2686a0fc86004efc31f5bf2475a45d4906" via TUS inside of the space "Shares" using the WebDAV API with these headers:
| Upload-Length | 19 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt