mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-02 02:11:18 -06:00
changing given step of creating share in feature file (#9092)
This commit is contained in:
@@ -186,7 +186,12 @@ Feature: copying file using file id
|
||||
And user "Alice" has created folder "folder/sub-folder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/folder/sub-folder/test.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared folder "/folder" with user "Brian" with permissions "all"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | folder |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Editor |
|
||||
When user "Brian" copies a file "Shares/folder/sub-folder/test.txt" into "Shares/folder" inside space "Shares" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
|
||||
@@ -206,7 +211,12 @@ Feature: copying file using file id
|
||||
Scenario Outline: copy a file from personal to share space
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/folder"
|
||||
And user "Alice" has shared folder "/folder" with user "Brian" with permissions "all"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | folder |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Editor |
|
||||
And user "Brian" has uploaded file with content "some data" to "/test.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Brian" copies a file "/test.txt" into "Shares/folder" inside space "Shares" using file-id path "<dav-path>"
|
||||
@@ -228,7 +238,12 @@ Feature: copying file using file id
|
||||
And user "Alice" has created folder "/folder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/folder/test.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared folder "/folder" with user "Brian" with permissions "all"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | folder |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Editor |
|
||||
When user "Brian" copies a file "/test.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
|
||||
|
||||
@@ -17,25 +17,28 @@ Feature: checking file versions using file id
|
||||
|
||||
|
||||
Scenario Outline: check the file versions of a file shared from project space
|
||||
Given user "Alice" has created a share inside of space "Project1" with settings:
|
||||
| path | text.txt |
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
Given user "Alice" has sent the following share invitation:
|
||||
| resource | text.txt |
|
||||
| space | Project1 |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <role> |
|
||||
When user "Alice" gets the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
When user "Brian" tries to get the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "403"
|
||||
Examples:
|
||||
| role |
|
||||
| editor |
|
||||
| viewer |
|
||||
|
||||
| role |
|
||||
| File Editor |
|
||||
| Viewer |
|
||||
|
||||
Scenario Outline: check the versions of a file in a shared space as editor/manager
|
||||
Given user "Alice" has shared a space "Project1" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <space-role> |
|
||||
Given user "Alice" has sent the following share invitation:
|
||||
| space | Project1 |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <space-role> |
|
||||
When user "Alice" gets the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
@@ -43,25 +46,29 @@ Feature: checking file versions using file id
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "1"
|
||||
Examples:
|
||||
| space-role |
|
||||
| editor |
|
||||
| manager |
|
||||
| space-role |
|
||||
| Space Editor |
|
||||
| Manager |
|
||||
|
||||
|
||||
Scenario: check the versions of a file in a shared space as viewer
|
||||
Given user "Alice" has shared a space "Project1" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | viewer |
|
||||
Given user "Alice" has sent the following share invitation:
|
||||
| space | Project1 |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Space Viewer |
|
||||
When user "Brian" tries to get the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
@issue-7738
|
||||
Scenario Outline: check the versions of a file after moving to a shared folder inside a project space as editor/viewer
|
||||
Given user "Alice" has created a folder "testFolder" in space "Project1"
|
||||
And user "Alice" has created a share inside of space "Project1" with settings:
|
||||
| path | testFolder |
|
||||
| shareWith | Brian |
|
||||
| role | <role> |
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | text.txt |
|
||||
| space | Project1 |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <role> |
|
||||
And user "Alice" has moved file "text.txt" to "/testFolder/movedText.txt" in space "Project1"
|
||||
When user "Alice" gets the number of versions of file "/testFolder/movedText.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
@@ -69,19 +76,24 @@ Feature: checking file versions using file id
|
||||
When user "Brian" tries to get the number of versions of file "/Shares/testFolder/movedText.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "403"
|
||||
Examples:
|
||||
| role |
|
||||
| editor |
|
||||
| viewer |
|
||||
| role |
|
||||
| File Editor |
|
||||
| Viewer |
|
||||
|
||||
@issue-7738
|
||||
Scenario: check the versions of a file after moving it to a shared folder inside a project space as manager
|
||||
Given user "Alice" has created a folder "testFolder" in space "Project1"
|
||||
And user "Alice" has created a share inside of space "Project1" with settings:
|
||||
| path | testFolder |
|
||||
| shareWith | Brian |
|
||||
And user "Alice" has shared a space "Project1" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | manager |
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | testFolder |
|
||||
| space | Project1 |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| space | Project1 |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Manager |
|
||||
And user "Alice" has moved file "text.txt" to "/testFolder/movedText.txt" in space "Project1"
|
||||
When user "Brian" gets the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
|
||||
Then the HTTP status code should be "207"
|
||||
|
||||
@@ -51,7 +51,12 @@ Feature: accessing files using file id
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared file "/textfile.txt" with user "Brian"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | textfile.txt |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
When user "Brian" sends HTTP method "GET" to URL "<dav-path>"
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded content should be "some data"
|
||||
@@ -66,7 +71,12 @@ Feature: accessing files using file id
|
||||
And user "Alice" has created folder "uploadFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "uploadFolder/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared folder "/uploadFolder" with user "Brian"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | uploadFolder |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
When user "Brian" sends HTTP method "GET" to URL "<dav-path>"
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded content should be "some data"
|
||||
@@ -82,9 +92,11 @@ Feature: accessing files using file id
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "some data" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "new-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | viewer |
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| space | new-space |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Space Viewer |
|
||||
When user "Brian" sends HTTP method "GET" to URL "<dav-path>"
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded content should be "some data"
|
||||
|
||||
@@ -104,7 +104,12 @@ Feature: propfind a file using file id
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared file "/textfile.txt" with user "Brian"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | textfile.txt |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | File Editor |
|
||||
When user "Brian" sends HTTP method "PROPFIND" to URL "<dav-path>"
|
||||
Then the HTTP status code should be "207"
|
||||
And the "PROPFIND" response to user "Alice" should contain a mountpoint "Brian Murphy" with these key and value pairs:
|
||||
@@ -120,7 +125,12 @@ Feature: propfind a file using file id
|
||||
Scenario Outline: sharee sends a PROPFIND request to a file inside of a shared folder
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/folder"
|
||||
And user "Alice" has shared folder "/folder" with user "Brian"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | folder |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Editor |
|
||||
And user "Alice" has uploaded file with content "some data" to "/folder/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
When user "Brian" sends HTTP method "PROPFIND" to URL "<dav-path>"
|
||||
|
||||
@@ -51,7 +51,12 @@ Feature: update files using file id
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared file "/textfile.txt" with user "Brian"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | textfile.txt |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | File Editor |
|
||||
When user "Brian" sends HTTP method "PUT" to URL "<dav-path>" with content "updated content"
|
||||
Then the HTTP status code should be "204"
|
||||
And for user "Alice" the content of the file "/textfile.txt" of the space "Personal" should be "updated content"
|
||||
@@ -67,7 +72,12 @@ Feature: update files using file id
|
||||
And user "Alice" has created folder "uploadFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "uploadFolder/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared folder "/uploadFolder" with user "Brian"
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| resource | uploadFolder |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Editor |
|
||||
When user "Brian" sends HTTP method "PUT" to URL "<dav-path>" with content "updated content"
|
||||
Then the HTTP status code should be "204"
|
||||
And for user "Alice" the content of the file "uploadFolder/textfile.txt" of the space "Personal" should be "updated content"
|
||||
@@ -84,17 +94,19 @@ Feature: update files using file id
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "some data" to "/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared a space "new-space" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | <space-role> |
|
||||
And user "Alice" has sent the following share invitation:
|
||||
| space | new-space |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <space-role> |
|
||||
When user "Brian" sends HTTP method "PUT" to URL "<dav-path>" with content "updated content"
|
||||
Then the HTTP status code should be "<http-status-code>"
|
||||
And for user "Alice" the content of the file "/textfile.txt" of the space "new-space" should be "<file-content>"
|
||||
And for user "Brian" the content of the file "/textfile.txt" of the space "new-space" should be "<file-content>"
|
||||
Examples:
|
||||
| dav-path | space-role | http-status-code | file-content |
|
||||
| /remote.php/dav/spaces/<<FILEID>> | viewer | 403 | some data |
|
||||
| /dav/spaces/<<FILEID>> | editor | 204 | updated content |
|
||||
| dav-path | space-role | http-status-code | file-content |
|
||||
| /remote.php/dav/spaces/<<FILEID>> | Space Viewer | 403 | some data |
|
||||
| /dav/spaces/<<FILEID>> | Space Editor | 204 | updated content |
|
||||
|
||||
|
||||
Scenario Outline: user tries to update content of a file owned by others
|
||||
|
||||
Reference in New Issue
Block a user