test: ensure share is available

This commit is contained in:
Saw-jan
2024-07-24 11:35:45 +05:45
parent 4a6b0f04f6
commit 3883e17b52
35 changed files with 251 additions and 7 deletions
@@ -36,6 +36,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "tmp.txt" synced
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -58,6 +59,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | File Editor |
And user "Brian" has a share "tmp.txt" synced
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -78,6 +80,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "tmp.txt" synced
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -113,6 +116,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "tmp" synced
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -135,6 +139,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "tmp" synced
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -155,6 +160,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "tmp" synced
And using SharingNG
When user "Alice" updates the last share using the sharing API with
| permissions | delete,create,read |
@@ -178,6 +184,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has a share "tmp" synced
When user "Alice" updates the last share using the sharing API with
| permissions | delete,create,read |
Then the HTTP status code should be "200"
@@ -197,6 +204,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "tmp" synced
And using SharingNG
When user "Alice" updates the last share using the sharing API with
| permissions | delete,update,read |
@@ -220,6 +228,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has a share "tmp" synced
When user "Alice" updates the last share using the sharing API with
| permissions | delete,update,read |
Then the HTTP status code should be "200"
@@ -239,6 +248,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "tmp" synced
And using SharingNG
When user "Alice" updates the last share using the sharing API with
| permissions | create,update,read |
@@ -262,6 +272,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has a share "tmp" synced
When user "Alice" updates the last share using the sharing API with
| permissions | create,update,read |
Then the HTTP status code should be "200"
@@ -109,6 +109,7 @@ Feature: share access by ID
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile0.txt" synced
And using SharingNG
When user "Brian" declines share with ID "%last_share_id%" using the sharing API
Then the OCS status code should be "<ocs-status-code>"
@@ -34,6 +34,8 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has a share "FOLDER" synced
And user "Brian" has a share "FOLDER" synced
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -53,6 +55,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
@@ -81,6 +84,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
@@ -107,6 +111,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
@@ -133,6 +138,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
@@ -158,6 +164,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "myfile.txt" synced
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/myfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the following headers should match these regular expressions for user "Brian"
@@ -184,6 +191,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -206,6 +214,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -226,6 +235,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -248,6 +258,7 @@ Feature: sharing
| sharee | grp1 |
| shareType | group |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -268,6 +279,7 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
And user "Brian" has a share "FOLDER" synced
When user "Brian" uploads file with content "some content" to "/Shares/FOLDER/textFile.txt" using the WebDAV API
And user "Alice" downloads file "/FOLDER/textFile.txt" using the WebDAV API
Then the HTTP status code should be "200"
@@ -288,6 +300,7 @@ Feature: sharing
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
And user "Alice" has a share "folder-to-share" synced
When user "Alice" uploads file "filesForUpload/zerobyte.txt" to "/Shares/folder-to-share/zerobyte.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/Shares/folder-to-share/zerobyte.txt" should exist