Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
@@ -0,0 +1,549 @@
Feature: copying file using file id
As a user
I want to copy the file using file id
So that I can manage my resource
Background:
Given using spaces DAV path
And user "Alice" has been created with default attributes
Scenario: copy a file into a folder in personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| textfile.txt |
Scenario: copy a file into a sub-folder in personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has created folder "folder/sub-folder"
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "textfile.txt" into folder "/folder/sub-folder" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
| textfile.txt |
Scenario: copy a file from a folder into root of personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| textfile.txt |
Scenario: copy a file from sub-folder into root of personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has created folder "folder/sub-folder"
And user "Alice" has uploaded file with content "some data" to "folder/sub-folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "/textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
| textfile.txt |
Scenario: copy a file into a folder in project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "/folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "project-space" should contain these files:
| textfile.txt |
Scenario: copy a file into a sub-folder in project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "folder/sub-folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder/sub-folder" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "project-space" should contain these files:
| textfile.txt |
Scenario: copy a file from a folder into root of project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "project-space" should contain these files:
| textfile.txt |
Scenario: copy a file from sub-folder into root of project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "folder/sub-folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "folder/sub-folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "project-space" should contain these files:
| textfile.txt |
Scenario: copy a file from personal to project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded file with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" copies file with id "<<FILEID>>" as "/textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
Scenario: copy a file from sub-folder to root folder inside Shares space
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "/folder"
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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
When user "Brian" copies file with id "<<FILEID>>" as "test.txt" into folder "Shares/folder" inside space "Shares"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| test.txt |
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
| test.txt |
Scenario: copy a file from personal to share space
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "/folder"
And user "Alice" has sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
And user "Brian" has uploaded file with content "some data" to "/test.txt"
And we save it into "FILEID"
And user "Brian" has a share "folder" synced
When user "Brian" copies file with id "<<FILEID>>" as "/test.txt" into folder "Shares/folder" inside space "Shares"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "/" of the space "Personal" should contain these files:
| test.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| test.txt |
Scenario Outline: copy a file from share to personal space
Given user "Brian" has been created with default attributes
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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permission-role> |
And user "Brian" has a share "folder" synced
When user "Brian" copies file with id "<<FILEID>>" as "/test.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "/" of the space "Personal" should contain these files:
| test.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| test.txt |
Examples:
| permission-role |
| Editor |
| Viewer |
| Uploader |
Scenario: sharee tries to copy a file from shares space with secure viewer to personal space
Given user "Brian" has been created with default attributes
And the administrator has enabled the permissions role "Secure Viewer"
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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Secure Viewer |
And user "Brian" has a share "folder" synced
When user "Brian" copies file with id "<<FILEID>>" as "/test.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "403"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "/" of the space "Personal" should not contain these files:
| test.txt |
Scenario Outline: sharee copies a file from shares to project space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permission-role> |
And user "Brian" has a share "folder" synced
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" copies file with id "<<FILEID>>" as "test.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "/" of the space "project-space" should contain these files:
| test.txt |
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| test.txt |
Examples:
| permission-role | space-role |
| Viewer | Manager |
| Viewer | Space Editor |
| Editor | Manager |
| Editor | Space Editor |
| Uploader | Manager |
| Uploader | Space Editor |
@env-config
Scenario Outline: sharee tries to copy a file from shares to project space
Given user "Brian" has been created with default attributes
And the administrator has enabled the permissions role "Secure Viewer"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permission-role> |
And user "Brian" has a share "folder" synced
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" copies file with id "<<FILEID>>" as "/test.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "403"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "/" of the space "project-space" should not contain these files:
| test.txt |
And for user "Alice" folder "/" of the space "project-space" should not contain these files:
| test.txt |
Examples:
| permission-role | space-role |
| Secure Viewer | Manager |
| Secure Viewer | Space Viewer |
| Secure Viewer | Space Editor |
| Editor | Space Viewer |
| Viewer | Space Viewer |
| Uploader | Space Viewer |
Scenario Outline: sharee copies a file between shares spaces
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "/share1"
And user "Alice" has created folder "/share2"
And user "Alice" has uploaded file with content "some data" to "/share1/test.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | share1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <from-share-role> |
And user "Brian" has a share "share1" synced
And user "Alice" has sent the following resource share invitation:
| resource | share2 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <to-share-role> |
And user "Brian" has a share "share2" synced
When user "Brian" copies file with id "<<FILEID>>" as "/test.txt" into folder "share2" inside space "Shares"
Then the HTTP status code should be "201"
And for user "Brian" folder "share1" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "share2" of the space "Shares" should contain these files:
| test.txt |
And for user "Alice" folder "share1" of the space "Personal" should contain these files:
| test.txt |
And for user "Alice" folder "share2" of the space "Personal" should contain these files:
| test.txt |
Examples:
| from-share-role | to-share-role |
| Viewer | Editor |
| Viewer | Uploader |
| Editor | Editor |
| Editor | Uploader |
| Uploader | Editor |
| Uploader | Uploader |
@env-config
Scenario Outline: sharee tries to copy a file between shares space
Given user "Brian" has been created with default attributes
And the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has created folder "/share1"
And user "Alice" has created folder "/share2"
And user "Alice" has uploaded file with content "some data" to "/share1/test.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | share1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <from-share-role> |
And user "Brian" has a share "share1" synced
And user "Alice" has sent the following resource share invitation:
| resource | share2 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <to-share-role> |
And user "Brian" has a share "share2" synced
When user "Brian" copies file with id "<<FILEID>>" as "test.txt" into folder "share2" inside space "Shares"
Then the HTTP status code should be "403"
And for user "Brian" folder "share1" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "share2" of the space "Shares" should not contain these files:
| test.txt |
And for user "Alice" folder "share1" of the space "Personal" should contain these files:
| test.txt |
And for user "Alice" folder "share2" of the space "Personal" should not contain these files:
| test.txt |
Examples:
| from-share-role | to-share-role |
| Secure Viewer | Viewer |
| Secure Viewer | Editor |
| Secure Viewer | Uploader |
| Secure Viewer | Secure Viewer |
| Viewer | Viewer |
| Editor | Viewer |
| Uploader | Viewer |
| Viewer | Secure Viewer |
| Editor | Secure Viewer |
| Uploader | Secure Viewer |
Scenario Outline: copy a file from project to personal space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" copies file with id "<<FILEID>>" as "/textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Brian" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Brian" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
Examples:
| space-role |
| Manager |
| Space Editor |
| Space Viewer |
Scenario Outline: copy a file between two project spaces
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "first-project-space" with the default quota using the Graph API
And user "Alice" has created a space "second-project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "first-project-space" with content "first project space" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | first-project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <from-space-role> |
And user "Alice" has sent the following space share invitation:
| space | second-project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <to-space-role> |
When user "Brian" copies file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "second-project-space"
Then the HTTP status code should be "201"
And for user "Brian" the space "second-project-space" should contain these entries:
| textfile.txt |
And for user "Brian" the space "first-project-space" should contain these entries:
| textfile.txt |
And for user "Alice" the space "second-project-space" should contain these entries:
| textfile.txt |
Examples:
| from-space-role | to-space-role |
| Manager | Manager |
| Manager | Space Editor |
| Space Editor | Manager |
| Space Editor | Space Editor |
| Space Viewer | Manager |
| Space Viewer | Space Editor |
Scenario Outline: try to copy a file from a project to another project space with read permission
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "first-project-space" with the default quota using the Graph API
And user "Alice" has created a space "second-project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "first-project-space" with content "first project space" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | first-project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <from-space-role> |
And user "Alice" has sent the following space share invitation:
| space | second-project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <to-space-role> |
When user "Brian" copies file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "second-project-space"
Then the HTTP status code should be "403"
And for user "Brian" the space "second-project-space" should not contain these entries:
| textfile.txt |
And for user "Brian" the space "first-project-space" should contain these entries:
| textfile.txt |
But for user "Alice" the space "second-project-space" should not contain these entries:
| textfile.txt |
Examples:
| from-space-role | to-space-role |
| Manager | Space Viewer |
| Space Editor | Space Viewer |
| Space Viewer | Space Viewer |
Scenario Outline: copy a file from project to shares space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
And user "Alice" has created folder "testshare"
And user "Alice" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "testshare" synced
When user "Brian" copies file with id "<<FILEID>>" as "textfile.txt" into folder "testshare" inside space "Shares"
Then the HTTP status code should be "201"
And for user "Brian" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
And for user "Brian" folder "testshare" of the space "Shares" should contain these files:
| textfile.txt |
And for user "Alice" folder "testshare" of the space "Personal" should contain these files:
| textfile.txt |
Examples:
| space-role | permissions |
| Manager | Editor |
| Manager | Uploader |
| Space Editor | Editor |
| Space Editor | Uploader |
| Space Viewer | Editor |
| Space Viewer | Uploader |
@env-config
Scenario Outline: try to copy a file from project to shares space with read permission
Given user "Brian" has been created with default attributes
And the administrator has enabled the permissions role "Secure Viewer"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
And user "Alice" has created folder "testshare"
And user "Alice" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "testshare" synced
When user "Brian" copies file with id "<<FILEID>>" as "textfile.txt" into folder "testshare" inside space "Shares"
Then the HTTP status code should be "403"
And for user "Brian" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
But for user "Brian" folder "testshare" of the space "Shares" should not contain these files:
| textfile.txt |
And for user "Alice" folder "testshare" of the space "Personal" should not contain these files:
| textfile.txt |
Examples:
| space-role | permissions |
| Manager | Viewer |
| Manager | Secure Viewer |
| Space Editor | Viewer |
| Space Editor | Secure Viewer |
| Space Viewer | Viewer |
| Space Viewer | Secure Viewer |
@@ -0,0 +1,209 @@
Feature: checking file versions using file id
As a user
I want the versions of files to be available
So that I can manage the changes made to the files
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
And using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "Project1" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project1" with content "hello world version 1" to "text.txt"
And we save it into "FILEID"
And user "Alice" has uploaded a file inside space "Project1" with content "hello world version 1.1" to "text.txt"
Scenario Outline: check the file versions of a file shared from project space
Given user "Alice" has sent the following resource share invitation:
| resource | text.txt |
| space | Project1 |
| sharee | Brian |
| shareType | user |
| permissionsRole | <role> |
And user "Brian" has a share "text.txt" synced
When user "Alice" gets the number of versions of file "/text.txt" using file-id "<<FILEID>>"
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 "<<FILEID>>"
Then the HTTP status code should be "403"
Examples:
| role |
| File Editor |
| Viewer |
Scenario Outline: check the versions of a file in a shared space as editor/manager
Given user "Alice" has sent the following space 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 "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
When user "Brian" gets the number of versions of file "/text.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| space-role |
| Space Editor |
| Manager |
Scenario: check the versions of a file in a shared space as viewer
Given user "Alice" has sent the following space 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 "<<FILEID>>"
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 sent the following resource share invitation:
| resource | text.txt |
| space | Project1 |
| sharee | Brian |
| shareType | user |
| permissionsRole | <role> |
And user "Brian" has a share "text.txt" synced
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 "<<FILEID>>"
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 "/Shares/testFolder/movedText.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "403"
Examples:
| 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 sent the following resource share invitation:
| resource | testFolder |
| space | Project1 |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "testFolder" synced
And user "Alice" has sent the following space 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 "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
@issue-777
Scenario Outline: check file versions after moving to-and-from folder in personal space
Given user "Alice" has created folder "folder"
And user "Alice" has uploaded file with content "some data" to "<source>textfile.txt"
And user "Alice" has uploaded file with content "some data - edited" to "<source>textfile.txt"
And we save it into "FILEID"
And user "Alice" has moved file "<source>textfile.txt" to "<destination>textfile.txt" in space "Personal"
When user "Alice" gets the number of versions of file "<destination>textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| source | destination |
| / | folder/ |
| folder/ | / |
@issue-777
Scenario Outline: check file versions after moving to-and-from folder in personal space (MOVE using file-id)
Given user "Alice" has created folder "folder"
And user "Alice" has uploaded file with content "some data" to "<source>textfile.txt"
And user "Alice" has uploaded file with content "some data - edited" to "<source>textfile.txt"
And we save it into "FILEID"
And using spaces DAV path
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "<destination>" inside space "Personal"
Then the HTTP status code should be "201"
When user "Alice" gets the number of versions of file "<destination>textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| source | destination |
| / | folder/ |
| folder/ | / |
@issue-777
Scenario Outline: check file versions after moving to-and-from folder in project space
Given user "Alice" has created a folder "folder" in space "Project1"
And user "Alice" has uploaded a file inside space "Project1" with content "some data" to "<source>textfile.txt"
And user "Alice" has uploaded a file inside space "Project1" with content "some data - edited" to "<source>textfile.txt"
And we save it into "FILEID"
And user "Alice" has moved file "<source>textfile.txt" to "<destination>textfile.txt" in space "Project1"
When user "Alice" gets the number of versions of file "<source>textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| source | destination |
| / | folder/ |
| folder/ | / |
@issue-777
Scenario Outline: check file versions after moving to-and-from folder in project space (MOVE using file-id)
And user "Alice" has created a folder "folder" in space "Project1"
And user "Alice" has uploaded a file inside space "Project1" with content "some data" to "<source>textfile.txt"
And user "Alice" has uploaded a file inside space "Project1" with content "some data - edited" to "<source>textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "<destination>" inside space "Project1"
Then the HTTP status code should be "201"
When user "Alice" gets the number of versions of file "<destination>textfile.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "207"
And the number of versions should be "1"
Examples:
| source | destination |
| / | folder/ |
| folder/ | / |
@env-config
Scenario: check the versions of a file in a shared space as editor without versions role
Given the administrator has enabled the permissions role "Space Editor Without Versions"
And user "Alice" has sent the following space share invitation:
| space | Project1 |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Editor Without Versions |
When user "Brian" gets the number of versions of file "/text.txt" using file-id "<<FILEID>>"
Then the HTTP status code should be "403"
Scenario Outline: public tries to check the versions of a file in a project space shared via link as viewer/editor
Given user "Alice" has created the following space link share:
| space | Project1 |
| permissionsRole | <permissions-role> |
| password | %public% |
When the public tries to get the number of versions of file "/text.txt" with password "%public%" using file-id "<<FILEID>>"
Then the HTTP status code should be "401"
Examples:
| permissions-role |
| view |
| edit |
Scenario Outline: public tries to check the versions of a file in a personal space shared via link as viewer/editor
Given user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has uploaded file with content "some updated data" to "/PARENT/parent.txt"
And we save it into "FILEID"
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | <permissions-role> |
| password | %public% |
When the public tries to get the number of versions of file "/parent.txt" with password "%public%" using file-id "<<FILEID>>"
Then the HTTP status code should be "401"
Examples:
| permissions-role |
| view |
| edit |
@@ -0,0 +1,291 @@
Feature: accessing files using file id
As a user
I want to access the files using file id
So that I can get the content of a file
Background:
Given using spaces DAV path
And user "Alice" has been created with default attributes
Scenario Outline: get content of a file
Given user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" sends HTTP method "GET" to URL "<dav-path>"
Then the HTTP status code should be "200"
And the downloaded content should be "some data"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: get content of a file inside a folder
Given 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"
When user "Alice" sends HTTP method "GET" to URL "<dav-path>"
Then the HTTP status code should be "200"
And the downloaded content should be "some data"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: get content of a file inside a project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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"
When user "Alice" sends HTTP method "GET" to URL "<dav-path>"
Then the HTTP status code should be "200"
And the downloaded content should be "some data"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee gets content of a shared file
Given user "Brian" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "textfile.txt" synced
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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee gets content of a file inside a shared folder
Given user "Brian" has been created with default attributes
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 sent the following resource share invitation:
| resource | uploadFolder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "uploadFolder" synced
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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee gets content of a file inside a shared space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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 sent the following space 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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: user tries to get content of file owned by others
Given user "Brian" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Brian" sends HTTP method "GET" to URL "<dav-path>"
Then the HTTP status code should be "404"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee gets content of a shared file when sync is disable
Given user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource 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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee gets content of a file inside a shared folder when sync is disable
Given user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
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 sent the following resource 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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: user who is member of group gets content of a shared file when sync is disable
Given user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
And user "Alice" has created a group "grp1" using the Graph API
And user "Brian" has been added to group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| 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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: user who is member of group gets content of a shared folder when sync is disable
Given user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
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 the administrator has assigned the role "Admin" to user "Alice" using the Graph API
And user "Alice" has created a group "grp1" using the Graph API
And user "Brian" has been added to group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | uploadFolder |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| 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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee gets content of a shared file in project space when sync is disabled
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | new-space |
| 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 content"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee gets content of a file inside a shared folder in project space when sync is disabled
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
And user "Alice" has created a folder "uploadFolder" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "uploadFolder/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | uploadFolder |
| space | new-space |
| 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 content"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: user who is member of group gets content of a shared file in project space when sync is disabled
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Admin" has created a group "grp1" using the Graph API
And user "Brian" has been added to group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | new-space |
| sharee | grp1 |
| shareType | group |
| 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 content"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: user who is member of group gets content of a file from shared folder in project space when sync is disabled
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Brian" has been created with default attributes
And user "Brian" has disabled the auto-sync share
And user "Alice" has created a folder "uploadFolder" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "uploadFolder/textfile.txt"
And we save it into "FILEID"
And user "Admin" has created a group "grp1" using the Graph API
And user "Brian" has been added to group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | uploadFolder |
| space | new-space |
| sharee | grp1 |
| shareType | group |
| 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 content"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
@@ -0,0 +1,684 @@
Feature: moving/renaming file using file id
As a user
I want to be able to move or rename files using file id
So that I can manage my file system
Background:
Given using spaces DAV path
And user "Alice" has been created with default attributes
Scenario: move a file into a folder inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| textfile.txt |
But for user "Alice" the space "Personal" should not contain these entries:
| textfile.txt |
Scenario: move a file into a sub-folder inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has created folder "folder/sub-folder"
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder/sub-folder" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "folder/sub-folder/" of the space "Personal" should contain these files:
| textfile.txt |
But for user "Alice" the space "Personal" should not contain these entries:
| textfile.txt |
Scenario: move a file from folder to root inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| textfile.txt |
But for user "Alice" folder "folder" of the space "Personal" should not contain these files:
| textfile.txt |
Scenario: move a file from sub-folder to root inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has created folder "folder/sub-folder"
And user "Alice" has uploaded file with content "some data" to "folder/sub-folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| textfile.txt |
But for user "Alice" folder "folder/sub-folder" of the space "Personal" should not contain these files:
| textfile.txt |
@issue-1976
Scenario: try to move a file into same folder with same name
And user "Alice" has uploaded file with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "403"
And as "Alice" file "textfile.txt" should not exist in the trashbin of the space "Personal"
And for user "Alice" the content of the file "textfile.txt" of the space "Personal" should be "some data"
Scenario Outline: move a file from personal to share space
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "/folder"
And user "Alice" has sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "folder" synced
And user "Brian" has uploaded file with content "some data" to "/test.txt"
And we save it into "FILEID"
When user "Brian" moves file with id "<<FILEID>>" as "test.txt" into folder "folder" inside space "Shares"
Then the HTTP status code should be "502"
And the value of the item "/d:error/s:message" in the response about user "Brian" should be "cross storage moves are not supported, use copy and delete"
And for user "Brian" folder "/" of the space "Personal" should contain these files:
| test.txt |
But for user "Alice" folder "folder" of the space "Personal" should not contain these files:
| test.txt |
Examples:
| permissions |
| Editor |
| Viewer |
@issue-7618
Scenario Outline: move a file from personal to project space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Brian" has uploaded a file inside space "Personal" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "<http-status-code>"
And for user "Brian" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
But for user "Brian" folder "/" of the space "project-space" should not contain these files:
| textfile.txt |
Examples:
| space-role | http-status-code |
| Manager | 502 |
| Space Editor | 502 |
| Space Viewer | 403 |
@issue-7618
Scenario: move a file to different name from personal space to project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Personal" with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "renamed.txt" inside space "project-space"
Then the HTTP status code should be "502"
And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces"
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
But for user "Alice" folder "/" of the space "project-space" should not contain these files:
| renamed.txt |
Scenario Outline: move a file into a folder inside project space (manager/editor)
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Brian" has been created with default attributes
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "/folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" moves file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" folder "folder" of the space "project-space" should contain these files:
| textfile.txt |
But for user "Alice" the space "project-space" should not contain these entries:
| textfile.txt |
Examples:
| space-role |
| Manager |
| Space Editor |
@issue-1976
Scenario Outline: try to move a file within a project space into a folder with same name
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Brian" has been created with default attributes
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "403"
And as "Alice" file "textfile.txt" should not exist in the trashbin of the space "project-space"
And for user "Brian" the content of the file "textfile.txt" of the space "project-space" should be "some data"
Examples:
| space-role |
| Manager |
| Space Viewer |
| viewer |
Scenario: try to move a file into a folder inside project space (viewer)
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Brian" has been created with default attributes
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "/folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" moves file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder" inside space "project-space"
Then the HTTP status code should be "403"
And for user "Alice" the space "project-space" should contain these entries:
| textfile.txt |
But for user "Alice" folder "folder" of the space "project-space" should not contain these files:
| textfile.txt |
Scenario: move a file into a sub-folder inside project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "folder/sub-folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "/textfile.txt" into folder "/folder/sub-folder" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" folder "folder/sub-folder/" of the space "project-space" should contain these files:
| textfile.txt |
But for user "Alice" the space "Personal" should not contain these entries:
| textfile.txt |
Scenario: move a file from folder to root inside project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" the space "project-space" should contain these entries:
| textfile.txt |
But for user "Alice" folder "folder" of the space "project-space" should not contain these files:
| textfile.txt |
Scenario: move a file from sub-folder to root inside project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "folder/sub-folder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "folder/sub-folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "201"
And for user "Alice" the space "project-space" should contain these entries:
| textfile.txt |
But for user "Alice" folder "folder/sub-folder" of the space "project-space" should not contain these files:
| textfile.txt |
@issue-8116
Scenario Outline: move a file between two project spaces
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "first-project-space" with the default quota using the Graph API
And user "Alice" has created a space "second-project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "first-project-space" with content "first project space" to "file.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | first-project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <from-space-role> |
And user "Alice" has sent the following space share invitation:
| space | second-project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <to-space-role> |
When user "Brian" moves file with id "<<FILEID>>" as "file.txt" into folder "/" inside space "second-project-space"
Then the HTTP status code should be "<http-status-code>"
And for user "Brian" the space "second-project-space" should not contain these entries:
| file.txt |
But for user "Brian" the space "first-project-space" should contain these entries:
| file.txt |
Examples:
| from-space-role | to-space-role | http-status-code |
| Manager | Manager | 502 |
| Space Editor | Manager | 502 |
| Manager | Space Editor | 502 |
| Space Editor | Space Editor | 502 |
| Manager | Space Viewer | 403 |
| Space Editor | Space Viewer | 403 |
| Space Viewer | Manager | 403 |
| Space Viewer | Space Editor | 403 |
| Space Viewer | Space Viewer | 403 |
@issue-8116
Scenario: move a file to different name between project spaces
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "first-project-space" with the default quota using the Graph API
And user "Alice" has created a space "second-project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "first-project-space" with content "data from first project space" to "firstProjectSpacetextfile.txt"
And user "Alice" has uploaded a file inside space "second-project-space" with content "data from second project space" to "secondProjectSpacetextfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "/renamedSecondProjectSpacetextfile.txt" inside space "first-project-space"
Then the HTTP status code should be "502"
And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces"
And for user "Alice" folder "/" of the space "first-project-space" should contain these files:
| firstProjectSpacetextfile.txt |
And for user "Alice" folder "/" of the space "second-project-space" should contain these files:
| secondProjectSpacetextfile.txt |
But for user "Alice" the space "first-project-space" should not contain these entries:
| renamedSecondProjectSpacetextfile.txt |
Scenario Outline: move a file from project to shares space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
And user "Alice" has created folder "testshare"
And user "Alice" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "testshare" synced
When user "Brian" moves file with id "<<FILEID>>" as "textfile.txt" into folder "testshare" inside space "Shares"
Then the HTTP status code should be "502"
And for user "Brian" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
But for user "Brian" folder "testshare" of the space "Shares" should not contain these files:
| textfile.txt |
Examples:
| space-role | permissions |
| Manager | Editor |
| Space Editor | Editor |
| Space Viewer | Editor |
| Manager | Viewer |
| Space Editor | Viewer |
| Space Viewer | Viewer |
@issue-7618
Scenario Outline: move a file from project to personal space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" moves file with id "<<FILEID>>" as "/textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "<http-status-code>"
And for user "Brian" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
But for user "Brian" folder "/" of the space "Personal" should not contain these files:
| textfile.txt |
Examples:
| space-role | http-status-code |
| Manager | 502 |
| Space Editor | 502 |
| Space Viewer | 403 |
@issue-7618
Scenario: move a file to different name from project space to personal space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "/renamed.txt" inside space "Personal"
Then the HTTP status code should be "502"
And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces"
And for user "Alice" folder "/" of the space "project-space" should contain these files:
| textfile.txt |
But for user "Alice" folder "/" of the space "Personal" should not contain these files:
| renamed.txt |
@issue-7617
Scenario: move a file into a folder within a shared folder (edit permissions)
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "folder"
And user "Alice" has created folder "folder/sub-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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
When user "Brian" moves file with id "<<FILEID>>" as "test.txt" into folder "folder/sub-folder" inside space "Shares"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
| test.txt |
But for user "Brian" folder "folder" of the space "Shares" should not contain these files:
| test.txt |
And for user "Alice" folder "folder" of the space "Personal" should not contain these files:
| test.txt |
@issue-1976
Scenario: sharee tries to move a file into same shared folder with same name
Given user "Brian" has been created with default attributes
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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "/folder" synced
When user "Brian" moves file with id "<<FILEID>>" as "test.txt" into folder "folder" inside space "Shares"
Then the HTTP status code should be "403"
And as "Alice" file "test.txt" should not exist in the trashbin of the space "Personal"
And for user "Brian" the content of the file "folder/test.txt" of the space "Shares" should be "some data"
And for user "Alice" the content of the file "folder/test.txt" of the space "Personal" should be "some data"
Scenario: try to move a file into a folder within a shared folder (read permissions)
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "folder"
And user "Alice" has created folder "folder/sub-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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folder" synced
When user "Brian" moves file with id "<<FILEID>>" as "test.txt" into folder "folder/sub-folder" inside space "Shares"
Then the HTTP status code should be "502"
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should not contain these files:
| test.txt |
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should not contain these files:
| test.txt |
But for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| test.txt |
Scenario Outline: move a file from one shared folder to another shared folder
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "testshare1"
And user "Alice" has created folder "testshare2"
And user "Alice" has uploaded file with content "some data" to "testshare1/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | testshare1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <from-permissions> |
And user "Brian" has a share "testshare1" synced
And user "Alice" has sent the following resource share invitation:
| resource | testshare2 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <to-permissions> |
And user "Brian" has a share "testshare2" synced
When user "Brian" moves file with id "<<FILEID>>" as "textfile.txt" into folder "testshare2" inside space "Shares"
Then the HTTP status code should be "502"
And for user "Brian" folder "testshare1" of the space "Shares" should contain these files:
| textfile.txt |
But for user "Brian" folder "testshare2" of the space "Shares" should not contain these files:
| textfile.txt |
Examples:
| from-permissions | to-permissions |
| Editor | Editor |
| Editor | Viewer |
| Viewer | Editor |
| Viewer | Viewer |
@issue-8124
Scenario Outline: move a file from share to personal space
Given user "Brian" has been created with default attributes
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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "folder" synced
When user "Brian" moves file with id "<<FILEID>>" as "test.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "<http-status-code>"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
And for user "Brian" folder "/" of the space "Personal" should not contain these files:
| test.txt |
Examples:
| permissions | http-status-code |
| Editor | 502 |
| Viewer | 403 |
@issue-8125
Scenario Outline: move a file from shares to project space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | <space-role> |
And user "Alice" has created folder "testshare"
And user "Alice" has uploaded file with content "some data" to "testshare/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "testshare" synced
When user "Brian" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "<http-status-code>"
And for user "Brian" folder "testshare" of the space "Shares" should contain these files:
| textfile.txt |
But for user "Brian" folder "/" of the space "project-space" should not contain these files:
| textfile.txt |
Examples:
| space-role | permissions | http-status-code |
| Manager | Editor | 502 |
| Space Editor | Editor | 502 |
| Space Viewer | Editor | 403 |
| Manager | Viewer | 403 |
| Space Editor | Viewer | 403 |
| Space Viewer | Viewer | 403 |
Scenario: rename a root file inside personal space
Given user "Alice" has uploaded file with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "renamed.txt" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| renamed.txt |
But for user "Alice" the space "Personal" should not contain these entries:
| textfile.txt |
Scenario: rename a file and move into a folder inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "/folder/renamed.txt" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| renamed.txt |
But for user "Alice" the space "Personal" should not contain these entries:
| textfile.txt |
Scenario: rename a file and move into a sub-folder inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has created folder "folder/sub-folder"
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "/folder/sub-folder/renamed.txt" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
| renamed.txt |
But for user "Alice" the space "Personal" should not contain these entries:
| textfile.txt |
Scenario: rename a file and move from a folder to root inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "/renamed.txt" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| renamed.txt |
But for user "Alice" folder "folder" of the space "Personal" should not contain these files:
| renamed.txt |
Scenario: rename a file and move from sub-folder to root inside personal space
Given user "Alice" has created folder "/folder"
And user "Alice" has created folder "folder/sub-folder"
And user "Alice" has uploaded file with content "some data" to "folder/sub-folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" renames file with id "<<FILEID>>" to "/renamed.txt" inside space "Personal"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these files:
| renamed.txt |
But for user "Alice" folder "folder/sub-folder" of the space "Personal" should not contain these files:
| textfile.txt |
@issue-7617
Scenario: move a file to a different name into a sub-folder inside share space (editor permissions)
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "/folder"
And user "Alice" has created folder "/folder/sub-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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
When user "Brian" renames file with id "<<FILEID>>" to "folder/sub-folder/renamed.txt" inside space "Shares"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files:
| renamed.txt |
But for user "Brian" folder "folder" of the space "Shares" should not contain these files:
| test.txt |
Scenario: move a file to a different name into a sub-folder inside share space (read permissions)
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "/folder"
And user "Alice" has created folder "/folder/sub-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 sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folder" synced
When user "Brian" renames file with id "<<FILEID>>" to "folder/sub-folder/renamed.txt" inside space "Shares"
Then the HTTP status code should be "502"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
| test.txt |
But for user "Brian" folder "folder/sub-folder" of the space "Shares" should not contain these files:
| renamed.txt |
@issue-6739
Scenario Outline: try to move personal file to other spaces using its id as the destination
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "myspace" with the default quota using the Graph API
And user "Alice" has uploaded file with content "some data" to "textfile.txt"
When user "Alice" tries to move file "textfile.txt" of space "Personal" to space "<space-name>" using its id in destination path
Then the HTTP status code should be "<http-status-code>"
And for user "Alice" the space "Personal" should contain these entries:
| textfile.txt |
Examples:
| space-name | http-status-code |
| Personal | 409 |
| myspace | 400 |
| Shares | 404 |
@issue-6739
Scenario Outline: try to move project file to other spaces using its id as the destination
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "myspace" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "myspace" with content "some data" to "textfile.txt"
When user "Alice" tries to move file "textfile.txt" of space "myspace" to space "<space-name>" using its id in destination path
Then the HTTP status code should be "<http-status-code>"
And for user "Alice" the space "myspace" should contain these entries:
| textfile.txt |
Examples:
| space-name | http-status-code |
| Personal | 400 |
| myspace | 409 |
| Shares | 404 |
@issue-6739
Scenario: move a file to folder using its id as the destination (Personal space)
Given user "Alice" has uploaded file with content "some data" to "textfile.txt"
And user "Alice" has created folder "docs"
When user "Alice" moves file "textfile.txt" of space "Personal" to folder "docs" using its id in destination path
Then the HTTP status code should be "204"
And the content of file "docs" for user "Alice" should be "some data"
And as "Alice" file "textfile.txt" should not exist
And as "Alice" folder "docs" should not exist
And as "Alice" folder "docs" should exist in the trashbin of the space "Personal"
@issue-6739
Scenario: move a file to folder using its id as the destination (Project space)
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "myspace" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "myspace" with content "some data" to "textfile.txt"
And user "Alice" has created a folder "docs" in space "myspace"
When user "Alice" moves file "textfile.txt" of space "myspace" to folder "docs" using its id in destination path
Then the HTTP status code should be "204"
And for user "Alice" the content of the file "docs" of the space "myspace" should be "some data"
And as "Alice" folder "docs" should exist in the trashbin of the space "myspace"
And for user "Alice" folder "/" of the space "myspace" should not contain these files:
| textfile.txt |
@@ -0,0 +1,139 @@
Feature: propfind a file using file id
As a user
I want to check the PROPFIND response of file using their file id
So that I can make sure that the response contains all the relevant values
Background:
Given using spaces DAV path
And user "Alice" has been created with default attributes
Scenario Outline: send a PROPFIND request to a file inside root of personal space
Given user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" with these key and value pairs:
| key | value |
| oc:name | textfile.txt |
| oc:permissions | RDNVWZP |
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: send a PROPFIND request to a file inside a folder of personal space
Given user "Alice" has created folder "folder"
And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" with these key and value pairs:
| key | value |
| oc:name | textfile.txt |
| oc:permissions | RDNVWZP |
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: send a PROPFIND request to a file in personal space owned by another user
Given user "Brian" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Brian" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "404"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: send a PROPFIND request to a file of inside project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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 content" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" with these key and value pairs:
| key | value |
| oc:name | textfile.txt |
| oc:permissions | RDNVWZP |
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: send a PROPFIND request to a file inside a folder of project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "folder" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "/folder/textfile.txt"
And we save it into "FILEID"
When user "Alice" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "207"
And as user "Alice" the PROPFIND response should contain a resource "<<FILEID>>" with these key and value pairs:
| key | value |
| oc:name | textfile.txt |
| oc:permissions | RDNVWZP |
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: send a PROPFIND request to a file inside project space owned by another user
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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 content" to "textfile.txt"
And we save it into "FILEID"
When user "Brian" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "404"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: send a PROPFIND request to a shared file
Given user "Brian" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "<<FILEID>>" with these key and value pairs:
| key | value |
| oc:name | textfile.txt |
| oc:permissions | SNVW |
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
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 user "Alice" has created folder "/folder"
And user "Alice" has sent the following resource share invitation:
| resource | folder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
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>"
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "<<FILEID>>" with these key and value pairs:
| key | value |
| oc:name | textfile.txt |
| oc:permissions | DNVW |
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
@@ -0,0 +1,117 @@
Feature: update files using file id
As a user
I want to update the files using file id
So that I can make changes on the content of a file
Background:
Given using spaces DAV path
And user "Alice" has been created with default attributes
Scenario Outline: update content of a file
Given user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Alice" 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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: update content of a file inside a folder
Given 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"
When user "Alice" 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"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: update content of a file inside a project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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"
When user "Alice" 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 "new-space" should be "updated content"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee updates content of a shared file
Given user "Brian" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
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"
And for user "Brian" the content of the file "textfile.txt" of the space "Shares" should be "updated content"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee updates content of a file inside a shared folder
Given user "Brian" has been created with default attributes
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 sent the following resource share invitation:
| resource | uploadFolder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "uploadFolder" synced
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"
And for user "Brian" the content of the file "uploadFolder/textfile.txt" of the space "Shares" should be "updated content"
Examples:
| dav-path |
| /dav/spaces/<<FILEID>> |
Scenario Outline: sharee with different role tries to update content of a file inside a shared space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
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 sent the following space 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 |
| /dav/spaces/<<FILEID>> | Space Editor | 204 | updated content |
Scenario Outline: user tries to update content of a file owned by others
Given user "Brian" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
And we save it into "FILEID"
When user "Brian" sends HTTP method "PUT" to URL "<dav-path>" with content "updated content"
Then the HTTP status code should be "404"
And for user "Alice" the content of the file "/textfile.txt" of the space "Personal" should be "some data"
Examples:
| dav-path |
| /dav/spcaes/<<FILEID>> |