Files

72 lines
3.6 KiB
Gherkin
Raw Permalink Normal View History

Feature: change shared resource
2023-06-27 13:16:36 +05:45
As a user
I want to change the shared resource
2023-06-27 13:16:36 +05:45
So that I can organize them as per my necessity
Background:
Given using spaces DAV path
And these users have been created with default attributes:
| username |
| Alice |
| Brian |
@issue-4421
Scenario: move files between shares by different users
Given user "Carol" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"
And user "Brian" has created folder "/PARENT"
And user "Alice" has moved file "textfile0.txt" to "PARENT/from_alice.txt" in space "Personal"
And user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Carol |
| shareType | user |
2024-05-07 16:28:25 +05:45
| permissionsRole | Editor |
And user "Carol" has a share "PARENT" synced
And user "Brian" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Carol |
| shareType | user |
2024-05-07 16:28:25 +05:45
| permissionsRole | Editor |
And user "Carol" has a share "PARENT (1)" synced
2022-10-20 20:49:57 +02:00
When user "Carol" moves file "PARENT/from_alice.txt" to "PARENT (1)/from_alice.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "502"
And for user "Carol" folder "PARENT" of the space "Shares" should contain these entries:
| from_alice.txt |
And for user "Carol" folder "PARENT (1)" of the space "Shares" should not contain these entries:
| from_alice.txt |
2023-06-27 13:16:36 +05:45
Scenario Outline: overwrite a received file share
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
2023-06-27 13:16:36 +05:45
And user "Alice" has uploaded file with content "old content version 1" to "/textfile1.txt"
2022-10-13 20:23:08 +02:00
And user "Alice" has uploaded file with content "old content version 2" to "/textfile1.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile1.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile1.txt" synced
2022-10-20 20:49:57 +02:00
When user "Brian" uploads a file inside space "Shares" with content "this is a new content" to "textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
2022-10-20 20:49:57 +02:00
And for user "Brian" the space "Shares" should contain these entries:
| textfile1.txt |
2022-10-20 20:49:57 +02:00
And for user "Brian" the content of the file "/textfile1.txt" of the space "Shares" should be "this is a new content"
And for user "Alice" the content of the file "/textfile1.txt" of the space "Personal" should be "this is a new content"
2022-10-13 20:23:08 +02:00
When user "Alice" downloads version of the file "/textfile1.txt" with the index "2" of the space "Personal" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded content should be "old content version 1"
2023-04-06 12:52:38 +02:00
When user "Alice" downloads version of the file "/textfile1.txt" with the index "1" of the space "Personal" using the WebDAV API
2022-10-13 20:23:08 +02:00
Then the HTTP status code should be "200"
And the downloaded content should be "old content version 2"
2024-06-24 16:57:36 +05:45
When user "Brian" tries to get versions of the file "/textfile1.txt" from the space "Shares" using the WebDAV API
2023-04-06 12:52:38 +02:00
Then the HTTP status code should be "403"
2023-06-27 13:16:36 +05:45
Examples:
| user-role |
2023-06-27 13:16:36 +05:45
| Admin |
| Space Admin |
| User |
| User Light |